vlang / ui

A cross-platform UI library written in V
MIT License
2.31k stars 154 forks source link

Assertion Failed: sokol #534

Open wocan23 opened 12 months ago

wocan23 commented 12 months ago

V version: 0.4.0 UI version: 0.0.4 OS: Windows Server 2016 What did you do?


struct App {
    mut:
    window     &ui.Window = unsafe { nil }
    first_name string
    last_name  string
}

fn main() {
    mut app := &App{}
    app.window = ui.window(
        width: 600
        height: 400
        title: 'V UI Demo'
        children: [
            ui.row(
                margin: ui.Margin{10, 10, 10, 10}
                children: [
                    ui.column(
                        width: 200
                        spacing: 13
                        children: [
                            ui.textbox(
                                max_len: 20
                                width: 200
                                placeholder: 'First name'
                                text: &app.first_name
                            ),
                            ui.textbox(
                                max_len: 50
                                width: 200
                                placeholder: 'Last name'
                                text: &app.last_name
                            ),
                        ]
                    ),
                ]
            ),
        ]
    )
    ui.run(app.window)
}

What did you expect to see? image

What did you see instead? e324195f2892ac2f645d1407ed9dd1c /