FG Spreadshirt Swag
  1. #1

    Remove buttons from the Desktop (top right - Effects)

    Folks,

    Is there a nice easy way for me to remove the 'Effects' button (shown top right on the desktop).

    I can see that CoreRPG creates the node and shares it public. For Traveller I won't be using them so would like to remove the button.

    Cheers,
    Col
    Ruleset and much more content built for FGU.
    Come join me on Twitter at: https://twitter.com/MadBeardMan to see what I'm up to!

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Look at scripts\data_desktop.lua - this sets up the various buttons in buildDesktop - which uses the aCoreDesktopStack table to build the little buttons in the top right.
    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. #3
    Quote Originally Posted by Trenloe View Post
    Look at scripts\data_desktop.lua - this sets up the various buttons in buildDesktop - which uses the aCoreDesktopStack table to build the little buttons in the top right.
    Yes and looked and you have to copy a lot of the code, plus when I added the basic code it doubled up the buttons.
    Ruleset and much more content built for FGU.
    Come join me on Twitter at: https://twitter.com/MadBeardMan to see what I'm up to!

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Try just overriding Desktop.aCoreDesktopStack in your ruleset. You don't need to replicate any of the code.
    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!

  5. #5
    Quote Originally Posted by Trenloe View Post
    Look at scripts\data_desktop.lua - this sets up the various buttons in buildDesktop - which uses the aCoreDesktopStack table to build the little buttons in the top right.
    Ok I just copied data_desktop into my folder, renamed it 'data_desktop_traveller.lua' and in base.xml added:

    <script name="Desktop" file="scripts/data_desktop_traveller.lua" />

    I'm not a fan of overriding stuff like this incase it all gets changed, so I hoped there was a one/two line command to remove the button rather than overriding the entire build desktop function.

    However it now doesn't show the button, so that's fine if this is the correct way to remove buttons.

    Cheers,
    Col
    Ruleset and much more content built for FGU.
    Come join me on Twitter at: https://twitter.com/MadBeardMan to see what I'm up to!

  6. #6
    Quote Originally Posted by Trenloe View Post
    Try just overriding Desktop.aCoreDesktopStack in your ruleset. You don't need to replicate any of the code.
    That does nothing.

    File is called 'desktop_traveller2.lua' holds on the aCoreDesktopStack

    In base.xml

    <script name="DesktopTraveller" file="scripts/data_desktop_traveller2.lua" />

    Tried /reload and quitting/reloading and the FX button still exists.

    Cheers,
    Col
    Ruleset and much more content built for FGU.
    Come join me on Twitter at: https://twitter.com/MadBeardMan to see what I'm up to!

  7. #7
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    If you have the Savage Worlds ruleset, look in scripts\data_desktop_sw.lua for an example of overriding Desktop.aCoreDesktopStack
    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. #8
    Quote Originally Posted by Trenloe View Post
    If you have the Savage Worlds ruleset, look in scripts\data_desktop_sw.lua for an example of overriding Desktop.aCoreDesktopStack
    I do, looked at SW and found out earlier when doing WOiN that it does a lot of overriding of things, thanks for the help. I'll solve this, just finding all the little things take all the time!

    Cheers,
    Col
    Ruleset and much more content built for FGU.
    Come join me on Twitter at: https://twitter.com/MadBeardMan to see what I'm up to!

  9. #9
    Quote Originally Posted by Trenloe View Post
    If you have the Savage Worlds ruleset, look in scripts\data_desktop_sw.lua for an example of overriding Desktop.aCoreDesktopStack
    Bingo! Worked a treat, very minimalist which I like:

    Code:
    -- 
    -- Please see the license.html file included with this distribution for 
    -- attribution and copyright information.
    --
    
    function onInit()
    	Desktop.aCoreDesktopStack["host"] = aCoreDesktopStack["host"];
    	Desktop.aCoreDesktopStack["client"] = aCoreDesktopStack["client"];
    end
    
    aCoreDesktopStack = 
    {
    	["local"] = 
    	{
    		{
    			icon="button_color",
    			icon_down="button_color_down",
    			tooltipres="sidebar_tooltip_colors",
    			class="pointerselection",
    		},
    	},
    	["host"] =
    	{
    		{
    			icon="button_ct",
    			icon_down="button_ct_down",
    			tooltipres="sidebar_tooltip_ct",
    			class="combattracker_host",
    			path="combattracker",
    		},
    		{
    			icon="button_partysheet",
    			icon_down="button_partysheet_down",
    			tooltipres="sidebar_tooltip_ps",
    			class="partysheet_host",
    			path="partysheet",
    		},
    		{
    			icon="button_calendar",
    			icon_down="button_calendar_down",
    			tooltipres="sidebar_tooltip_calendar",
    			class="calendar",
    			path="calendar",
    		},
    		{
    			icon="button_color",
    			icon_down="button_color_down",
    			tooltipres="sidebar_tooltip_colors",
    			class="pointerselection",
    		},
    		{
    			icon="button_light",
    			icon_down="button_light_down",
    			tooltipres="sidebar_tooltip_lighting",
    			class="lightingselection",
    		},
    		{
    			icon="button_options",
    			icon_down="button_options_down",
    			tooltipres="sidebar_tooltip_options",
    			class="options",
    		},
    		{
    			icon="button_modifiers",
    			icon_down="button_modifiers_down",
    			tooltipres="sidebar_tooltip_modifiers",
    			class="modifiers",
    			path="modifiers",
    		},
    	},
    	["client"] =
    	{
    		{
    			icon="button_ct",
    			icon_down="button_ct_down",
    			tooltipres="sidebar_tooltip_ct",
    			class="combattracker_client",
    			path="combattracker",
    		},
    		{
    			icon="button_partysheet",
    			icon_down="button_partysheet_down",
    			tooltipres="sidebar_tooltip_ps",
    			class="partysheet_client",
    			path="partysheet",
    		},
    		{
    			icon="button_calendar",
    			icon_down="button_calendar_down",
    			tooltipres="sidebar_tooltip_calendar",
    			class="calendar",
    			path="calendar",
    		},
    		{
    			icon="button_color",
    			icon_down="button_color_down",
    			tooltipres="sidebar_tooltip_colors",
    			class="pointerselection",
    		},
    		{
    			icon="button_modifiers",
    			icon_down="button_modifiers_down",
    			tooltipres="sidebar_tooltip_modifiers",
    			class="modifiers",
    			path="modifiers",
    		},
    		{
    			icon="button_options",
    			icon_down="button_options_down",
    			tooltipres="sidebar_tooltip_options",
    			class="options",
    		},
    	},
    };
    Cheers chap, all done. Now time for dinner.

    Back later to finish up the final few things....
    Ruleset and much more content built for FGU.
    Come join me on Twitter at: https://twitter.com/MadBeardMan to see what I'm up to!

  10. #10
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Nice one!
    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)

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 Character Create Playlist

Log in

Log in