DICE PACKS BUNDLE
Page 2 of 2 First 12

Thread: ct_entry.lua

  1. #11
    But I also would like to add some new buttongroups into the combattracker, and I think the ct_host.xml is where to add them.
    So I'd need to encapsulate my new buttongroups in the /sheetdata tags wouldn't I?
    And when I use the sheetdata tags alongside the merge="join" that's when my problems start :P

    XML is so new to me, it's very frustrating.
    I must be barking up the wrong tree I think.

    Cheers, Steve.

  2. #12
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,407
    OK, so you want to add new stuff into the GUI.

    So, just include the changes that you want. Don't include the original controls - this is what is breaking the original control functionality.

    Use the insertbefore="<control name>" as part of your merged windowclass.

    For example, if you want to ibnsert a string control in the ct_entry XML before the control called "nonid_name" then use the following:


    Code:
    <windowclass name="ct_entry" merge="join">
    	<script file="ct/scripts/new_ct_entry.lua" />
    		<sheetdata>
    			<stringcontrol name="my_new_control" insertbefore="nonid_name">
    				{stuff you need in your new control}
    			</stringcontrol>
    		</sheetdata>
    </windowclass>
    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!

  3. #13
    Ok, so wierdness is happening (or at least seems weird to me)
    If I leave in the sheetdata tags with nothing inside and have the merge="join" in, then everything works.
    If I leave EVERYTHING in place as per the original xml file and have merge="join", the react button stops working.
    I have no idea what is going on there, but it *may* work out for me, if I am able to just add my new controls inside the new 'blank' sheetdata tags.

  4. #14
    Lol, I think I just posted about what you did, around the same time

    Thanks again for your input Trenloe, you've been a massive help again.

    Cheers, Steve.

  5. #15
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,407
    Quote Originally Posted by Stv View Post
    If I leave EVERYTHING in place as per the original xml file and have merge="join", the react button stops working.
    This is because you are merging the controls with the same name as the original controls on top of each other. Adding a layer for each control. So you'd then have to look at each of the original controls and see if they would need super code to make them work properly.

    Quote Originally Posted by Stv View Post
    If I leave in the sheetdata tags with nothing inside and have the merge="join" in, then everything works.
    If you have a blank sheetdata tag then you're not merging anything new and the original controls remain as is (no super reference) and their original code works too.

    Moral of the story - only "merge" things that or new or that are changing.
    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!

  6. #16
    Guess what, more XML related (probably stupid) questions


    I need to change a value in template_ct.xml. But the data in this xml file is not in a windowclass, it's in a template.
    Does merge="join" work for templates also, or would I just overwrite the full template in a sperate xml file and keep the same template name ?

    Cheers, Steve.

  7. #17
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,407
    Yes you can merge templates. The syntax is slightly different.

    Info on templates, and template merging, here: https://fantasygroundsunity.atlassia...or+code+re-use
    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!

  8. #18
    Awesome, thanks for the quick reply and the link.

    Cheers, Steve.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Product Walkthrough Playlist

Log in

Log in