2 registered members (AndrewAMD, juanex),
1,247
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
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
OP
User
|
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":
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
Hilf mir, dir zu helfen!
|
|
|
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
OP
User
|
OP
User
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
|
Ok, this code works:
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: 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
OP
User
|
OP
User
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
|
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: 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
OP
User
|
OP
User
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
|
If you changed the size and style of your window in the same video_window command
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!
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|