• 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!

GML Only certain objects can be clicked in views

Warspite2

Member
So I have 2 seperate views with one being a main view and the other a mini map. I only want gui buttons clickable on the main view and not the mini map. As it is now, buttons can be clicked on in any view and I don't want that. Can anyone shed some light on this for me? This is in an old project I built using GMS1.4 so not sure if methods will be different using GMS2 but I prefer to keep this old project in GMS1.4 for now.
 

woods

Member
limit the usage/visibility based on which view it is in.


basically something like this...

if (view_current == 0)
{
if mouse_check_button_pressed(mb_left)
{
// do stuff
}
}



===
if your game world is in view[0] minimap is in view[1]
//do stuff would not not happen in the minimap
 
Top