Thread: Hacking a Theme
-
September 29th, 2020, 17:34 #111
I just tried this extension, and on my system (FGU,) the button is still there orphaned on the right-hand side!
Updating to see if anything in the Ruleset, or otherwise, has changed.
Update: Nope! Still there. (I've been battling this little guy for days now. It appears that there is a separate window(_class?) created for THIS particular Icon. I know that is inserted into the Stack special, because of THIS code in data_desktop_SFRPG.lua (using regsiterStackShortcut2 instead of registerStackShorcut.) However, I think this has NOTHING to do with the graphics.
Code:if User.isHost() then DesktopManager.registerStackShortcut2("button_shipct", "button_shipct_down", "sidebar_tooltip_shipct", "ct_ship_combat","combattracker"); else DesktopManager.registerStackShortcut2("button_shipct", "button_shipct_down", "sidebar_tooltip_shipct", "shipcombattracker_client","combattracker"); end
Maybe superteddy57, you could enlighten us on any graphic changes (panels, frames, icons, windows) that you made to implement this button?Last edited by Tuleen Donai; September 29th, 2020 at 17:51.
-
September 29th, 2020, 17:40 #112
-
September 29th, 2020, 17:49 #113
Only initially. If you click the "red" area, it will bring up the library, and then click on Create PC or something, and they straighten out decently.
I think there is an initialization problem (or lack thereof) with this extension too. But, battling the Shipct button first.
-
September 29th, 2020, 18:28 #114
DesktopManager.registerStackShortcut2 is basically just that, a register to add the Ship CT button to the top stack when it runs through and creates those buttons under normal situations. There isn't any special code I used to get it added to the top stack. I used a function from the DesktopManager (something housed in CoreRPG) that helps create additional buttons. I'm not sure how this extension works, but what I would suggest is killing my register and then simply creating a new button with the parameters from the register to allow the button to work as any other sidebar button would work. This is how I would approach this fix, if I were the developer of the extension.
Dominic Morta
Ruleset Developer
Smiteworks
How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it
How to provide an Unity Connection issue?-Connection Issues and What to Provide
Unity Updater issue?-Updater Issues
Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained
Comcast or Cox ISP User?-Comcast XFinity and Cox Users
Have a suggestion?-Feature Request
-
September 29th, 2020, 19:00 #115
Hey! Thanks for the insight! I had started coming to that conclusion myself. I actually went into the SFRPG ruleset, and commented out this code, just to see how the system would react. The button disappeared as expected, and there was no longer an empty slot over in the stack attached to the chat window, however ...
An interesting observation is that the original "window" for the Stack and Shortcut buttons IS STILL there! Albeit, resized to the width of the newly redefined buttons. I think that if I can eliminate that window all together, perhaps when I put back the ShipCt button (register,) it will magically show up where it's supposed to! A bit of a long shot, I know.
-
September 29th, 2020, 23:59 #116
Shouldn't this de-register it?
Code:DesktopManager.removeStackShortcut("combattracker");
-
September 30th, 2020, 01:44 #117Code:
function onInit() for k,v in pairs(aDataModuleSet) do for _,v2 in ipairs(v) do Desktop.addDataModuleSet(k, v2); end end CharacterListManager.registerDropHandler("shortcut", onShortcutDropOverride); end
Dominic Morta
Ruleset Developer
Smiteworks
How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it
How to provide an Unity Connection issue?-Connection Issues and What to Provide
Unity Updater issue?-Updater Issues
Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained
Comcast or Cox ISP User?-Comcast XFinity and Cox Users
Have a suggestion?-Feature Request
-
September 30th, 2020, 16:19 #118
OK. So, please help me to understand. In his extension, he has a script that defines - init_desktop.lua:
Code:function onInit() DesktopManager.showDockTitleText(false); DesktopManager.setStackIconSizeAndSpacing(28, 28, 0, 0); DesktopManager.setDockIconSizeAndSpacing(28, 28, 0, 0); DesktopManager.setUpperDockOffset(0, 0, 0, 0); DesktopManager.setStackOffset(0, 0, 0, 0); DesktopManager.setLowerDockOffset(1, 0, 0, 0); DesktopManager.setMaxDockColumns(1); end
Code:function onInit() for k,v in pairs(aDataModuleSet) do for _,v2 in ipairs(v) do Desktop.addDataModuleSet(k, v2); end end CharacterListManager.onShortcutDrop = onShortcutDropOverride; CharacterListManager.registerDropHandler("shortcut", onShortcutDropOverride); if User.isHost() then DesktopManager.registerStackShortcut2("button_shipct", "button_shipct_down", "sidebar_tooltip_shipct", "ct_ship_combat","shipcombattracker", false); else DesktopManager.registerStackShortcut2("button_shipct", "button_shipct_down", "sidebar_tooltip_shipct", "shipcombattracker_client","shipcombattracker", false); end end
[9/30/2020 8:31:45 AM] [<color="red">ERROR</color>] Script execution error: [string "scripts/init_desktop.lua"]:13: bad argument #1 to 'pairs' (table expected, got nil)
I've actually tried a number of things trying to affect the Desktop and it's definition, like Modifying the SFRPG ruleset - specifically the onInit() and removing the DesktopManager.registerStackShortcut2 calls. This definitely made the Shipct icon comepletely disappear, but it DID NOT make the frame/window over on the right side that used to contain the Dock and Stack disappear - it's still there.
If I move the code to add Shipct to the Stack somewhere else (like into his extension in onInit() ), it just behaves EXACTLY the same way, and leaves the Shipct Icon over in the frame/window to the right.
-- "Dug in like an Alabama tick!"
So, my goal is to resolve these two things:
* Eliminate that frame/window to the right
* add in the Shipct button to the Stack, so that it moves with the other Stack Icons, like we'd expect.
Last Goal:
* Get the desktop to initialize properly, so that you DON'T have to go to the Library and click on a Stack selection to get the Icons to display correctly.Last edited by Tuleen Donai; September 30th, 2020 at 16:32.
-
September 30th, 2020, 16:28 #119
disregard, didn't work that well
Last edited by bmos; September 30th, 2020 at 16:57.
-
September 30th, 2020, 16:57 #120
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks