PDA

View Full Version : Options Options



damned
March 15th, 2015, 03:35
When setting up new Options for Campaign setup via the data_options.lua (or similar) they all seem to use the type option_entry_cycler.
Being that you actually have to specify the type what other options are there?


https://www.fg-con.com/wp-content/uploads/2015/02/fg-con-6-150-14.jpg (https://www.fg-con.com/events/)
FG Con 6 – April 17-19th 2015 - register at www.fg-con.com (https://www.fg-con.com/) for all the latest info.

damned
March 18th, 2015, 02:54
Is there any reason that we couldnt have a Text box for use in Options?

Trenloe
March 18th, 2015, 03:10
Is there any reason that we couldnt have a Text box for use in Options?
I'm guessing you're wanting to have text field options for things like control labels? Not to completely replace the current stringcycler options?

Essentially, the options menu "stuff" in utility\utility_options.xml The main entry for the actual options line is the <windowclass> option_entry_cycler - note that this is the 5th argument used to the calls to OptionsManager.registerOption2 in data_options_core.lua.

therefore, if you take the option_entry_cycler <windowclass>, copy it and make a new window class (e.g. option_entry_text) and replace the button_stringcycler control with a stringcontrol and modify the windowclass code to store the value of the stringcontrol with OptionsManager.setOption(sOptionKey, sValue), then you should be able to make OptionsManager.registerOption2 work with different classes, then get the actual value with OptionsManager.getOption(<option key name>);

damned
March 18th, 2015, 03:32
Thats right Trenloe - in the MoreCore extension which is meant to facilitate as many generic rulesets as possible I have used generic terms like Health and Defence. These are linked to the Combat Tracker.
If these could be renamed in Options it would be a nice feature. Ill give your suggestion a go.

https://www.fg-con.com/wp-content/uploads/2015/03/more-core-options-link.jpg


https://www.fg-con.com/wp-content/uploads/2015/01/fg-con-6-150-4.jpg (https://www.fg-con.com/events/)
FG Con 6 – April 17-19th 2015 - register at www.fg-con.com (https://www.fg-con.com/) for all the latest info.