Bidmaron
October 31st, 2017, 04:30
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 (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=21257&d=1509419000)
The template for the story window "Templates" button is below:
<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>
Now that string resource is contained in the strings_campaign.xml file as:
<string name="story_button_templates">Templates</string>
Below is my generator.xml file that has the template for my button:
<?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>
It is included by my extension file:
<?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>
And that file also includes my string resources:[/COLOR]
<?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>
So I am just stymied not figuring out why my button doesn't have the word "Generators" in it. What am I missing?
Image1.png (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=21257&d=1509419000)
The template for the story window "Templates" button is below:
<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>
Now that string resource is contained in the strings_campaign.xml file as:
<string name="story_button_templates">Templates</string>
Below is my generator.xml file that has the template for my button:
<?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>
It is included by my extension file:
<?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>
And that file also includes my string resources:[/COLOR]
<?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>
So I am just stymied not figuring out why my button doesn't have the word "Generators" in it. What am I missing?