Firespider Posted May 31, 2023 Share Posted May 31, 2023 Hello, for some reason the panel slips when you switch from, for example, 1920x1080 to 1600x800, what's the problem? --///FIRESPIDER NEXON ROLEPLAY//// local sx,sy = guiGetScreenSize();--Képernyő felbontás lekérése. local MenuPoints = {00.35 ,00.20} panel = 1 local font = dxCreateFont('font.otf', 20, false, 'proof') or 'default' -- Egyedi font. color = tocolor(10, 20, 30, 255)-- Gomb szín local Anims = true addEventHandler("onClientRender", root, function() if (Anims) then if (panel == 1) then dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2], sx * 0.3, sy * 0.5, tocolor(50, 60, 70, 230)) -- Panel dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2], sx * 0.3, sy * 0.05, tocolor(20, 30, 40, 255)) -- Panel fejléc dxDrawText('Animációs panel', sx * (MenuPoints[1]) + 200, sy * (MenuPoints[2]) + 15, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 85, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/handsup -- Kezek felemelése.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 90, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 170, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/dance - 1 - 15 -- Tancolás.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 180, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 250, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/cpr -- Kompresszió.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 255, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 325, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/fall -- összeesés.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 335, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1] + 175, sy * MenuPoints[2] + 425, sx * 0.1, sy * 0.05, color1 or color) dxDrawText('Következő oldal.', MenuPoints[1] + 865, sy * MenuPoints[2] + 435, sx * 0.1, sy * 0.05, tocolor(255, 255, 255), 1, font) ButtonGlowing() -- [2. OLDAL] -- if (panel == 2) then dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2], sx * 0.3, sy * 0.5, tocolor(50, 60, 70, 230)) -- Panel dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2], sx * 0.3, sy * 0.05, tocolor(20, 30, 40, 255)) -- Panel fejléc dxDrawText('Animációs panel', sx * MenuPoints[1] + 200, sy * MenuPoints[2] + 15, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 85, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/crouch -- Leguggolás.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 90, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 170, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/wait -- várakozás.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 180, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 250, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/shake -- Várakozás.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 255, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 325, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/think -- gondolkozás.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 335, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1] + 175, sy * MenuPoints[2] + 425, sx * 0.1, sy * 0.05, color1 or color) dxDrawText('Következő oldal.', MenuPoints[1] + 865, sy * MenuPoints[2] + 435, sx * 0.1, sy * 0.05, tocolor(255, 255, 255), 1, font) ButtonGlowing() end if (panel == 3) then dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2], sx * 0.3, sy * 0.5, tocolor(50, 60, 70, 230)) -- Panel dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2], sx * 0.3, sy * 0.05, tocolor(20, 30, 40, 255)) -- Panel fejléc dxDrawText('Animációs panel', sx * MenuPoints[1] + 200, sy * MenuPoints[2] + 15, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 85, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/tired -- Lehajlás, elfáradás.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 90, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 170, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/idle -- Falnak neki dőlés.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 180, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 250, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/fixcar -- autó megjavítása.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 255, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) dxDrawRectangle(sx * MenuPoints[1], sy * MenuPoints[2] + 325, sx * 0.3, sy * 0.04, tocolor(10, 20, 30, 255)) dxDrawText('/what -- Értetlenkedés.', sx * MenuPoints[1] + 13, sy * MenuPoints[2] + 335, sx * 0.3, sy * 0.05, tocolor(255, 255, 255), 1, font) ButtonGlowing() end end end end ) Link to comment
FLUSHBICEPS Posted June 2, 2023 Share Posted June 2, 2023 MenuPoints table values are hardcoded ur using absolute positioning use relative positioning instead Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now