Regarding ‘project. xml’
May I merge it into one line?
I don’t know how to assign a value to ‘if’

<window width="960" height="640" if="air" />
<window width="960" height="640" if="flash" />
<window width="960" height="640" if="windows" />
your code goes here
@785597448, you might try to plan to insert all the necessary information into a single post ![]()
Otherwise
it’s
just a
bit odd. (…etc)
To your question though!
Refer to the conditionals section of the Lime XML format documentation:
Seemingly, what you’re wanting to do is something like this?
<window width="960" height="640" if="air flash windows" />
<window width="960" height="640" if="desktop" />
<window width="0" height="0" if="html5"/>
That’s what I meant, but what you wrote is incorrect. Using spaces is wrong and has no effect!
if="air flash windows"
If you need to have multiple values in a conditional, spaces imply an “and” and vertical bars imply an “or”
it’s not what you want but it has an effect
Use || (or) :
<window width="960" height="640" if="air || flash || windows" />
you can also use unless :
<window width="960" height="640" unless="html5" />
Thank you, this is the effect I want
<window width="960" height="640" if="air || flash || windows" />
Only ‘if’ can be used, using ‘less’ has no effect!
<window width="960" height="640" unless="air || flash || windows" />
It was curious that the example unless used the || pipes, but the if didn’t.
If you need to have multiple values in a conditional, spaces imply an “and” and vertical bars imply an “or”, like this:
<window width="640" height="480" if="define define2" unless="define3 || define4" />
It seems the documentation might need a correction?
Publish ‘Windows exe’, you can place the mouse pointer next to ‘exe’ so that you can drag and change the window size. I need to disable this operation, disable mouse dragging to change the window size. I haven’t seen any settings about this?
Also, I haven’t seen the minimum and maximum window sizes allowed?
“air sdk“
minSize
optional
Specifies the minimum size allowed for the window.
Content
Two integers representing the minimum width and height, separated by whites pace. Note that the minimum size imposed by the operating system takes precedence over the value set in the application descriptor.
Example
<minSize>120 60</minSize>
maxSize
optional
Specifies the maximum size allowed for the window.
If you do not set a maximum size, it is determined by the operating system.
Content
Two integers representing the maximum width and height, separated by whites pace.
note
The maximum window size supported by AIR increased from 2048x2048 pixels to 4096x4096 pixels in AIR 2. (Because the screen coordinates are zero-based, the maximum value you can use for width or height is 4095.)
Example
<maxSize>1024 360</maxSize>
minimizable
optional
Specifies whether the window can be minimized.
maximizable
optional
Specifies whether the window can be maximized.
resizable
optional
Specifies whether the window can be resized.
note
On operating systems, such as Mac OS X, for which maximizing windows is a resizing operation, both maximizable and resizable must be set to false to prevent the window from being zoomed or resized.
Example
<resizable>false</resizable>
There’s one more thing I forgot to mention, I’ve tried it, can the “exe” published by “openfl” open multiple at the same time? I think only one ‘exe’ can be opened at a time, and ‘air’ does a great job in this regard
Turns out my eyes were painted on today ![]()
Just spaces is a logical AND, and the || is a logical OR. It literally says this in the description, I’m just blind ![]()
It does have an effect : it’s different logic than if, which is why I put html5 in my example
I typicall use something like :
<window width="1280" height="720" unless="mobile || html5" />
It sets the window dimensions to 1280x720 except if target is mobile or html5 : in that case it will go fullscreen (mobile) or take the entire browser window (html5)
Are there only a few properties that can be set for ‘window’?
If there are more attributes that can be set, where can I find the complete list of attributes?
At present, the only thing I use is “width, height, background color fps”
<window width="640" height="480" background="#FFFFFF" fps="30" />
I don’t know what this line of text means:
<window hardware="true" allow-shaders="true" require-shaders="true" depth-buffer="false" stencil-buffer="false" />
This line of text is also what I need. Is it full screen, can the window size be adjusted, and can the window border be set
But I don’t know what ‘vsync’ means behind it
<window fullscreen="false" resizable="true" borderless="false" vsync="false" />
And the direction of the window:
<window orientation="portrait" />
”Resizable=false “, both” air “and” windows “cannot be resized by dragging the window boundary with the mouse, but” air “can be maximized. The” windows "maximize button has turned gray, which is strange
Can the ‘Windows’ maximize button be used like’ Air '? Because I see ‘air’ doing it this way
When the window size can be changed, ‘air’ can have the minimum and maximum window size attributes. How can I implement this in ‘Windows’? Thank you
”air“:
<minSize>800 600</minSize>
<maxSize>1920 1080</maxSize>
I don’t think that it’s possible to set these values in project.xml.
However, you can set them in code. The NativeWindow class has minSize and maxSize properties.
stage.nativeWindow.minSize = new Point(800, 600);
Sorry, I always thought that “nativeWindow” could only be used for “air”. Projects created by “openfl” default to “html5”. I previously wrote “stage. nativeWindow” without any code prompts, but just now I switched to “air” and “window” and found that “nativeWindow” can be used. Sorry, I didn’t know all along. Thank you very much
