GUI - Custom Control Properties
- 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)
Owner: |
set to gustav
|
Summary: |
Custom Control Properties → GUI - Custom Control Properties
|
Owner: |
set to sluzky
|
Status: |
new → assigned
|
Resolution: |
→ wontfix
|
Status: |
assigned → closed
|
Milestone: |
Environment Demo
|
This shouldn't be needed - the new GUI system just uses closures as
onpress
handlers to transfer all the information needed by buttons.