|
resizing displays |
shadyvillian
Member #12,426
December 2010
|
How do I make a display that I set ALLEGRO_RESIZABLE to not be able to resize anymore? Software Engineer by day, hacker by night. |
Todd Cope
Member #998
November 2000
|
Looks like al_toggle_display_flag() only supports ALLEGRO_FULLSCREEN_WINDOW and ALLEGRO_NOFRAME. The only thing you could do is destroy the display and recreate it with ALLEGRO_RESIZABLE turned off. |
SiegeLord
Member #7,827
October 2006
|
The unstable version has a way to specify size constraints on the window, which you could use to implement something like this. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
shadyvillian
Member #12,426
December 2010
|
I've been using that function in the beginning of the program thats a good idea. EDIT: doing that messes up the program big time and causes it to crash some how Software Engineer by day, hacker by night. |
Luiji99
Member #12,254
September 2010
|
Do you remember to update all of the pointers to your display? Programming should be fun. That's why I hate Java. |
shadyvillian
Member #12,426
December 2010
|
What do you mean exactly? I've attached a screenshot to what happens. Software Engineer by day, hacker by night. |
Luiji99
Member #12,254
September 2010
|
No, you haven't. What I mean is, did you update every single variable of type ALLEGRO_DISPLAY* to point to the new display? If you haven't, at some point you'll try to access the old pointer, which you've destroyed, which will lead to unpredictable results. Programming should be fun. That's why I hate Java. |
shadyvillian
Member #12,426
December 2010
|
Oh you have to create a new display? I can't do that I'd have to reload all my resources. Software Engineer by day, hacker by night. |
Luiji99
Member #12,254
September 2010
|
That appears to be your only option, sorry. The only resource that I think gets attached to a display is ALLEGRO_BITMAP, though, and I'm pretty sure there's a way to transfer them over from one display to another without reloading them. Programming should be fun. That's why I hate Java. |
|