Jump to content

[QUESTION] Where can I find a vertical dropdown menu?


thund3rbird23

Recommended Posts

Posted

Where can I find a simple vertical dropdown menu? Or just a tutorial how to do it?

I really did research before opened the topic but almost find nothing about dx menus.. all of them are guis not dx or just the find mouse cursor position thing.

Or what's the easiest way for a beginner to create a simple back colored (50% opacity) dx menu but I want to use arrows instead of mouse click... I mean up,down,right,left arrows for moving up, down, expand, close the menus and if I click to the for ex.: menu1 then expand the menu1 submenu and if I click to the submenu in the menu1 then output submenu1 in the chatbox (just for testing)

I hope you guys understand what I want to do. But HERE is an example

Posted

Thats tuff. you have to do some calculations, sadly i dont know i recommend adding a function
if Selected == "MenuNUM"
DX CODES
elseif Selected == "MenuInside" then
inside codes
end

  • Moderators
Posted
9 hours ago, thund3rbird23 said:

Can someone recommend something?

Dit you check out how adminpanel does it? (Vehicle select)

Posted
isOpen = false
function render()
-----OUTSIDE CODES
if Selected == "Menu1" then
----INSIDE CODES
elseif Selected == "Menu2" then
-----MENU2 INSIDE CODES
end
end

bindKey("F1","down",function()

    if isOpen == true then

    
        isOpen = false

        showCursor(false)

        removeEventHandler("onClientRender",root,render)


    else

   

        isOpen = true

        showCursor(true)
Selected = "Menu1"

        addEventHandler("onClientRender",root,render)
		
		
    end

end)

Not tested , try it.

Posted
On 01/10/2019 at 08:43, IIYAMA said:

Dit you check out how adminpanel does it? (Vehicle select)

That's a gui not dx and just a dropdown can't use arrows (up,down,right,left) and doesn't have submenu

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...