• Overriding the Q menu?
    10 replies, posted
^^ Is it possible? I not only want to disable it, but I want to make a complete new one(or remove everything(tabs, sections) but the skeleton/frame) and have it respond to when the player presses q for this game mode I'm planning on making. How would I go about doing it? And what are the requirements(As in, Is the menu completely drawn with code or are there images or something else required)?
garrysmod/garrysmod/gamemodes/sandbox/gamemode/spawnmenu
[b][url=wiki.garrysmod.com/?title=Gamemode.SpawnMenuOpen]Gamemode.SpawnMenuOpen [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] and return false at the end of the code and for close: [b][url=wiki.garrysmod.com/?title=Gamemode.OnSpawnMenuClose]Gamemode.OnSpawnMenuClose [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] (you don't have to return anything)
You could build it from base not sandbox and use the hooks leiftiger provided.
[lua]function GM:OnSpawnMenuOpen() return false end function GM:OnSpawnMenuClose() return false end function GM:SpawnMenuEnabled() return false end function GM:SpawnMenuOpen() return false end[/lua] Some examples.
You should just disable the Q menu and make a derma menu, like in most Stranded gamemodes.
Edit: should have just looked where the second post told me to go. But still I would like to know how to accomplish something like drag and drop. I don't want to disable it, I want to replace it with another kind of menu. I still need to figure out how to accomplish this. If someone could point me in the right direction, I would much appreciate it. Because I'm trying to make a menu that involves dragging and dropping images. Would I be better off making a derma menu?
Maybe make each thing an image button and when its pressed create a DFrame with the image in it and then it could be dragged. That's just an idea though.
[QUOTE=-TB-;26665146]Maybe make each thing an image button and when its pressed create a DFrame with the image in it and then it could be dragged. That's just an idea though.[/QUOTE] The problem with that is now it has no connection with the original menu, unless i can specify x,y coordinates? or something? would clicking on the image, then clicking somewhere else and the image would be moved to where i clicked also work? (kinda like a quick version of cut-paste)
Sorry, you need to Log In to post a reply to this thread.