1. Turkish Coffee

    GMS 2 point_in_rectangle() problem, it doesn't work

    Hey, I'm trying to get buttons with the code below but it doesn't work, I really can't see what is the problem. Draw Event Step Event I've checked if theres something special about the function in manual but no..
  2. Jochum

    GML Problem with step event and point_in_rectangle

    Hi guys, I created this piece of code, for some reason it's not working. I have the variables stored in the create page and as check I created a rectangle with the same positions as I'm checking in the step event (same variables). The rectangle is drawn on the right place but for some reason...
  3. A

    Legacy GM [SOLVED] point_in_rectangle not registering correctly with some GUI buttons

    Hola! Before you roll your eyes, I know there are a bunch of similar posts already but I've given them an eyeball and the suggestions in those (eg. device_mouse_x_to_gui, view_x) seem to have no impact whatsoever. I thought maybe drawing clickable buttons to the GUI when using a view had an...
  4. R

    GML Draw_rectangle coordinates not same as point in rectangle

    if point_in_rectangle(mouse_x, mouse_y,105, 150, 295, 190){hover_ = true}else{hover_ = false} draw_set_color(c_blue); draw_roundrect(105, 150, 295, 190, hover_); //draw_button(105, 150, 295, 190, true); draw_set_color(c_white); draw_set_halign(fa_center) draw_set_valign(fa_center)...
  5. Y

    Legacy GM point_in_rectangle not working (FIXED)

    if(point_in_rectangle(device_mouse_x(0),device_mouse_y(0),view_xview+view_wview/2, view_hview, view_xview+view_wview, view_yview) or point_in_rectangle(device_mouse_x(1),device_mouse_y(1),view_xview+view_wview/2, view_hview, view_xview+view_wview, view_yview)){ if(device_mouse_check_button(0...
  6. R

    If you create surfaces longer than the application surface and your view[SOLVED]

    Hey, so i'm stuck on this for days and I think it's also because I ask the wrong questions, but let try this one more time with different questions so here I go... 1) Application surface has a height of 270px (your standard surface) 2)I make my own surface and put a list of 26sprites in it one...
  7. R

    How can I make an object being executed on a selfmade surface

    Instead of executing the object on the application surface I want to execute the object on my selfmade surface. So this function for example point_in_rectangle(px, py, x1, y1, x2, y2); who checks for the x1,x2 ect... I want it to search for coördinates inside the selfmade surface instead of the...
  8. R

    returning an argument in a script, gone wrong I guess?

    position = argument0; key_kind = argument1; if(mouse_check_button_pressed(mb_left) && point_in_rectangle(mouse_x,mouse_y,x_pos+first_line-(button_size/2),y_pos*position-(button_size/2),x_pos+first_line+(button_size/2),y_pos*position+(button_size/2))) { key_kind = position; inside_region = true...