~strosel


#137 Requesting Permissions 24 days ago

Ticket created by ~strosel on ~eliasnaur/gio

In the docs for app/permission it says to use the Do method on the window to request so called dangerous permissions. In app/permission/storage storeage is described as such a dangerous permission.

However as far as i can find nowhere in the docs or examples does it show gow to request a permission, someting I feel should be well documented if not even given it's own helper function.

If there allready is such documentation I would appreciate a comment on where to find it.

#90 special characters on android 3 months ago

Ticket created by ~strosel on ~eliasnaur/gio

Special characters such as åäö do not send events at all on android and as such cannot be inputed in editors.

It works on mac and i dont have oppertunity to test any other platforms.

#79 ImageOp not showing 5 months ago

Comment by ~strosel on ~eliasnaur/gio

ah, my mistake. Thanks a lot for the help!

REPORTED RESOLVED FIXED

#79 ImageOp not showing 5 months ago

Comment by ~strosel on ~eliasnaur/gio

My fix does not solve this issue. Here is a small example that gives an empty window

package main

import (
    "image"
    "image/png"
    "log"
    "os"

    "gioui.org/app"
    "gioui.org/io/system"
    "gioui.org/op"
    "gioui.org/op/paint"
    "golang.org/x/image/colornames"
)

var (
    sprite image.Image
    ops    *op.Ops
)

func loop(w *app.Window) error {
    for {
        e := <-w.Events()
        switch e := e.(type) {
        case system.DestroyEvent:
            return e.Err
        case system.FrameEvent:
            ops.Reset()
            paint.NewImageOp(image.NewUniform(colornames.Red)).Add(ops)
            paint.NewImageOp(sprite).Add(ops)
            e.Frame(ops)
        }
    }
}

func main() {
    f, err := os.Open("./sprites.png")
    if err != nil {
        log.Fatal(err)
    }
    defer f.Close()

    pic, err := png.Decode(f)
    if err != nil {
        log.Fatal(err)
    }
    sprite = pic
    ops = new(op.Ops)

    go func() {
        w := app.NewWindow()
        if err := loop(w); err != nil {
            log.Fatal(err)
        }
    }()

    app.Main()
}

#79 ImageOp not showing 5 months ago

Ticket created by ~strosel on ~eliasnaur/gio

I'm having issues with the painter.ImageOp op not drawing. I've tried both loading images from disk and using image.Uniform and yet nothing happens.

I tried looking at the source but it's a bit too advanced for me :/

grateful for answers and/or fixes