Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / Window exit button intercept and removing buttons...

Author
Message
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 1st Jul 2019 04:41
Before I add such things to feature requests, I thought I'd check to make sure it's not currently available:

- The AGKS editor is apparently written in AGKS and it can intercept the user pressing the window exit button to prompt for saving or cancelling. How do we do this in our AGKS projects currently? Or is it possible?

- Is there a way to hide particular window buttons and/or the entire window frame (as there was in DBPro)?
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Blek_Allen
4
Years of Service
User Offline
Joined: 5th Jun 2019
Location:
Posted: 1st Jul 2019 07:55
Maybe you looking for Intercepter??
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 1st Jul 2019 17:28
@blink0k - I do have FileExplore and use it for another (Windows only) project. I couldn't find any commands with it relating to window management nor exit handling though and I'd prefer a solution that is cross-platform if possible like AppGameKit, rather than just Windows. Particularly Linux (as this relates to attempting to write a server program).

It can apparently be done for exit button intercept since the AGKS editor is doing it, but there doesn't seem to be any help/documentation for how we can do the same. Nor are there button/frame visibility options. So I'm guessing it's something we'd need to request.
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 2nd Jul 2019 09:28
You can do this in teir 2 as you can add to the window handler code and choose to display a message box (asking if you want to save) instead of closing the window immeadiately.

The current code is just:


In other words it just quits...no message, no handling etc... You could add to it though and include additional programming or an option to even not quit etc....

No real way of changing that in teir 1 as far as I know.
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 2nd Jul 2019 17:24
I suspect that since it appears the AGKS IDE is written in Tier1, the internal code is already in place for handling the exit button and we'd just need to know how to access it from within Tier1.
Ranietz
AGK Gold Backer
19
Years of Service
User Offline
Joined: 2nd Sep 2004
Location: Norway
Posted: 2nd Jul 2019 18:50 Edited at: 2nd Jul 2019 18:50
Where did TGC say that AGKS IDE was written in tier 1?
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 2nd Jul 2019 19:40 Edited at: 2nd Jul 2019 19:41
As I said, 'appears'. Just initially implied by 'plemsoft' back in March here with 'everything is made in AGK': https://github.com/TheGameCreators/AGK-Studio/issues/121 If it were Tier2, then not everything would have been made in AppGameKit since other/external C++ code would likely have been used. And even if it's not (the statement wasn't accurate or things have changed since), the external code must already be in place and we'd just need a way to access it with a command option from within Tier1.
Bored of the Rings
User Banned
Posted: 2nd Jul 2019 20:04
IMGUI is used for AGK-S IDE.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Ranietz
AGK Gold Backer
19
Years of Service
User Offline
Joined: 2nd Sep 2004
Location: Norway
Posted: 2nd Jul 2019 20:05 Edited at: 2nd Jul 2019 20:06
Quote: "As I said, 'appears'. Just initially implied by 'plemsoft' back in March here with 'everything is made in AGK': https://github.com/TheGameCreators/AGK-Studio/issues/121 If it were Tier2, then not everything would have been made in AppGameKit since other/external C++ code would likely have been used. And even if it's not (the statement wasn't accurate or things have changed since), the external code must already be in place and we'd just need a way to access it with a command option from within Tier1."


Hmm. Maybe you're right. But wouldn't there be a bytecode file somewhere in the media folder of AppGameKit Studio then?

Anyway, back on topic.
I agree there should be possible to catch if the user tries to close the program.
We can already disable/enable the maximize button with SetWindowAllowResize() so they can't be that far off...
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 2nd Jul 2019 20:08 Edited at: 2nd Jul 2019 20:09
Yeah, I'm not sure how it might be put together in the end, but the underlying code must be there to facilitate the exit interrupt. And indeed, also some kind of controls over the available window buttons. I guess I'll plan to post the request on GitHub since neither option appears to be available to us yet.

Login to post a reply

Server time is: 2024-03-28 17:06:28
Your offset time is: 2024-03-28 17:06:28