• derma menu
    2 replies, posted
hey! im making a job npc and i made the basic layout i want to use(placed the icons and buttons) but when my friends used the npc the buttons were in different spots for him. his screen size was different. how can i make my menu look the same on all screens? i tryed making a frame with a background panel inside it and i put everything in that panel but things still move around. the frame and the background stays in the same place for any screen size but the buttons in the background panel move around for different screens
since my demonic Acecool Summoncircle didn't work i'll try it that way [lua]function SummonAcecool(_,_,_, tutorial) if !tutorial then return end; return "John 'Acecool' Moser" end lua_run SummonAcecool(0,1,0, vgui_scaling)[/lua] HAH! IT WORKS! so enought with the jokes. [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/vgui/understanding_hardcoding_of_screensizes.lua.html[/url] This is basicly the ground idea of Scaling VGUI. It should practise the ground understandings of it. Also when you change your resolution, sometimes the VGUI won't scale correctly. But don't worry. Even for that he got an tutorial. [QUOTE=Acecool]I also wrote a few other things to help with updating code on resolution changed; the hook, PlayerChangedResolution, is in my dev-base. Here it is again for you: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_hooks/acecool_hook_playerchangedresolution/gm_playerchangedresolution.lua[/url] Example usage: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_hooks/acecool_hook_playerchangedresolution/example_usage.lua[/url][/QUOTE]
[QUOTE=Tomelyr;46247464]since my demonic Acecool Summoncircle didn't work i'll try it that way [lua]function SummonAcecool(_,_,_, tutorial) if !tutorial then return end; return "John 'Acecool' Moser" end lua_run SummonAcecool(0,1,0, vgui_scaling)[/lua] HAH! IT WORKS! so enought with the jokes. [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/vgui/understanding_hardcoding_of_screensizes.lua.html[/url] This is basicly the ground idea of Scaling VGUI. It should practise the ground understandings of it. Also when you change your resolution, sometimes the VGUI won't scale correctly. But don't worry. Even for that he got an tutorial.[/QUOTE] YAY ACECOOL STRIKES AGAIN! [editline]16th October 2014[/editline] [CODE]if ScrW() > 640 then -- Make it larger if we can. wrap:SetSize( ScrW()*0.9, ScrH()*0.9 ) else wrap:SetSize( 640, 480 ) end[/CODE] method im using now was not very good i guess
Sorry, you need to Log In to post a reply to this thread.