Opened 18 years ago

Closed 14 years ago

Last modified 14 years ago

#111 closed task (wontfix)

GUI - Custom Control Properties

Reported by: Stuart Walpole Owned by: sluzky
Priority: Should Have Milestone:
Component: Core engine Keywords:
Cc: Patch:

Description

  • Problem: Sometimes we need to store extra information about a control so that we can refer to it later. For example, I currently use a horrible hack involving storing a string in the tooltip of a button in order to know the name of the entity which will be trained by clicking the button, since I can't retain that information in the onPress event.
  • Solution: Either allow additional properties to be added to a control (as long as it doesn't use a reserved name), or add a few generic container properties that scripters could use for custom values. "For storing JS properties, it'd probably be nice to move things over to using the CJSObject system or whatever it's called. (At least I think that allows arbitrary properties in objects - probably ought to check first.) - Philip"

Change History (5)

comment:1 by Stuart Walpole, 18 years ago

Owner: set to gustav
Summary: Custom Control PropertiesGUI - Custom Control Properties

comment:2 by Erik Johansson, 15 years ago

Owner: Gee removed

comment:3 by sluzky, 15 years ago

Owner: set to sluzky
Status: newassigned

comment:4 by Philip Taylor, 14 years ago

Resolution: wontfix
Status: assignedclosed

This shouldn't be needed - the new GUI system just uses closures as onpress handlers to transfer all the information needed by buttons.

comment:5 by (none), 14 years ago

Milestone: Environment Demo

Milestone Environment Demo deleted

Note: See TracTickets for help on using tickets.