CreateDisplay using Sizable etc. = true when fullscreen okay?

Find quick help here to get you started with Hollywood
Post Reply
Bugala
Posts: 1295
Joined: Sun Feb 14, 2010 7:11 pm

CreateDisplay using Sizable etc. = true when fullscreen okay?

Post 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?
User avatar
airsoftsoftwair
Posts: 5644
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post by airsoftsoftwair »

Shouldn't be a problem. Full screen mode should ignore flags like sizeable that are only used in windowed mode.
Bugala
Posts: 1295
Joined: Sun Feb 14, 2010 7:11 pm

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

Post 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.
plouf
Posts: 604
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

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

Post 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%"
Christos
Bugala
Posts: 1295
Joined: Sun Feb 14, 2010 7:11 pm

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

Post by Bugala »

Thanks, seems like it works as I just tested it.
Post Reply