Page 1 of 1

CreateDisplay using Sizable etc. = true when fullscreen okay?

Posted: Wed Jan 15, 2025 1:05 pm
by Bugala
I am making this Createdisplay where user can choose the options through RAPAGui what options to use.

User can choose either fullscreen or window mode.

Thing is, some of the options, like Sizable are only available for Window mode.

Therefore question is, Should I make two different CreateDisplay lines, one which handles for window case, and another for fullscreen case, or can I just use the same line for both?

As in, I could have:

Code: Select all

Sizeable = Moai.Get("Sizeable", "selected")
CreateDisplay(0, Sizeable = Sizeable)
Which means that it could end up in a situation where Mode = "Fullscreen" yet Sizeable = True.

Is this potentially a problem even in future?

Re: CreateDisplay using Sizable etc. = true when fullscreen okay?

Posted: Fri Jan 24, 2025 10:35 pm
by airsoftsoftwair
Shouldn't be a problem. Full screen mode should ignore flags like sizeable that are only used in windowed mode.

Re: CreateDisplay using Sizable etc. = true when fullscreen okay?

Posted: Sat Jan 25, 2025 2:23 pm
by Bugala
Thanks for confirming this.

One additional question however, since right now I have two different CreateDisplay lines, but for a different reason.

Thing is, there are two different cases, one in which ScaleWidth and ScaleHeight is used, and one where it isn't.

Therefore, is there a way to have just a one line for CreateDisplay, in way of

Code: Select all

CreateDisplay(1, {ScaleWidth = Var1, ScaleWidth= Var2})
But is there a way to have Var1 and Var2 be such values that they would practically ignore the ScaleWidth/ScaleHeight?

As in, some cases I want there to be ScaleWidth and ScaleHeight, in some cases not. So If I use something like ScaleWidth = Nil would that work as basically same as the createdisplay not having ScaleWidth at all?

actually, in case you are not understanding what I am after, here the actual lines I am using currently:

Code: Select all

If ScaleSizesVersion = True
		CreateDisplay(0, {Width=1920, Height=1080, ScaleWidth=W, ScaleHeight=H, Title = "Rogue Football Cardgame", Sizeable=Sizeable, borderless=Borderless, 
				Mode=Mode, Monitor=Monitor, fixed=Fixed, smoothscale=SmoothScale, KeepProportions = KeepProportions,
				ScaleMode = Scalemode})
	Else
		CreateDisplay(0, {Width=W, Height=H, Title = "Rogue Football Cardgame", Sizeable=Sizeable, borderless=Borderless, 
				Mode=Mode, Monitor=Monitor, fixed=Fixed, smoothscale=SmoothScale, KeepProportions = KeepProportions,
				ScaleMode = #SCALEMODE_NONE})
	EndIf
Now point would be to avoid having "IF ScaleSizesVersion = True" and instead just use one CreateDisplay, and then just use variables to handle the ScaleWidth and ScaleHeight in such way that ScaleWidth/ScaleHeight would be ignored from the line with something like NIL if possible.

Re: CreateDisplay using Sizable etc. = true when fullscreen okay?

Posted: Sat Jan 25, 2025 4:49 pm
by plouf
Bugala wrote: Sat Jan 25, 2025 2:23 pm
As in, some cases I want there to be ScaleWidth and ScaleHeight, in some cases not. So If I use something like ScaleWidth = Nil would that work as basically same as the createdisplay not having ScaleWidth at all?
what about
ScaleWidth="100%"

Re: CreateDisplay using Sizable etc. = true when fullscreen okay?

Posted: Sun Jan 26, 2025 12:54 pm
by Bugala
Thanks, seems like it works as I just tested it.