• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM [SOLVED] GUI scale troubles

woods

Member
so i am having a bit of an issue that i cant figure out.. hopefully somebody can knock some sense into me ;o)

i am having trouble with drawing my button slots to the GUI..

room size: W 1920, H 1080
enable use of views is checked
visible when room starts checked
view in room: X 0, Y 0, W 640, H 360
port on screen: x 0,, Y 0, W 1280, H 720
following: obj_player

i have a controller object placed in the corner of the room, no sprite.
in that draw GUI event:
Code:
draw_sprite(spr_single_slot,0,x+320,y+650);  // button 1
draw_sprite(spr_single_slot,0,x+384,y+650);  // button 2
draw_sprite(spr_single_slot,0,x+448,y+650);  // button 3
draw_sprite(spr_single_slot,0,x+512,y+650);  // button 4
spr_single_slot is 64x64 origin at 0,0
(ive been fiddling with trying to get this to match up for a few days now....)

everything in my game should be 32x32 and on a grid..
why is the GUI scaled up? / how can i get it to 1:1? so that it matches with the rest of my game...
(pretty sure it has to do with the difference in view and port... just unsure on how to fix it)


im not sure if this will affect my game down the road as i start working on inventory.. moving stuff from the backpack to the hotbar type of thing..




i know its prolly a simple fix that i just dont know about... but im tired of hitting my head on a brick wall here ;o) any help would be greatly appreciated.



edit:

frostycat just shed some light in another thread as i was posting this ;o)
You need to set the size of the GUI too.
 
Last edited:
Top