Ich habe zum größe anpassen des Games einen Windowbound von 200px in x und y eingestellt das klappt so weit;)
nun soll das tool hier beim starten feststellen ob die minimum px gegeben sind wenn nicht soll es dementsprechend den windowbound anpassen, also das fenster kleiner machen.
bevor ich es auf anderen rechnern teste wollte ich euch um eure meinung / rat bitten.
Alle Grafiken nun resizen zu lassen bin ich zu faul daher diese einfache variante.
Code: Alles auswählen
Procedure INIT_SCREENRES()
Protected NewList screenmode.point()
Protected.i WINDOW_HEIGH,WINDOW_WIDTH
;// find alle modes
If ExamineScreenModes()
While NextScreenMode()
AddElement(screenmode())
screenmode()\x = ScreenModeWidth()
screenmode()\y = ScreenModeHeight()
Wend
EndIf
;select best mode wich is size is > than MINWINDOW and save it .
ResetList(screenmode())
ForEach screenmode()
If screenmode()\x > #MINWINDOW_WIDTH And screenmode()\y > #MINWINDOW_HEIGHT
WINDOW_WIDTH = screenmode()\x
WINDOW_HEIGH = screenmode()\y
EndIf
Next
;// resize to given size.
If WINDOW_WIDTH < #WINDOW_WIDTH And WINDOW_HEIGH < #WINDOW_HEIGHT
Spieler\WINDOW_HEIGH = WINDOW_HEIGH
Spieler\WINDOW_WIDTH = WINDOW_WIDTH
Else
;// set default screen size
Spieler\WINDOW_HEIGH = #WINDOW_HEIGHT
Spieler\WINDOW_WIDTH = #WINDOW_WIDTH
EndIf
EndProcedure

