DICE PACKS BUNDLE
Page 12 of 34 First ... 2 10 11 12 13 14 22 ... Last
  1. #111

    Join Date
    Jun 2009
    Location
    France, near Paris
    Posts
    299
    The ruleset is layered on CoreRPG.

    I try to create an extension to make possible crossover campaign (vampire/werewolf 20th anniversary edition for now) but i do not know how to modify sheet dynamically... any idea ?

    EDIT : When i click on a player sheet in "character", i want the sheet change for vampire/werewolf and change all abilities, frame, icons, ...

    Thanks

  2. #112

    Join Date
    Jun 2009
    Location
    France, near Paris
    Posts
    299
    For now i have find how to change the picture of the sheet with "setFrame". But now (where it's difficult) is to change information inside the character sheet...

  3. #113

    Join Date
    Jun 2009
    Location
    France, near Paris
    Posts
    299
    Find another problem : When i close the sheet window and open it again, the sheet font come with the original font and not the new font ... any idea ?

  4. #114

    Join Date
    Jun 2009
    Location
    France, near Paris
    Posts
    299
    See my code :

    function onInit()
    if User.isHost() then
    registerMenuItem("Mage","charlist_base_mage",1);
    registerMenuItem("Vampire","charlist_base_vampire" ,2);
    registerMenuItem("WereWolf","charlist_base_werewol f",3);
    end
    end

    function onClickRelease(button, x, y)
    if button == 3 then
    Interface.openRadialMenu();
    return true;
    end
    end

    function onDoubleClick(x,y)
    local wnd = Interface.findWindow("charsheetmini_top", window.getDatabaseNode());
    if wnd then
    wnd.close();
    else
    wnd = Interface.openWindow("charsheetmini_top", window.getDatabaseNode());
    wnd.tabs.activateTab(1);
    end
    return true;
    end


    --Problème Here.
    function onMenuSelection(selection, subselection, subsubselection)
    if selection == 1 then
    window.setFrame("charsheet_mage");
    elseif selection == 2 then
    window.setFrame("charsheet_vampire");
    elseif selection == 3 then
    window.setFrame("charsheet_werewolf");
    end
    end
    Any Idea ?

  5. #115
    You should try setting the frame to each one in the onInit call to make sure that the frames are valid and that you are applying to the right window.

    My first guess is that frames are not defined correctly, or the wrong window object is getting the new frame.

    Regards,
    JPG

  6. #116

    Join Date
    Jun 2009
    Location
    France, near Paris
    Posts
    299
    thanks for your reply

  7. #117

    Join Date
    Jun 2009
    Location
    France, near Paris
    Posts
    299
    There is a setLabel funcrion or not please ? Thanks.

  8. #118

    Join Date
    Jun 2009
    Location
    France, near Paris
    Posts
    299
    See my code :

    <labeledstring name="placeofembrace">
    <anchored>
    <to>playerframe</to>
    <position>insidetopleft</position>
    <offset>15,70</offset>
    <size>
    <width>120</width>
    <height>20</height>
    </size>
    </anchored>
    <label>place of embrace</label>
    <tabtarget>
    <next>concept</next>
    <prev>generation</prev>
    </tabtarget>
    </labeledstring>
    I want to change the "label" text dynamicaly, thanks.

  9. #119
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    34,731
    Quote Originally Posted by earthworm3 View Post
    I want to change the "label" text dynamicaly, thanks.
    Assuming the template you are using inherits textbasecontrol you can use setValue: https://www.fantasygrounds.com/refdo...l.xcp#setValue
    FG Wiki: How to Compile the FG Logs

    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!

  10. #120
    I think labeled string is a custom template. You'd have to review the template to see if the label can be set programmatically. I think it's in CoreRPG.

    Regards,
    JPG

Page 12 of 34 First ... 2 10 11 12 13 14 22 ... Last

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
  •  
Refer a Friend

Log in

Log in