Samarex
January 7th, 2016, 09:41
Question, Can you have more than 1 mini sheet branch off the main Sheet.
I am tryin to add a Ship minisheet to my main character sheet.
I got the button on there and have all the sheets as xml's for the ship but
the button keeps opening the main minisheet. there named differemt but cant seem to see where the button
knows what to open
<template name="button_charmini">
<windowreferencecontrol>
<icon normal="button_minisheet" pressed="button_minisheet_down" />
<class>charsheetmini</class>
<tooltip textres="char_label_minisheet" />
<description field="name" />
<script>
function onClickRelease(button, x, y)
local w = activate();
if w then
local tabindex = window.tabs.getIndex();
if tabindex == 1 or tabindex == 2 or tabindex == 6 then
w.tabs.activateTab(1);
elseif tabindex == 3 or tabindex == 4 then
w.tabs.activateTab(2);
elseif tabindex == 5 then
w.tabs.activateTab(3);
elseif tabindex == 7 then
w.tabs.activateTab(4);
end
end
return true;
end
</script>
</windowreferencecontrol>
</template>
<template name="button_charship">
<windowreferencecontrol>
<icon normal="button_miniship" pressed="button_miniship_down" />
<class>charsheetship</class>
<tooltip textres="char_label_minisheet" />
<description field="name" />
<script>
function onClickRelease(button, x, y)
local w = activate();
if w then
local tabindex = window.tabs.getIndex();
if tabindex == 1 or tabindex == 2 or tabindex == 6 then
w.tabs.activateTab(1);
elseif tabindex == 3 or tabindex == 4 then
w.tabs.activateTab(2);
elseif tabindex == 5 then
w.tabs.activateTab(3);
elseif tabindex == 7 then
w.tabs.activateTab(4);
end
end
return true;
end
</script>
</windowreferencecontrol>
</template>
I am tryin to add a Ship minisheet to my main character sheet.
I got the button on there and have all the sheets as xml's for the ship but
the button keeps opening the main minisheet. there named differemt but cant seem to see where the button
knows what to open
<template name="button_charmini">
<windowreferencecontrol>
<icon normal="button_minisheet" pressed="button_minisheet_down" />
<class>charsheetmini</class>
<tooltip textres="char_label_minisheet" />
<description field="name" />
<script>
function onClickRelease(button, x, y)
local w = activate();
if w then
local tabindex = window.tabs.getIndex();
if tabindex == 1 or tabindex == 2 or tabindex == 6 then
w.tabs.activateTab(1);
elseif tabindex == 3 or tabindex == 4 then
w.tabs.activateTab(2);
elseif tabindex == 5 then
w.tabs.activateTab(3);
elseif tabindex == 7 then
w.tabs.activateTab(4);
end
end
return true;
end
</script>
</windowreferencecontrol>
</template>
<template name="button_charship">
<windowreferencecontrol>
<icon normal="button_miniship" pressed="button_miniship_down" />
<class>charsheetship</class>
<tooltip textres="char_label_minisheet" />
<description field="name" />
<script>
function onClickRelease(button, x, y)
local w = activate();
if w then
local tabindex = window.tabs.getIndex();
if tabindex == 1 or tabindex == 2 or tabindex == 6 then
w.tabs.activateTab(1);
elseif tabindex == 3 or tabindex == 4 then
w.tabs.activateTab(2);
elseif tabindex == 5 then
w.tabs.activateTab(3);
elseif tabindex == 7 then
w.tabs.activateTab(4);
end
end
return true;
end
</script>
</windowreferencecontrol>
</template>