From e4f26f3844c77b8e10dc49f0db95ee34386b3c00 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 14 Jul 2024 15:26:59 +0200 Subject: WIP: Update to gioui.org v0.7.1 TODO: There is a race condition. It has to be fixed since the program immediately crashes. Building the software is possible. --- gui.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gui.go') diff --git a/gui.go b/gui.go index 55730df..9b8e04d 100644 --- a/gui.go +++ b/gui.go @@ -4,14 +4,18 @@ import ( "image/color" "log" - "gioui.org/io/system" + "gioui.org/app" "gioui.org/layout" "gioui.org/text" "gioui.org/widget/material" ) -func (l *Limox) draw(e system.FrameEvent) { - gtx := layout.NewContext(&l.Operations, e) +func (l *Limox) draw(e app.FrameEvent) { + gtx := app.NewContext(&l.Operations, e) + + if l.MainButton.Clicked(gtx) { + l.buttonCallback() + } flex := layout.Flex{ Axis: layout.Vertical, -- cgit v1.2.3-70-g09d2