Setting minimum window size?
Author |
Message |
Fexter
|
Posted: Sun Apr 08, 2012 6:00 pm Post subject: Setting minimum window size? |
|
|
What is it you are trying to achieve?
I want to make it so that my window size can't be lower than a certain amount.
For example, if I make my window size max;max, I want it to stay at that if the user has lowered the screen size (Where it would become a quarter of the screen, for example, and it would change back to the maximum size).
What is the problem you are having?
I can't find any function to do this.
Describe what you have tried to solve this problem
I tried seeing if maxx and maxy would work for this, but they don't change when they window's size changes by the user. Also, I tried editing it by drawing a circle in the top corner and seeing where it was located, but this returns maxx and maxy.
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Turing: |
View.Set('graphics:max;max')
loop
% if window's size is lower than certain amount
View.Set('graphics:max;max')
% end if
end loop
|
Please specify what version of Turing you are using
I am using Turing 4.1.1 and Turing 4.1. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Gadd
|
Posted: Sun Apr 08, 2012 6:06 pm Post subject: RE:Setting minimum window size? |
|
|
hmm, An idea could be playing with the maxx and maxy values of the screen. If that doesn't work I hope someone else could help, that would be really useful. I'm gonna go work on that myself. |
|
|
|
|
|
Gadd
|
Posted: Sun Apr 08, 2012 6:13 pm Post subject: RE:Setting minimum window size? |
|
|
I was correct, you can indeed use the (maxx,maxy) in order to change the screen
Turing: |
%set the screen there
%Say the user has a 500 x 500,
%if it's any larger than 500x or 500y (u can use 2 different if stat's) then set the maxx or maxy values to 500 or the default wanted screen size.
%keep in mine to change the x and y you can go setscreen (graphics:500;maxy) or setscreen (graphics:maxx;500)
%same goes for the y..
|
one problem is the loop didnt load my program.. but without a loop it did. give that a try |
|
|
|
|
|
Dreadnought
|
Posted: Sun Apr 08, 2012 7:56 pm Post subject: Re: Setting minimum window size? |
|
|
I don't believe you can do this. I pretty sure that the re-sizing of the window is actually part of the OS and not something that Turing controls. I think Turing has no idea what the size of the visible part of its window is.
I suppose if you had an external script that could do this you could use Sys.Exec.
Sorry I can't be of more help... |
|
|
|
|
|
|
|