Hi, thanks in advance.
I'm trying to make a resizable window which has some fixed size child windows and resizing windows.
And it has to satifiy screen resolution change.
Please see below.
http://tempsend.com/5B25DE2587/1C7D/ResizableWindow.jpg
The black window is a parent window, and it is resizable with dragging the frame.
The red window is a fixed size window.
The blue window has to be resized with respect to the black window size horizontally, i mean, width only.
The green window has to be resized with respect to the black window size vertically, height only.
Every window has to be scaled proportionally when a screen resolution is changed.
I tried some ways:
1. red window has 'scale' size (0.1, 0.1)
blue window has scale pos (0.1, 0.0) and scale size (1.0, 0.1)
green window has scale pos (0.0, 0.1) and scale size (0.1, 1.0)
result: the red window size, the blue window height, the green window width have to be fixed, so it goes wrong when the black size is changed.
2. red window has 'offset' size (32, 32)
blue window has offset pos (32, 0) and scale width 1.0, offset height 32
green window has offset pos (0, 32) and offset width 32, scale height 1.0
result: everything looks ok, but it doesn't work when a screen resolution is changed.
3. All is the same as '2'.
But I recalculate 'offset' things by ratio current resolution / previous resolution when a screen resolution is changed.
result: It works! But it's not that easy to code.
What I want to know is...
is there any feature like '3'? I mean, not a truely absolute pixel offset, which is changed when a screen resolution is changed or similar features.
Please let me know and understand lack of my english.
In app resizing window with screen resolution change
Moderators: CEGUI MVP, CEGUI Team
In app resizing window with screen resolution change
Last edited by kjub on Wed Sep 30, 2015 07:01, edited 4 times in total.
Re: In app resizing window with screen resolution change
I cannot view your Image, there's just "Image" as text in your post - can you upload it somewhere and put the link here?
Re: In app resizing window with screen resolution change
You can also upload it directly in the forum. The more screenshots we get to understand the issue the better.
CrazyEddie: "I don't like GUIs"
Re: In app resizing window with screen resolution change
I just posted image url.
How do I upload an image to forum?
How do I upload an image to forum?
Re: In app resizing window with screen resolution change
I dont know what the problem is, this is easily achievable in CEGUI. Position everything top-left oriented and make the positions absolute in pixels. Then make the width of top right window to be 1 in x relative width and make the offset the negative width of the top left window in pixels.
For the left window you choose the height the same way (1 in relative, and the absolute negative of the top left window's height). The bottom right window has both width and height set in the described way. Done.
For the left window you choose the height the same way (1 in relative, and the absolute negative of the top left window's height). The bottom right window has both width and height set in the described way. Done.
CrazyEddie: "I don't like GUIs"
Re: In app resizing window with screen resolution change
Ident //
Problems happen when I change app resolution.
I want to make just one layout for every resolution.
But it's impossible to achieve with only 'absolute in pixel' and 'relative'
because 'absolute in pixel' has to be recalculated when the screen resolution is changed and
has to stay fixed when its parent window size is changed.
To do that I think we need 'absolute in pixel on standard resolution' or something works like above,
Or just recalculate manually as I mentioned earlier.
Problems happen when I change app resolution.
I want to make just one layout for every resolution.
But it's impossible to achieve with only 'absolute in pixel' and 'relative'
because 'absolute in pixel' has to be recalculated when the screen resolution is changed and
has to stay fixed when its parent window size is changed.
To do that I think we need 'absolute in pixel on standard resolution' or something works like above,
Or just recalculate manually as I mentioned earlier.
Re: In app resizing window with screen resolution change
You can use the AspectRatio feature for sizing if you want to maintain ratios. Use relative positions for positioning. With relative positions and sizes imo you can make a layout for all kind of resolutions while maintaining Ratios. But it won't check for the resolution itself, only the parent window.
You have to be more specific what you want in regard to having sizes and positions depend on resolution, so far I am not sure how this should work.
EDIT: I said something wrong about AutoScale here - this feature only exists for Imagesets and Fonts.
You have to be more specific what you want in regard to having sizes and positions depend on resolution, so far I am not sure how this should work.
EDIT: I said something wrong about AutoScale here - this feature only exists for Imagesets and Fonts.
CrazyEddie: "I don't like GUIs"
Re: In app resizing window with screen resolution change
Ident //
I just want the feature that a window size changes with respect to screen resolution only,
but doesn't change with respect to its parent window size.
I think it's impossible so far without manual coding, right?
I just want the feature that a window size changes with respect to screen resolution only,
but doesn't change with respect to its parent window size.
I think it's impossible so far without manual coding, right?
Re: In app resizing window with screen resolution change
I think you are correct: This is impossible atm. There would have to be an AutoScale property for Windows but it only exists for Imagesets and Fonts.
There is only the AspectRatio as an option.
There is only the AspectRatio as an option.
CrazyEddie: "I don't like GUIs"
Who is online
Users browsing this forum: No registered users and 12 guests