Hi!
Since my project won't use any of the typical *A-Stuff, i need to get rid of all the remains of it in the GUI.
From what I found, I managed to remove the resbar and write my own tool-tip-function, but not the commandmenu.
I wrote my own Menus with OGL-Functions (see attached) but the original menu is still bothering me.
I don't want to remove specific buttons, but the complete menu or just place it at another location.
(Alternativly I could use a completely empty Chili, but it seems to be much faster to write it all from scratch than to wait for it to be released)
How to get rid of default-controls?
Moderator: Moderators
Re: How to get rid of default-controls?
You can do it through a widget (and thus likely possible in the handler itself if your mod overrides it):
Probably requires 'handler=true' in widget:GetInfo. Also I don't think the code works if you put it in :Initialize (thus why it is in :GameFrame)
Code: Select all
function widget:GameFrame(n)
local function DummyHandler(xIcons, yIcons, cmdCount, commands)
widgetHandler.commands = commands
widgetHandler:CommandsChanged()
return "", xIcons, yIcons, {}, {}, {}, {}, {}, {}, {}, {[9999]=1} -- Without the entry in table, we get odd behavior such as not being able to rotate buildings
end
widgetHandler:ConfigLayoutHandler(DummyHandler)
Spring.ForceLayoutUpdate()
widgetHandler:RemoveWidgetCallIn('GameFrame', self)
end
Re: How to get rid of default-controls?
Yep, that did it!
I added it to the resbar-remove-widget in the Initialize-Part (works). The crucial point was to add the handler=true (whatever it means) as suggested by you.
Thanks to the keyword I also found this, which looks like there is already a dummyhandler (But without the last table-entry).
Thanks, dude!
I added it to the resbar-remove-widget in the Initialize-Part (works). The crucial point was to add the handler=true (whatever it means) as suggested by you.
Thanks to the keyword I also found this, which looks like there is already a dummyhandler (But without the last table-entry).
Thanks, dude!