PDA

View Full Version : CoreRPG Combobox improvement request



Mephisto
February 1st, 2022, 10:37
Hi there,
I worked a bit lately with the combobox and I would like to make an improvement request. The combobox is created via lua scripting adding a "down"-arrow for displaying the item list. When the combobox is being set to be invisible, the "cbbutton" will stay visible unless taken care of by a lua script, i.e. something like this:



weapon_dmg_ability.setVisible(false)
weapon_dmg_ability_cbbutton.setVisible(false)


It would be great if the combobox lua script would take care of this automatically similar to how "column"-templates take care of their respective labels. That would clean up the layering ruleset code a bit. :)

superteddy57
February 1st, 2022, 10:49
Hi there,
I worked a bit lately with the combobox and I would like to make an improvement request. The combobox is created via lua scripting adding a "down"-arrow for displaying the item list. When the combobox is being set to be invisible, the "cbbutton" will stay visible unless taken care of by a lua script, i.e. something like this:



weapon_dmg_ability.setVisible(false)
weapon_dmg_ability_cbbutton.setVisible(false)


It would be great if the combobox lua script would take care of this automatically similar to how "column"-templates take care of their respective labels. That would clean up the layering ruleset code a bit. :)

setComboBoxVisible
CoreRPG\common\scripts\combox.lua

There are other great lua functions in that file as well that will help you script up combo boxes.

Mephisto
February 1st, 2022, 10:54
Amazing! I wish there was a list of CoreRPG templates, their intended purpose and the mechanisms in the wiki. :-)

superteddy57
February 1st, 2022, 10:59
This is the link to the developer guide on the wiki
https://fantasygroundsunity.atlassian.net/wiki/spaces/FGCP/pages/996644535/Developer+Guide+-+Ruleset+API+Reference

As for the CoreRPG templates, you will have to look in the code of CoreRPG for their use. As mentioned with the combobox, there are many functions that are at the highest level of the control that you can access if you have the control itself in the script. So then you can make calls to them. Another famous one is the tabs_recordsheet control that shows and is a neat bridge for subwindows. So it's a matter of finding a control you would want to use and then drill down and see all of the parts.