Page 1 of 2 12 Last

Thread: Size Matters?

  1. #1

    Size Matters?

    I've noticed that in the SW3.3.1 Deluxe ruleset the Icons "change size" when the FG window is expanded. Yet in the Graphics files there seems to be only one size of icon.

    Anyone know how this feat of magic is accomplished? I'd like to get more real estate from the 3.5 ruleset editions and if I can shink and expand these icons it would be great!
    Aliens.... Go fig?

  2. #2
    phantomwhale's Avatar
    Join Date
    Aug 2007
    Location
    Melbourne, Australia
    Posts
    1,349
    You mean the tool icons on the right-hand side ?

    These are "windowreferencecontrols", which has the method setIcons to set it's unpressed and pressed state icons. When these controls have there size (static bounds) altered, the icons resize themselves accordingly.

    The magic for all of this is in desktopmanager.lua which was inherited from the original D20 ruleset so I'd imagine it was part of 3.5 too.
    I no longer develop for Smiteworks

  3. #3
    Not part of 3.5 unfortunately. and the "banners" if the screenisn't maximized, offers no extra room for spiffy new icons.
    Aliens.... Go fig?

  4. #4
    You're right that it *was* in the original d20 rules, though. Must have been taken out for some reason.
    Aliens.... Go fig?

  5. #5
    So how would you go about adding an icon? I know you haveto place the button on the icon dock (the sidebar) in desktop.lua but where do you place the code that actually places the graphic on the screen.

    I can currently get a "magic zone," in which when I click the button's response code comes out, but I'm missing the graphic component.

    Any help would be appreciated
    Aliens.... Go fig?

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,554
    Quote Originally Posted by S Ferguson
    So how would you go about adding an icon? I know you haveto place the button on the icon dock (the sidebar) in desktop.lua but where do you place the code that actually places the graphic on the screen.

    I can currently get a "magic zone," in which when I click the button's response code comes out, but I'm missing the graphic component.

    Any help would be appreciated
    The first 2 arguments in the DesktopManager.registerStackShortcut command in desktop.lua are the button name and the button down (pressed) name. These names are mapped to specific graphics files in graphics_sidebar.xml.

    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    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!

  7. #7
    And I assume it's the same for the Dock items as well?
    Aliens.... Go fig?

  8. #8
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,554
    Quote Originally Posted by S Ferguson
    And I assume it's the same for the Dock items as well?
    I'm not sure what you mean by "dock" items.

    The DesktopManager.registerStackShortcut is used to enable the smaller buttons in the top right of the sidebar (mod, init, etc.) and the larger more graphical buttons (story, images, etc.). It all depends on the actual .png image which is used as part of the registerStackShortcut command.

    Check out a few of the commands and the underlying graphics files to see how it is used.

    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    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!

  9. #9
    The DesktopManager has ".stack" and ".dock" routines. The first places an Icon in the top right hand "rectangle" bars like Lighting. The second controls the right hand panels like Personalities and Vehicles.

    I would like to add a button on the ".dock". Like I said before the space has a mouse hover mode, and you can even press the area for effect, but the icon itself isn't displaying.
    Aliens.... Go fig?

  10. #10
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,554
    Sorry, I've been cross-eyed before and never actually noticed the different "stack" and "dock". Essentially they are very similar:

    Code:
    DesktopManager.registerStackShortcut("button_light", "button_light_down", "Lighting", "lightingselection");
    
    DesktopManager.registerDockShortcut("button_vehicles", "button_vehicles_down", "Vehicles", "vehiclelist", "vehicle");
    With the definitions in desktopmanage.lua being:
    Code:
    registerStackShortcut(iconNormal, iconPressed, tooltipText, className, recordName, index)
    
    registerDockShortcut(iconNormal, iconPressed, tooltipText, className, recordName, useSubdock, index)
    The only difference is the addition of the "useSubdock" in the Dock related function.

    Both of these functions use iconNormal and iconPressed to define the graphic used. As mentioned above, these 2 names link to a physical graphics file in the graphics_sidebar.xml file. If all else fails do a search in files for "button_vehicles" to see where it is defined.

    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    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!

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in