Xarxus
August 27th, 2023, 16:49
I'd like to modify charselect_host and charselect_client (campaign_chars.xml)
to force list_iadd to do something I want. So I've prepared a campaign_chars.xml version and used merge="join".
<windowclass name="charselect_host" merge="join">
<sheetdata>
<button_iadd name="list_iadd">
<anchored to="rightanchor">
<top />
<right anchor="left" relation="relative" offset="-5" />
</anchored>
<class>charsheet</class>
<script>
function onInit()
Debug.console("onInit")
end
function onButtonPress()
Debug.console("onButtonPress", window.getDatabaseNode());
end
</script>
</button_iadd>
</sheetdata>
</windowclass>
<windowclass name="charselect_client" merge="join">
<sheetdata>
<button_iadd name="list_iadd">
<anchored to="rightanchor">
<top />
<right anchor="left" relation="relative" offset="-5" />
</anchored>
<class>charsheet</class>
<script>
function onInit()
Debug.console("onInit")
end
function onButtonPress()
Debug.console("onButtonPress", window.getDatabaseNode());
end
</script>
</button_iadd>
</sheetdata>
</windowclass>
When i test this code I've the right messages in console, but it alsto creates a new
entry inside the charsheet tag. I guess is done by the old code
...
local node = DB.createChild(window.getDatabaseNode());
...
Surely merge="join" isn't right, so tried a combination of replace, merge and whatsover,
even on
<button_iadd name="list_iadd"> without any success.
How can I do it?
to force list_iadd to do something I want. So I've prepared a campaign_chars.xml version and used merge="join".
<windowclass name="charselect_host" merge="join">
<sheetdata>
<button_iadd name="list_iadd">
<anchored to="rightanchor">
<top />
<right anchor="left" relation="relative" offset="-5" />
</anchored>
<class>charsheet</class>
<script>
function onInit()
Debug.console("onInit")
end
function onButtonPress()
Debug.console("onButtonPress", window.getDatabaseNode());
end
</script>
</button_iadd>
</sheetdata>
</windowclass>
<windowclass name="charselect_client" merge="join">
<sheetdata>
<button_iadd name="list_iadd">
<anchored to="rightanchor">
<top />
<right anchor="left" relation="relative" offset="-5" />
</anchored>
<class>charsheet</class>
<script>
function onInit()
Debug.console("onInit")
end
function onButtonPress()
Debug.console("onButtonPress", window.getDatabaseNode());
end
</script>
</button_iadd>
</sheetdata>
</windowclass>
When i test this code I've the right messages in console, but it alsto creates a new
entry inside the charsheet tag. I guess is done by the old code
...
local node = DB.createChild(window.getDatabaseNode());
...
Surely merge="join" isn't right, so tried a combination of replace, merge and whatsover,
even on
<button_iadd name="list_iadd"> without any success.
How can I do it?