Hallo,
ich habe folgendes Problem:
Ich möchte ein dxDraw-Rectangle an alle Auslösungen anpassen.
Die Linien der Rectangles bleiben so wie sie sollten, doch die Rectangles an sich sind einfach so groß..
Hier das ganze bei der Auflösungen in der ich sie erstellt habe: (1600 * 900)
https://picload.org/view/rpgpoddr/…-22-26.png.html
Hier das ganze bei der Auflösung 1920 * 1080
https://picload.org/view/rpgpodda/…-18-26.png.html
Hier der Code:
Lua
local w, h = guiGetScreenSize()
dxDrawRectangle(v.x*(w/1600), v.y*(h/900), v.w*(w/1600), v.h*(h/900), tocolor(v.c1, v.c2, v.c3, v.alpha))
dxDrawText(v.Title, w* v.x /1600, h* v.y /900, w* v.x/1600 +v.w , h* v.y/900 +v.h , tocolor(v.TitleColor1, v.TitleColor2, v.TitleColor3, v.TitleAplha), 1.5, "default-bold", "center", "top", false, false, false, false, false)
dxDrawLine(v.x*(w/1600), v.y*(h/900) +10 *2 +4, v.x*(w/1600) +v.w, v.y*(h/900) +10 *2 +4, tocolor(v.TitleColor1, v.TitleColor2, v.TitleColor3, v.TitleAplha), 2)
--Schließfeld
if isCursorOverText(w* v.x /1600, h* v.y /900, w* v.x/1600 +v.w -2 *1.9, h* v.y/900 +10 ) == true then --Is der Zeige aufn Button?
dxDrawText("[X]", w* v.x /1600, h* v.y /900, w* v.x/1600 +v.w *1.9 , h* v.y /900, tocolor(255, 255, 0, v.TitleAplha), 2/1.9, "default-bold", "center", "top", false, false, false, false, false)
else
dxDrawText("[X]", w* v.x /1600, h* v.y /900, w* v.x/1600 +v.w *1.9 , h* v.y /900, tocolor(255, 0, 0, v.TitleAplha), 2/1.9, "default-bold", "center", "top", false, false, false, false, false)
end
--Rand
dxDrawLine(w* v.x /1600, h* v.y /900, w* v.x /1600, h* v.y/900 +v.h, tocolor(v.TitleColor1, v.TitleColor2, v.TitleColor3, v.TitleAplha), 2) --Links
dxDrawLine(w* v.x/1600 +v.w, h* v.y /900, w* v.x/1600 +v.w , h* v.y/900 +v.h, tocolor(v.TitleColor1, v.TitleColor2, v.TitleColor3, v.TitleAplha), 2) --Rechts
dxDrawLine(w* v.x /1600, h* v.y /900, w* v.x/1600 +v.w, h* v.y/900, tocolor(v.TitleColor1, v.TitleColor2, v.TitleColor3, v.TitleAplha), 2) --Oben
dxDrawLine(w* v.x /1600 , h* v.y/900 +v.h, w* v.x/1600 +v.w, h* v.y/900 +v.h, tocolor(v.TitleColor1, v.TitleColor2, v.TitleColor3, v.TitleAplha), 2) --Unten
Alles anzeigen
(Ich vermute es liegt an der Rechnung.. Ich habe schon sehr vieles versucht)
Mfg KeksKing