U
uni00
Guest
Hello. I want to make a scope bar that displays the items that a character has below. Therefore, I would like to make a click decision within the range of the inventory frame. However, even if the click range is set in draw_GUI, it will be based on the room coordinates. what should I do? MOD EDIT: Hello. I want to make an inventory bar that displays the items that a character has below. Therefore, I would like to make a click judgment within the range of the inventory frame. However, even if the click range is set in draw_GUI, the room coordinates will be the reference. what should I do?
[CODE = gml] if(mouse_check_button(mb_left))
{
var camx = camera_get_view_x(0);
var camy = camera_get_view_y(0);
var xx、yy;
xx = window_view_mouse_get_x(0);
yy = window_view_mouse_get_y(0);
if(xx> camx + 530-96 +(64)&& xx <camx + 530-96 +(64 * 2)&& yy> camy + 670 && yy <camy + 700)
{
global.a_press = true;
}
}[/コード]
[CODE = gml] if(mouse_check_button(mb_left))
{
var camx = camera_get_view_x(0);
var camy = camera_get_view_y(0);
var xx、yy;
xx = window_view_mouse_get_x(0);
yy = window_view_mouse_get_y(0);
if(xx> camx + 530-96 +(64)&& xx <camx + 530-96 +(64 * 2)&& yy> camy + 670 && yy <camy + 700)
{
global.a_press = true;
}
}[/コード]
Last edited by a moderator: