Jump to content


Message Box Issues

  • Please log in to reply
4 replies to this topic

#1 1 Shogun

1 Shogun

    GMC Member

  • GMC Member
  • 48 posts
  • Version:Mac

Posted 01 February 2012 - 11:39 AM

I'm having issues with the message box system in general. The codes that are used to change the message box attributes aren't working except for the font changing and background image. However, the message box won't re-size, and the mouse position detection for button highlighting isn't working. Default message buttons are being used. The message boxes are being displayed, but it is as if the game thinks it's much lower than it is being displayed. I think it could be a screen resolution issue because usually my screen is at a 1.6 or slightly larger ratio (depending if I connect to my TV or not), and GM7 was originaly designed for computers that use a 1.333 like screen ratio back in the day when laptops or desktops didn't come with widescreens. If you look at the global game settings set resolutions they are all at a 1.333 or lower ratio. I do not have the resolution set and I have tried full scale and keep aspect ratio and neither work. If anyone doesn't mind creating a quick 2D game that uses code to change message box attributes such as background and font but leave the default buttons alone, and then tell me if they have problems also I'd really appreciate it. Thanks.


Make sure the test game is full screen.


Edited by 1 Shogun, 06 February 2012 - 09:11 AM.

  • 0

#2 Yal


    Even though the GMC may be gone, our love will prevail eternally

  • Global Moderators
  • 11774 posts
  • Version:GM:Studio

Posted 01 February 2012 - 11:50 AM

The codes that are used to change the message box attributes aren't working...

I stopped reading here. You're expecting us to help you with code without telling us what scripts you use? Are you expecting us to guess what you did wrong? At least copy-paste them here, sheesh! >__>
  • 0

- The above is my personal opinion and in no way representative of Yoyogames or the GMC, except when explicitly stated -


Open this spoiler for my games:


Some useful game engines, music and other resources at affordable prices:

My collection of game resources at itch.io


New user? Can't draw but want to look unique? You can request a new avatar in this thread!

#3 MasterOfKings


    The True Master

  • GMC Member
  • 4888 posts
  • Version:GM8

Posted 01 February 2012 - 01:45 PM

Assuming by "message box", you're referring to native functions, I have no idea what the issue could be (in fact, I don't really get what the issue is).

However, please post whatever code you've used. In GM8, there's both message_text_font() and message_button_font(). However, as far as I'm aware, GM4Mac is based on GM7, and I can't remember if it shared the same function set.

Again, post your code. Saying "it doesn't work" doesn't help us fix it. It just tells us there's something to fix.

PS: Looks like Yal's in a bad mood. :P

EDIT: If the game runs in Windowed mode, does it still suffer the same issue?

Edited by MasterOfKings, 01 February 2012 - 01:47 PM.

  • 0

Did I help you? If so, help me by pressing the + button above here.



#4 1 Shogun

1 Shogun

    GMC Member

  • GMC Member
  • 48 posts
  • Version:Mac

Posted 02 February 2012 - 01:38 AM

Here is an example of what I'm talking about with comments:

// <release> Enter Event: // It is <release> because "keypress enter" was seeping through to the message box answer.

message_background(bk_BlueGradient); //Blue to black gradient background. Works.
message_size(room_width/3,room_height/4); //Original "bk_BLueGradient" size is 800x600 because it is used as a stretched background for rooms as well. Doesn't resize like it's supposed to.
message_text_font(font_Statistics,18,c_white,1); //Easy to read, Ubuntu-like installed font. Works.
if show_question('Can you explain why this message box is 800x600 when the room size is 1280x800?') = true
do some code...

I have tried both room_width/room_height and display_get_width()/display_get_height() and both results are the same. I have also tried to place the message attribute codes in the Draw Event with the rest of the code in the <release> Enter Event, and no improvement. I'm not so sure that this is a code issue rather than a bug because I'm also developing a Windows version with the same code using GM7 with no message box issues. This was why I was wondering if anyone else has had issues with changing the message box attributes. However, the helpful suggestion by MasterOfKings to run the game in windowed mode fixed the button highlighting vs. mouse position issue but not the message box size issue. Thank you and sorry for any previous confusion.
  • 0

#5 vonStauffenberg


    GMC Member

  • New Member
  • 25 posts
  • Version:GM:HTML5

Posted 06 February 2012 - 07:32 PM

I believe that message_box type functions in GM4Mac does not allow you to change its size, it has some predefined sizes according to chosen screen size, so room size 1280x800 is equal to 800x600 message_box Posted Image, GM4Mac forever Posted Image
  • 0
Visit my site and play some of my free games