mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-24 14:06:23 +01:00
mac mouse fix
This commit is contained in:
parent
a1a1e36b49
commit
2d64a76c50
4 changed files with 15 additions and 3 deletions
|
@ -255,6 +255,11 @@
|
|||
var mx = raw_x - winwin_get_x_safe(window);
|
||||
var my = raw_y - winwin_get_y_safe(window);
|
||||
|
||||
if(MAC) {
|
||||
mx = raw_x;
|
||||
my = raw_y;
|
||||
}
|
||||
|
||||
var _r = dialog_resizable * 6;
|
||||
var x0 = dialog_x - _r;
|
||||
var x1 = dialog_x + dialog_w + _r;
|
||||
|
@ -272,6 +277,11 @@
|
|||
var _mx = FILE_IS_DROPPING? FILE_DROPPING_X : mouse_raw_x;
|
||||
var _my = FILE_IS_DROPPING? FILE_DROPPING_Y : mouse_raw_y;
|
||||
|
||||
if(MAC) {
|
||||
_mx = mouse_mx;
|
||||
_my = mouse_my;
|
||||
}
|
||||
|
||||
if(point_in(_mx, _my)) {
|
||||
if(depth < DIALOG_DEPTH_HOVER) {
|
||||
DIALOG_DEPTH_HOVER = depth;
|
||||
|
|
|
@ -47,7 +47,8 @@ DIALOG_WINCLEAR1
|
|||
var cc = struct_try_get(_menuItem, "color", c_white);
|
||||
var _key = _menuItem.hotkey != noone? find_hotkey(_menuItem.hotkey[0], _menuItem.hotkey[1]) : noone;
|
||||
_menuItem.hoykeyObject = _key;
|
||||
|
||||
|
||||
//print($"{i}: {sHOVER} && {point_in_rectangle(mouse_mx, mouse_my, dialog_x, yy + 1, dialog_x + dialog_w, yy + _h - 1)}")
|
||||
if(sHOVER && point_in_rectangle(mouse_mx, mouse_my, dialog_x, yy + 1, dialog_x + dialog_w, yy + _h - 1)) {
|
||||
selecting = i;
|
||||
var tips = array_safe_get_fast(tooltips, i, noone);
|
||||
|
|
|
@ -288,4 +288,5 @@ _FILE_DROPPED = false;
|
|||
#endregion
|
||||
|
||||
//if(global.cache_call) print($"CACHE called: {global.cache_call} | hit: {global.cache_hit} ({global.cache_hit / global.cache_call * 100}%)");
|
||||
// print($"{is_struct(HOVER)? instanceof(HOVER) : HOVER}, {is_struct(FOCUS)? instanceof(FOCUS) : FOCUS}");
|
||||
print($"{is_struct(HOVER)? instanceof(HOVER) : HOVER}, {is_struct(FOCUS)? instanceof(FOCUS) : FOCUS}");
|
||||
//print($"{mouse_mx}, {mouse_my}");
|
|
@ -17,7 +17,7 @@ function winwin_config() constructor {
|
|||
static owner = undefined;
|
||||
}
|
||||
|
||||
#macro __ww_valid (ww != noone && winwin_exists(ww))
|
||||
#macro __ww_valid (OS == os_windows && ww != noone && winwin_exists(ww))
|
||||
|
||||
function winwin_create_ext(_x, _y, _w, _h, _conf) {
|
||||
var window = winwin_create(_x, _y, _w, _h, _conf);
|
||||
|
|
Loading…
Reference in a new issue