diff --git a/area_graph.v b/area_graph.v index 77b62c4..86acbe7 100644 --- a/area_graph.v +++ b/area_graph.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx import math import math.stats diff --git a/button.v b/button.v index bcc52d6..c89c2b4 100644 --- a/button.v +++ b/button.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx @[autofree_bug; manualfree] diff --git a/c_bindings/mui.v b/c_bindings/mui.v index 49733f6..847eafb 100644 --- a/c_bindings/mui.v +++ b/c_bindings/mui.v @@ -3,7 +3,7 @@ module main import malisipi.mui import json -import gg +import malisipi.mfb as gg __global ( event_init mui.OnEvent diff --git a/checkbox.v b/checkbox.v index 4c76a26..8035e9c 100644 --- a/checkbox.v +++ b/checkbox.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx @[autofree_bug; manualfree] diff --git a/events.v b/events.v index ad4df98..e474c7b 100644 --- a/events.v +++ b/events.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import math import os import sokol.sapp @@ -204,7 +204,6 @@ fn move_fn(x f32, y f32, mut app &Window){ if app.active_dialog!=""{ objects=app.dialog_objects.clone().reverse() } - mut changed_cursor:=false for mut object in objects{ if !object["hi"].bol && object["type"].str!="rect" && object["type"].str!="group" && object["type"].str!="table"{ @@ -212,16 +211,16 @@ fn move_fn(x f32, y f32, mut app &Window){ if object["y"].numy{ match object["type"].str { "textbox", "password", "textarea"{ - sapp.set_mouse_cursor(.ibeam) + app.gg.set_cursor(.text) changed_cursor=true break } "link" { - sapp.set_mouse_cursor(.pointing_hand) + app.gg.set_cursor(.pointer) changed_cursor=true break } "frame" { if object["drag"].bol { - sapp.set_mouse_cursor(.resize_all) + app.gg.set_cursor(.move) changed_cursor=true } break @@ -237,7 +236,7 @@ fn move_fn(x f32, y f32, mut app &Window){ if will_skip { continue } - sapp.set_mouse_cursor(.default) + app.gg.set_cursor(.default) changed_cursor=true break } @@ -245,8 +244,10 @@ fn move_fn(x f32, y f32, mut app &Window){ } } } + } + if !changed_cursor { + app.gg.set_cursor(.default) } - if !changed_cursor { sapp.set_mouse_cursor(.default) } if !(app.focus==""){ mut object:=get_object_by_id(app,app.focus) if !is_null_object(object) { diff --git a/examples/custom_widget/custom_widget.v b/examples/custom_widget/custom_widget.v index 736f09e..4ce97be 100644 --- a/examples/custom_widget/custom_widget.v +++ b/examples/custom_widget/custom_widget.v @@ -1,6 +1,6 @@ module custom_widget -import gg +import malisipi.mfb as gg import gx import malisipi.mui diff --git a/frame.v b/frame.v index 45be082..d145759 100644 --- a/frame.v +++ b/frame.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx @[autofree_bug; manualfree] diff --git a/group.v b/group.v index 6ae4f6d..8a2aabc 100644 --- a/group.v +++ b/group.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx @[autofree_bug; manualfree] diff --git a/hyperlink.v b/hyperlink.v index 3c5d9eb..9ff8064 100644 --- a/hyperlink.v +++ b/hyperlink.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx @[autofree_bug; manualfree] diff --git a/image.v b/image.v index 0ba418b..6e66fd4 100644 --- a/image.v +++ b/image.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg @[autofree_bug; manualfree] pub fn add_image(mut app &Window, path string, id string, x IntOrString, y IntOrString, w IntOrString, h IntOrString, hi bool, fun OnEvent, frame string, zindex int){ diff --git a/label.v b/label.v index cf7ea40..484bac9 100644 --- a/label.v +++ b/label.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx @[autofree_bug; manualfree] diff --git a/line_graph.v b/line_graph.v index 15ab4f4..72a028a 100644 --- a/line_graph.v +++ b/line_graph.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx import math import math.stats diff --git a/list.v b/list.v index f1208e0..b59bda9 100644 --- a/list.v +++ b/list.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx pub fn add_list(mut app &Window, table [][]string, id string, x IntOrString, y IntOrString, w IntOrString, h IntOrString, hi bool, bg gx.Color, bfg gx.Color, fg gx.Color, frame string, zindex int, fnchg OnEvent, selected int, tSize int, row_h int){ diff --git a/menubar.v b/menubar.v index 9725bae..49903ac 100644 --- a/menubar.v +++ b/menubar.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx @[unsafe] diff --git a/mui.v b/mui.v index d28aa63..501dbcf 100644 --- a/mui.v +++ b/mui.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx import os import math diff --git a/open_street_map_linux.c.v b/open_street_map_linux.c.v index 978b4f2..bbad41b 100644 --- a/open_street_map_linux.c.v +++ b/open_street_map_linux.c.v @@ -3,7 +3,7 @@ module mui import math import net.http import os -import gg +import malisipi.mfb as gg import gx const ( diff --git a/open_street_map_macos.c.v b/open_street_map_macos.c.v index 8b69bf7..7ec4a11 100644 --- a/open_street_map_macos.c.v +++ b/open_street_map_macos.c.v @@ -3,7 +3,7 @@ module mui import math import net.http import os -import gg +import malisipi.mfb as gg import gx const ( diff --git a/open_street_map_windows.c.v b/open_street_map_windows.c.v index 978b4f2..bbad41b 100644 --- a/open_street_map_windows.c.v +++ b/open_street_map_windows.c.v @@ -3,7 +3,7 @@ module mui import math import net.http import os -import gg +import malisipi.mfb as gg import gx const ( diff --git a/passwordbox.v b/passwordbox.v index 99f5836..47bca75 100644 --- a/passwordbox.v +++ b/passwordbox.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx pub fn add_password(mut app &Window, text string, hider_char string, id string, placeholder string, x IntOrString, y IntOrString, w IntOrString, h IntOrString, hi bool, bg gx.Color, bfg gx.Color, fg gx.Color, fnchg OnEvent, dialog bool, frame string, zindex int, tSize int){ diff --git a/progress.v b/progress.v index e4d07a9..281638b 100644 --- a/progress.v +++ b/progress.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx pub fn add_progress(mut app &Window, percent int, id string, x IntOrString, y IntOrString, w IntOrString, h IntOrString, hi bool, bg gx.Color, bfg gx.Color, fg gx.Color, dialog bool, frame string, zindex int, tSize int){ diff --git a/rect.v b/rect.v index b75ba20..e21507f 100644 --- a/rect.v +++ b/rect.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx pub fn add_rect(mut app &Window, id string, x IntOrString, y IntOrString, w IntOrString, h IntOrString, hi bool, bg gx.Color, dialog bool, frame string, zindex int){ diff --git a/scrollbar.v b/scrollbar.v index 30d8cc3..e4f8f44 100644 --- a/scrollbar.v +++ b/scrollbar.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx pub const ( diff --git a/selectbox.v b/selectbox.v index 1c1cfe6..ca37283 100644 --- a/selectbox.v +++ b/selectbox.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx @[autofree_bug; manualfree] diff --git a/slider.v b/slider.v index f6d9d8c..23b1083 100644 --- a/slider.v +++ b/slider.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx pub fn add_slider(mut app &Window, val int, min int, max int, step int, id string, x IntOrString, y IntOrString, w IntOrString, h IntOrString, vert bool, hi bool, bg gx.Color, bfg gx.Color, fg gx.Color, fnclk OnEvent, fnchg OnEvent, fnucl OnEvent, value_map ValueMap, dialog bool, frame string, zindex int, tSize int, show_value_as_label int){ diff --git a/spinner.v b/spinner.v index 68d247a..3574b4e 100644 --- a/spinner.v +++ b/spinner.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx pub fn add_spinner(mut app &Window, text string, id string, placeholder string, phsa bool, x IntOrString, y IntOrString, w IntOrString, h IntOrString, hi bool, bg gx.Color, bfg gx.Color, fg gx.Color, fnchg OnEvent, dialog bool, frame string, zindex int, tSize int){ diff --git a/switch.v b/switch.v index 8c46402..24803cb 100644 --- a/switch.v +++ b/switch.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx pub fn add_switch(mut app &Window, text string, id string, x IntOrString, y IntOrString, w IntOrString, h IntOrString, checked bool, hi bool, bg gx.Color, bfg gx.Color, fg gx.Color, fnchg OnEvent, frame string, zindex int, tSize int, show_value_as_label int){ diff --git a/table.v b/table.v index ad8ce97..972ddde 100644 --- a/table.v +++ b/table.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx pub fn add_table(mut app &Window, table [][]string, id string, x IntOrString, y IntOrString, w IntOrString, h IntOrString, hi bool, bg gx.Color, bfg gx.Color, fg gx.Color, frame string, zindex int, tSize int, row_h int){ diff --git a/textarea.v b/textarea.v index 029bc8f..5f0b898 100644 --- a/textarea.v +++ b/textarea.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx pub fn add_textarea(mut app &Window, text string, id string, placeholder string, phsa bool, x IntOrString, y IntOrString, w IntOrString, h IntOrString, hi bool, bg gx.Color, bfg gx.Color, fg gx.Color, fnchg OnEvent, codefield bool, tSize int, frame string, zindex int){ diff --git a/textbox.v b/textbox.v index c3ea909..5f19c27 100644 --- a/textbox.v +++ b/textbox.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx pub fn add_textbox(mut app &Window, text string, id string, placeholder string, phsa bool, x IntOrString, y IntOrString, w IntOrString, h IntOrString, hi bool, bg gx.Color, bfg gx.Color, fg gx.Color, fnchg OnEvent, dialog bool, frame string, zindex int, tSize int){ diff --git a/types.v b/types.v index 3a53e9e..4e09f68 100644 --- a/types.v +++ b/types.v @@ -1,6 +1,6 @@ module mui -import gg +import malisipi.mfb as gg import gx pub const (