-
March 5th, 2017, 02:23 #1
reference to window element from a template->script?
I need to access the window "above" a template script I run. The template is a "ability score" template and has a script. That script has a onValueChanged to do something. During that process I'd like to tweak a tooltip up the chain in the window.
Sample ability score entry in the window
Code:<windowclass name="charsheet_main" > <sheetdata> <number_charabilityscore2 name="strength" source="abilities.strength.score" > <tooltip textres="char_tooltip_strength" /> <anchored offset="-10,30" width="45" height="45"/> <target>strength</target> </number_charabilityscore2> <label name=THISLABEL> </label> </sheetdata> </windowclass>
Code:<template name="number_charabilityscore2"> <number> <anchored to="statstitle" position="insidetopleft"/> <rollable /> <min>1</min> <max>25</max> <default>9</default> <font>arial-bold-12</font> <frame name="abilityscore_box" /> <script file="campaign/scripts/number_abilityscore.lua" /> </number> </template>
-
March 5th, 2017, 03:56 #2
Okay, so this turned out easier than I was making it... noob!
window.THISLABEL was how I could reference the variable from within the lua.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks