-
October 31st, 2017, 04:30 #1
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Extension String Resource Failure
I am trying to add a button similar to the button on the right image in the Story window to the Tables window on the left. The button I have works when you press it, but the text is missing.
Image1.png
The template for the story window "Templates" button is below:
Code:<template name="button_storytemplate"> <button_text_sm> <anchored to="buttonanchor" width="80"> <top /> <left anchor="right" relation="relative" offset="5" /> </anchored> <state textres="story_button_templates" /> <script> function onButtonPress() Interface.openWindow("masterindex", "storytemplate"); end </script> </button_text_sm> </template>
Code:<string name="story_button_templates">Templates</string>
Code:<?xml version="1.0" encoding="iso-8859-1"?> <!-- Template and interface materials for generators. --> <root> <icon name="button_generators" file="button_generators.png" /> <!-- General --> <template name="button_generators"> <button_text_sm> <anchored to="buttonanchor" width="80"> <top /> <left anchor="right" relation="relative" offset="5" /> </anchored> <state textres="generator_button_templates" /> <script> function onButtonPress() Interface.openWindow("masterindex", "generators"); end </script> </button_text_sm> </template> </root>
Code:<?xml version="1.0" encoding="iso-8859-1"?> <root version="2.8" logo="button_generators.png"> <properties> <name>Generators</name> <version>0.1</version> <author>Bidmaron</author> <description>Adds functionality to the built-in tables of Fantasy Grounds and augments Story Templates with Generators having additional functionality</description> <!--<ruleset> <name>CoreRPG</name> <minrelease>3</minrelease> </ruleset>--> </properties> <announcement text="Generators - v0.1 for FG V3.3.3 CoreRPG ruleset by Bidmaron. \rCopyright 2016 Smiteworks USA, LLC." font="emotefont" icon="button_generators"/> <base> <includefile source="generator.xml" /> <!-- String resources --> includefile source="strings_super_table.xml" <!-- Extension loading script - writes info to chat window and contains custom code --> <script name="Tables_Plus" file="Tables Plus.lua" /> </base> </root>
Code:<?xml version="1.0" encoding="iso-8859-1"?> <!-- String resources for Super Table. --> <root> <string name="option_label_TABLEBEHAVIOR">Table Roll Behavior</string> <string name="option_val_chat_IA">Chat Animation</string> <string name="option_val_sync">No Animation</string> <string name="option_val_legacy">Legacy</string> <string name="column_separator">;</string> <string name="row_separator">
</string> <string name="roll_separator"></string> <string name="generator_button_templates">Generators</string> <!--error messages--> <string name="table_error_format_illegal">Font formatting cannot be used inside a frame, or table.</string> <string name="table_error_nested_format">Font formatting cannot be nested inside the same formatting.</string> <string name="repeat_missing_target">Multiple roll specification is missing subtable definition.</string> <string name="missing_endif">If statement missing the 'endif' terminator.</string> <string name="missing_loop">While statement missing the 'loop' statement.</string> <string name="missing_while_loop">Loop statement present without the while statement to start the loop.</string> <string name="missing_while_break">Break statement present without the while statement to start a loop.</string> <string name="missing_if_else">Else statement present without the if statement.</string> <string name="missing_if_endif">Endif statement present without the if statement.</string> <string name="roll_missing">Unable to locate the table or generator roll </string> <string name="unidentified_caller">Generator roll code invoked from an unidentified source.</string> <string name="roll_in_progress">Attempt to initiate another table or generator sequence when there is already a table or generator in progress.</string> <string name="bad_roll_status">Invalid status of table roll process.</string> </root>
Last edited by Bidmaron; October 31st, 2017 at 04:35.
-
October 31st, 2017, 04:48 #2
does /console show you any warnings?
is buttonanchor defined? is it possible its show Generators but way off in some corner?
-
October 31st, 2017, 04:50 #3
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
thanks for the look, damned, but the template is identical to the working one in the story window except for the window it chains to (which works) and the string resource called out for the button.
-
October 31st, 2017, 06:01 #4
you are anchoring to something called buttonanchor
if buttonanchor doesnt exist it has nothing to base its positioning on.
Code:<genericcontrol name="buttonanchor"> <anchored to="contentanchor" width="170" height="0"> <top anchor="bottom" offset="15" /> <left /> </anchored> </genericcontrol>
-
October 31st, 2017, 10:06 #5
Change the textres to a static text and see if it displays. If not, the problem is probably anchoring. If it does, then the problem is probably with the string resource (and we can continue).
I never claimed to be sane. Besides, it's more fun this way.
-
October 31st, 2017, 12:25 #6
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Ok I will give it a go. Seems like the button wouldn’t be there either if it were an anchoring problem but let me check.
-
October 31st, 2017, 12:39 #7
-
October 31st, 2017, 14:43 #8
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
It will be tonight if I get done with Halloween festivities in time.
-
October 31st, 2017, 16:26 #9Private 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!
-
October 31st, 2017, 17:02 #10
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Thanks. Will check but I am getting no console error on it so I think that was probably cut and paste error on my post. At work and cannot check until tonight.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks