Cleanups and comments.
This commit is contained in:
+4
-4
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"git.wow.st/gmp/giowrap"
|
||||
|
||||
"image/color"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
@@ -40,7 +41,7 @@ func main() {
|
||||
"push",
|
||||
text.Center,
|
||||
)
|
||||
bg := giowrap.NewBackground(giowrap.Rgb(0x3c98c6), ui.Dp(4))
|
||||
bg := giowrap.NewBackground(color.RGBA{A: 0xff, R: 0x3c, G: 0x98, B: 0xc6}, ui.Dp(4))
|
||||
btn := giowrap.Clickable(bg(lbl))
|
||||
|
||||
for {
|
||||
@@ -53,15 +54,14 @@ func main() {
|
||||
return
|
||||
case app.DrawEvent:
|
||||
ctx = ctx.Reset(e)
|
||||
ctx = giowrap.LayoutWithContext(ctx,
|
||||
OuterInset(
|
||||
ctx = OuterInset(
|
||||
f(
|
||||
e1,
|
||||
giowrap.Flexible(5),
|
||||
InnerInset(e2),
|
||||
giowrap.Flexible(10),
|
||||
btn,
|
||||
)))
|
||||
)).Layout(ctx)
|
||||
ctx.Draw()
|
||||
if btn.Clicked(ctx) {
|
||||
log.Print("Clicked: " + e2.Text() )
|
||||
|
||||
Reference in New Issue
Block a user