Hallo Community,
ich habe mal eine kleine Frage, undzwar:
Ich möchte ein Stream-Auswahl-Menü machen mit dxDraw, jedoch weiß ich nicht, wie ich das Scripte, dass etwas passiert wenn ich auf ein Image clicke .
Hier mal mein Code, weil ich es ja letztendlich darauf anwenden möchte
P.S: Nein, ich möchte nicht das ihr meine Arbeit übernehmt, ich möchte lediglich ein kleines Beispiel
Danke schonmal
Client Script
Lua
local dxvar = 0
function dxDrawSound()
local sx,sy = guiGetScreenSize()
local px,py = 1680,1050
local x,y = (sx/px), (sy/py)
dxDrawRectangle(x*383, y*652, x*847, y*482, tocolor(2, 1, 1, 255), true)
dxDrawImage(x*349, y*597, x*904, y*524, ":images/rahmen.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
dxDrawText("Housetime", x*429, y*428, x*820, y*466, tocolor(255, 255, 255, 255), 1.50, "default-bold", "left", "center", false, false, true, false, false)
dxDrawText("Technobase", x*428, y*286, x*819, y*324, tocolor(255, 255, 255, 255), 1.50, "default-bold", "left", "center", false, false, true, false, false)
dxDrawText("Trancebase", x*428, y*357, x*819, y*395, tocolor(255, 255, 255, 255), 1.50, "default-bold", "left", "center", false, false, true, false, false)
dxDrawText("Hardbase", x*429, y*531, x*820, y*569, tocolor(255, 255, 255, 255), 1.50, "default-bold", "left", "center", false, false, true, false, false)
dxDrawText("Coretime", x*429, y*604, x*820, y*642, tocolor(255, 255, 255, 255), 1.50, "default-bold", "left", "center", false, false, true, false, false)
dxDrawText("Clubtime", x*429, y*672, x*820, y*710, tocolor(255, 255, 255, 255), 1.50, "default-bold", "left", "center", false, false, true, false, false)
dxDrawImage(x*1065, y*286, x*67, y*55, ":images/streamicon.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
dxDrawImage(x*1065, y*351, x*67, y*55, ":images/streamicon.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
dxDrawImage(x*1065, y*416, x*67, y*55, ":images/streamicon.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
dxDrawImage(x*1065, y*522, x*67, y*55, ":images/streamicon.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
dxDrawImage(x*1065, y*587, x*67, y*55, ":images/streamicon.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
dxDrawImage(x*1065, y*652, x*67, y*55, ":images/streamicon.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
dxDrawImage(x*555, y*460, x*68, y*61, ":images/lauter.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
dxDrawImage(x*946, y*461, x*68, y*61, ":images/lauter.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
end
function bindings()
if dxvar == 0 then
addEventHandler("onClientRender", getRootElement(), dxDrawSound)
dxvar = 1
elseif dxvar == 1 then
removeEventHandler("onClientRender", getRootElement(), dxDrawSound)
dxvar = 0
end
end
bindKey("F2", "down", bindings)
Alles anzeigen