-
November 15th, 2016, 02:21 #1
[DCCRPG] Equipment Module Records with Strange Display Issue
I added a Damage Type field for items, and I have made the desired changes to ref_equipment for module files. I am seeing this weird overlapping display of the Damage Type label when no data is entered for damage type. The field uses the string_columnh template (defined in CoreRPG), which means that the field should be hidden when no data is present. If I change it to string_column, it displays properly (no overlap) but is not hidden. Here is a snipped of the ref_equipment code and module file entries...
ref_equipment
Code:<windowclass name="ref_weapon_stats"> <script> function onInit() type_label.setValue("[" .. type.getValue() .. "; " .. subtype.getValue() .. "]"); end </script> <sheetdata> <anchor_column name="columnanchor" /> <hs name="type" /> <hs name="subtype" /> <label_column name="type_label"> <anchored> <top relation="relative" offset="7" /> </anchored> <font>reference-b-large</font> </label_column> <line_column /> <label_column name="cost_label"> <static textres="ref_label_cost" /> </label_column> <string_column_left name="cost"> <readonly /> </string_column_left> <label_column_right name="weight_label"> <anchored to="cost" /> <static textres="ref_label_weight" /> </label_column_right> <number_column_right name="weight"> <anchored to="cost" /> <readonly /> </number_column_right> <line_column /> <label_column name="damage_label"> <static textres="ref_label_damage" /> </label_column> <string_column name="damage"> <readonly /> </string_column> <label_column name="dmgtype_label"> <static textres="ref_label_dmgtype" /> </label_column> <string_column name="damagetype"> <readonly /> </string_column> <label_column name="range_label"> <static textres="ref_label_range" /> </label_column> <number_columnh name="range"> <readonly /> </number_columnh> <line_column name="line_desc"/> <ft_columnh name="description"> <separator>line_desc</separator> <readonly /> </ft_columnh> </sheetdata> </windowclass>
Code:<weapon> <battleaxe> <name type="string">Battleaxe</name> <cost type="string">7 gp</cost> <damage type="string">1d10</damage> <range type="number">0</range> <type type="string">Weapon</type> <description type="formattedtext">content removed</description> </battleaxe> <blackjack> <name type="string">Blackjack</name> <cost type="string">3 gp</cost> <damage type="string">1d3/2d6</damage> <damagetype type="string">Nonlethal</damagetype> <range type="number">0</range> <type type="string">Weapon</type> <description type="formattedtext">content removed</description> </blackjack> <dagger> <name type="string">Dagger</name> <cost type="string">3 gp</cost> <damage type="string">1d4/1d10</damage> <range type="number">10</range> <type type="string">Weapon</type> <description type="formattedtext">content removed</description> </dagger>
Attachment 16352
This one displays properly, but only by chance...
Attachment 16353
-
November 15th, 2016, 02:25 #2
The code above has string_column for "damagetype" - here is the alternative form using string_columnh, in case it's not obvious...
Code:<label_column name="dmgtype_label"> <static textres="ref_label_dmgtype" /> </label_column> <string_columnh name="damagetype"> <readonly /> </string_columnh>
-
November 15th, 2016, 03:56 #3
You need to call the control the same name as the label minus "_label". So should be "dmgtype" not "damagetype".
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
November 15th, 2016, 12:51 #4
That did it - thank you Trenloe!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks