Jump to content


Photo

Problem with buttons


  • Please log in to reply
2 replies to this topic

#1 xYorYx

xYorYx

    Vampire

  • GMC Member
  • 83 posts
  • Version:GM8

Posted 15 June 2012 - 09:13 PM

Hello, I had a problem with my game and it was that when it was in fullscreen there were black borders at left and right side of the game window. After spending hours in searching here I found a code that helped me solve this problem, but a new one appeared. Now the zone where I must click to activate a button is above the button itself. I am not sure if I explained that well, so here is a screenshot:

Posted Image

My mouse is on the Save button, but the Menu button is highlighted. This is the code I used:

global.resolution_w = display_get_width()
global.resolution_h = display_get_height()
view_wview[0] = global.resolution_w
view_hview[0] = global.resolution_h
view_wport[0] = global.resolution_w
view_hport[0] = global.resolution_h
window_set_region_size(global.resolution_w,global.resolution_h,true)

  • 0

#2 annihilator127

annihilator127

    GMC Member

  • GMC Member
  • 143 posts
  • Version:GM8

Posted 16 June 2012 - 02:52 AM

Hi xYoyYx!

The scaling of the drawing region is inconsistent with the view. I'm not sure why this happens. The system seems a bit broken to me (at least as of Game Maker 8.0).


Try selecting 'Full Scale' instead of 'Keep aspect ratio' in the Global Game Settings, or use this code:
window_set_region_scale(0 ,true);

Keep in mind that this can stretch and distort the game view.

Hope that helps!

Edited by annihilator127, 16 June 2012 - 03:38 AM.

  • 1

#3 xYorYx

xYorYx

    Vampire

  • GMC Member
  • 83 posts
  • Version:GM8

Posted 16 June 2012 - 07:49 AM

I just tried this and first it didn't worked, but I noticed that it wasn't working only in the room where the object with the code I used was. So I just removed that object and all is fine now, thanks!
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users