Skip to content
2 changes: 1 addition & 1 deletion area_graph.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module mui

import gg
import malisipi.mfb as gg
import gx
import math
import math.stats
Expand Down
2 changes: 1 addition & 1 deletion button.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module mui

import gg
import malisipi.mfb as gg
import gx

@[autofree_bug; manualfree]
Expand Down
2 changes: 1 addition & 1 deletion c_bindings/mui.v
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module main

import malisipi.mui
import json
import gg
import malisipi.mfb as gg

__global (
event_init mui.OnEvent
Expand Down
2 changes: 1 addition & 1 deletion checkbox.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module mui

import gg
import malisipi.mfb as gg
import gx

@[autofree_bug; manualfree]
Expand Down
15 changes: 8 additions & 7 deletions events.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module mui

import gg
import malisipi.mfb as gg
import math
import os
import sokol.sapp
Expand Down Expand Up @@ -204,24 +204,23 @@ 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"{
if object["x"].num<x && object["x"].num+object["w"].num>x{
if object["y"].num<y && object["y"].num+object["h"].num>y{
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
Expand All @@ -237,16 +236,18 @@ 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
}
}
}
}
}
}
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) {
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_widget/custom_widget.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module custom_widget

import gg
import malisipi.mfb as gg
import gx
import malisipi.mui

Expand Down
2 changes: 1 addition & 1 deletion frame.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module mui

import gg
import malisipi.mfb as gg
import gx

@[autofree_bug; manualfree]
Expand Down
2 changes: 1 addition & 1 deletion group.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module mui

import gg
import malisipi.mfb as gg
import gx

@[autofree_bug; manualfree]
Expand Down
2 changes: 1 addition & 1 deletion hyperlink.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module mui

import gg
import malisipi.mfb as gg
import gx

@[autofree_bug; manualfree]
Expand Down
2 changes: 1 addition & 1 deletion image.v
Original file line number Diff line number Diff line change
@@ -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){
Expand Down
2 changes: 1 addition & 1 deletion label.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module mui

import gg
import malisipi.mfb as gg
import gx

@[autofree_bug; manualfree]
Expand Down
2 changes: 1 addition & 1 deletion line_graph.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module mui

import gg
import malisipi.mfb as gg
import gx
import math
import math.stats
Expand Down
2 changes: 1 addition & 1 deletion list.v
Original file line number Diff line number Diff line change
@@ -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){
Expand Down
2 changes: 1 addition & 1 deletion menubar.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module mui

import gg
import malisipi.mfb as gg
import gx

@[unsafe]
Expand Down
2 changes: 1 addition & 1 deletion mui.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module mui

import gg
import malisipi.mfb as gg
import gx
import os
import math
Expand Down
2 changes: 1 addition & 1 deletion open_street_map_linux.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module mui
import math
import net.http
import os
import gg
import malisipi.mfb as gg
import gx

const (
Expand Down
2 changes: 1 addition & 1 deletion open_street_map_macos.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module mui
import math
import net.http
import os
import gg
import malisipi.mfb as gg
import gx

const (
Expand Down
2 changes: 1 addition & 1 deletion open_street_map_windows.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module mui
import math
import net.http
import os
import gg
import malisipi.mfb as gg
import gx

const (
Expand Down
2 changes: 1 addition & 1 deletion passwordbox.v
Original file line number Diff line number Diff line change
@@ -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){
Expand Down
2 changes: 1 addition & 1 deletion progress.v
Original file line number Diff line number Diff line change
@@ -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){
Expand Down
2 changes: 1 addition & 1 deletion rect.v
Original file line number Diff line number Diff line change
@@ -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){
Expand Down
2 changes: 1 addition & 1 deletion scrollbar.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module mui

import gg
import malisipi.mfb as gg
import gx

pub const (
Expand Down
2 changes: 1 addition & 1 deletion selectbox.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module mui

import gg
import malisipi.mfb as gg
import gx

@[autofree_bug; manualfree]
Expand Down
2 changes: 1 addition & 1 deletion slider.v
Original file line number Diff line number Diff line change
@@ -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){
Expand Down
2 changes: 1 addition & 1 deletion spinner.v
Original file line number Diff line number Diff line change
@@ -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){
Expand Down
2 changes: 1 addition & 1 deletion switch.v
Original file line number Diff line number Diff line change
@@ -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){
Expand Down
2 changes: 1 addition & 1 deletion table.v
Original file line number Diff line number Diff line change
@@ -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){
Expand Down
2 changes: 1 addition & 1 deletion textarea.v
Original file line number Diff line number Diff line change
@@ -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){
Expand Down
2 changes: 1 addition & 1 deletion textbox.v
Original file line number Diff line number Diff line change
@@ -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){
Expand Down
2 changes: 1 addition & 1 deletion types.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module mui

import gg
import malisipi.mfb as gg
import gx

pub const (
Expand Down