Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 522 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
video_window problem #339565
08/27/10 19:34
08/27/10 19:34
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline OP
User
hopfel  Offline OP
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
Hey guys

I've got a little problem with wideo_window;
I want to change the border ingame, nothing easyer than that, I though.
So I wrote this line in a button function, which should switch between "with border" and "less border":

Code:
var mom_rand=0;

function window_rand()
{
if(mom_rand==0)
{
video_window(nullvector,screen_size,16,"my game");
mom_rand=1;}
else
{
video_window(nullvector,screen_size,1,"my game");
mom_rand=0;}}



When I press the button ingame, the border comes, but the window gets smaller too, but not the resolution, so it gets blurred.
The manual says, I should use "screen_size", but how you can see I did and it didn't change anything.

Thx for help wink


Hilf mir, dir zu helfen!
Re: video_window problem [Re: hopfel] #339569
08/27/10 19:57
08/27/10 19:57
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
You can use video_set wink

Re: video_window problem [Re: Lukas] #339617
08/28/10 07:30
08/28/10 07:30
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline OP
User
hopfel  Offline OP
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
Ok, this code works:

Code:
var auflx=800;
var aufly=800;
video_window(nullvector,vector(auflx,aufly,0),16,"my game");
auflx-=6; //border length
aufly-=32; //border breadth
video_set(auflx,aufly,0,2);



Thank you ^^

The only thing I have to know now, if the border has the same size at Vista or Win7, else it would only work on XP...


Hilf mir, dir zu helfen!
Re: video_window problem [Re: hopfel] #339619
08/28/10 09:39
08/28/10 09:39
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
it's possible to get application border sizes with sys_metrics

Re: video_window problem [Re: MrGuest] #339632
08/28/10 11:52
08/28/10 11:52
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
I think you don't have to exclude the border, as video_window already sets the window size excluding the window border.

Re: video_window problem [Re: Lukas] #339638
08/28/10 12:55
08/28/10 12:55
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline OP
User
hopfel  Offline OP
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
Code:
as video_window already sets the window size excluding the window border.


Manual:
When the border style is changed,
the size vector should also be set
to the current engine resolution (screen_size).
Otherwise the window will keep its previous size,
but due to the changed border
the inner client area has now a different size

and will appear distorted.

If I understood it right, the window_size includes the border.
The problem is just, that this suggestion with "screen_size" doesn't work. -.o'


Hilf mir, dir zu helfen!
Re: video_window problem [Re: hopfel] #339639
08/28/10 13:00
08/28/10 13:00
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
"When the border style is changed, ..." wink

What this means is, that if you change the border style (what you didn't), you have to set (update) the size of the engine window, or it will keep its old size, which based on the old border size.

Trust me, it worked for all my projects, and the screen never looked distorted and according to screenshots (not F6) it always has the correct size.

Re: video_window problem [Re: Lukas] #339643
08/28/10 13:27
08/28/10 13:27
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline OP
User
hopfel  Offline OP
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
Quote:
that if you change the border style (what you didn't),

Sorry, if I say something stupid, but isn't it a change from the borderstyle, when I do this:

www.haeschen.ch/hopfel/bilder/borderproblem.png

What ever, you can see, what the problem is like...


Hilf mir, dir zu helfen!
Re: video_window problem [Re: hopfel] #339646
08/28/10 13:42
08/28/10 13:42
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
So, you did change the border? Well, that's only a problem if you did that independendly from changing the window size. If you changed the size and style of your window in the same video_window command, there is no problem.

Re: video_window problem [Re: Lukas] #339647
08/28/10 13:58
08/28/10 13:58
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline OP
User
hopfel  Offline OP
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
Quote:
If you changed the size and style of your window in the same video_window command


Code:
var mom_rand=0;

function window_rand()
{
if(mom_rand==0)
{
video_window(nullvector,screen_size,16,"my game");
mom_rand=1;}
else
{
video_window(nullvector,screen_size,1,"my game");
mom_rand=0;}}



I guess I did.
Sorry, looks like I'm really to stupid to understand what you're trying to say. );
An example would be very nice.


Hilf mir, dir zu helfen!
Page 1 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1