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 / [SOLVED] Is there an AGKS equivalent of AGK2's setup.agc?

Author
Message
Loktofeit
AGK Developer
Gold Codemaster
11
Years of Service
User Offline
Joined: 21st Jan 2009
Location: Lakewood Ranch, FL
Posted: 13th Jul 2020 01:47
With AGKS, the window opens to its default size and then resizes to my app size. AGK2 has a file to prevent that. Is there an AGKS equivalent of it?

Attachments

Login to view attachments

The author of this post has marked a post as an answer.

Go to answer

Kevin Cross
16
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 13th Jul 2020 08:39
Have you tried SetWindowSize()? I use this in Studio now that setup.agc no longer works. I also put a GetDeviceBaseName() filter around it so that it is only applied when I run it on a Mac.

OryUI - A WIP AGK2 UI Framework
Loktofeit
AGK Developer
Gold Codemaster
11
Years of Service
User Offline
Joined: 21st Jan 2009
Location: Lakewood Ranch, FL
Posted: 13th Jul 2020 21:56
Yes, I know what SetWindowSize does. That changes the window size **after** AGKS opens the window to its default size. I no longer have AGKS installed, so I can't check to see exactly what size that is.

In AGK2, this problem does not exist thanks to setup.agc. I am looking for a way to resolve that problem of the **initial** window size in AGKS prior to it reading SetWindowSize.
Kevin Cross
16
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 13th Jul 2020 22:23
SetWindowSize doesn't change the window size after it starts and after its set to a defualt size. But I use a Mac so maybe it acts differently on each platform.

I have the window size set to a profile mobile device to quickly test on the laptop.
OryUI - A WIP AGK2 UI Framework
Bengismo
2
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 13th Jul 2020 22:46 Edited at: 13th Jul 2020 22:50
This post has been marked by the post author as the answer.
I have used setup.agc with studio projects and it still works and is read correctly and sets the window size. The initial window size is set as per the values in setup.agc....obviously, any call to SetWindowSize() after the program starts overides the window size in setup and you see the window getting resized after it is created.

That was on windows AGKS 16.4.2020
Loktofeit
AGK Developer
Gold Codemaster
11
Years of Service
User Offline
Joined: 21st Jan 2009
Location: Lakewood Ranch, FL
Posted: 14th Jul 2020 16:33 Edited at: 14th Jul 2020 16:36
"I have used setup.agc with studio projects and it still works" Good to know. Thank you!

EDIT: But now I am curious as to why it isn't included when creating new projects. :/
c0d3r9
AGK Developer
2
Years of Service
User Offline
Joined: 2nd Oct 2017
Location:
Posted: 15th Jul 2020 16:53
btw. is the setup.agc a handmade codefile? I see it in some examples....more explanation please
Laptop: Win10@64bit - i3 2x2Ghz - 8GB Ram - 1TB HDD
Desktop: Win10@64bit - AMD Ryzen 5 2400G - MSI B450 Tomahawk - 8GB Ram - 240GB SSD
Loktofeit
AGK Developer
Gold Codemaster
11
Years of Service
User Offline
Joined: 21st Jan 2009
Location: Lakewood Ranch, FL
Posted: 17th Jul 2020 23:13
Quote: "btw. is the setup.agc a handmade codefile? I see it in some examples....more explanation please"


In AGK2, "setup.agc" is a file that contains what is shown in the image in the first post. It is used by the core binary prior to reading any of the program's other source code. This prevents the issue of your program popping up at 1024x768 before switching to the correct resolution. It also used to assign the correct title instead of "AGK" in that initial display but that doesn't seem to work anymore.

Login to post a reply

Server time is: 2020-08-13 18:39:46
Your offset time is: 2020-08-13 18:39:46