alt-enter

Posted By: dleuen

alt-enter - 10/27/04 12:25

Does anyone know if the engine (or more useful, c-script) gets a notification when the user does an alt-enter to change to/from full screen mode? I have an options panel that allows you to select full screen or windowed mode but it can become out of sync. I suppose as an alternative, everytime the panel is opened I could read the current mode and set it according to that state.

Don
Posted By: Thomas_Nitschke

Re: alt-enter - 10/27/04 19:48

You could permantly read out the video_screen variable which determines whether A6 is running in fullscreen (1) or windowed mode (2)... Or did I understand sth. wrong there?
Posted By: mk_1

Re: alt-enter - 10/27/04 19:51

video_screen == 1 -> fullscreen
video_screen == 2 -> window mode
Posted By: dleuen

Re: alt-enter - 10/27/04 23:55

Yes, I am aware of the video_screen variable. What I was looking for was a way to get a function called when alt-enter is hit. I just re-read the manual for on_f1... and see it passes the scan code as argument. Therefore I should be able to use something like on_enter=my_screenswitch, check for an alt in the scancode and have my game deal with the screen mode switch.

Don
Posted By: qwerty823

Re: alt-enter - 10/28/04 00:02

Yes, this is what the default in the engine does:

Code:

action _toggle_screen
{
if (key_alt == 0)
{
return;
}
temp = video_screen + 1;
if (temp > 2)
{
temp = 1;
}
video_switch(0,0,temp);
if (result == 0)
{
beep;
}
}

on_enter _toggle_screen;


Posted By: Templar

Re: alt-enter - 10/28/04 01:24

what you're looking for is problably "window_focus" instruction.
Posted By: qwerty823

Re: alt-enter - 10/28/04 01:36

If it was ALT-TAB, then yes. ALT-ENTER toggles between fullscreen and window mode.
Posted By: CrownStem

Re: alt-enter - 10/28/04 03:10

Does anyone know how to bring back the window from a minimized state?


CrownStem
Posted By: mk_1

Re: alt-enter - 10/28/04 07:24

a little dll would do the job.
Posted By: CrownStem

Re: alt-enter - 10/28/04 07:40

...Yep. Couldn't find any c-script to do it, so I'm playing with the API in an .exe now.

CrownStem
Posted By: mk_1

Re: alt-enter - 10/28/04 07:56

Code:
DLLFUNC fixed dll_mini_window()
{
ShowWindow(a5fb->hwnd,SW_SHOW);
return(INT2FIX(1));
}


Posted By: CrownStem

Re: alt-enter - 10/30/04 00:25

mk_1,

Thanks for the information. I'm an API noob- Could you tell me more about how your function is used? More specifically, is it a piece of 3DGS SDK code, or something I could compile into the C# exe that I'm using to play the swf?

Thanks for your help,

CrownStem
© 2024 lite-C Forums