Author Topic: Feature Request: PlayAnimation Mouse Button selection  (Read 1883 times)

Maxii

  • Jr. Member
  • **
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 55
    • View Profile
    • Strategic Forge
Feature Request: PlayAnimation Mouse Button selection
« on: September 08, 2014, 10:24:32 AM »
I'm using PlayAnimation on a number of buttons to bring up new menus. I only want a left click to activate the animation, not any click. Would you consider adding a mouse button distinction setting on this script, and/or more generally across other applicable scripts?

Currently, the only way I've been able to handle it is to write my own MyPlayAnimation with the filter built in. Obviously this has limits as PlayAnimation gets updated.
I'm looking for an artist partner to complement my programming skill in developing a space-based Civilization-like empire building game, ala GalCiv2 or Distant Worlds based on Unity3D.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Feature Request: PlayAnimation Mouse Button selection
« Reply #1 on: September 08, 2014, 10:31:38 PM »
That seems like a good idea. Add "if (UICamera.currentTouchID < -1) return;" to the top of OnPress, OnClick, and OnDoubleClick within UIPlayAnimation. I've added this check locally so you'll find it in the next update.

Maxii

  • Jr. Member
  • **
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 55
    • View Profile
    • Strategic Forge
Re: Feature Request: PlayAnimation Mouse Button selection
« Reply #2 on: September 10, 2014, 02:26:07 PM »
Thanks much!
I'm looking for an artist partner to complement my programming skill in developing a space-based Civilization-like empire building game, ala GalCiv2 or Distant Worlds based on Unity3D.