Coder Social home page Coder Social logo

microui-jai's Introduction

MicroUI-Jai

A port from microui to the Jai programming language.

Example

test_window :: () {
    if Mu.begin_window("Demo Window", Mu.Rect.{40, 40, 300, 450}) {
        defer Mu.end_window();

        win := Mu.get_current_container();
        win.rect.w = max(win.rect.w, 240);
        win.rect.h = max(win.rect.h, 300);

        Mu.layout_row(.[-1], 0);

        Mu.button("Button 1");
        Mu.button("Button 2");
        res, str := Mu.textbox(text_buffer, *text_len);

        if Mu.header("Window Info", true) {
            win := Mu.get_current_container();
            
            Mu.column(.[85, -1], 0, #code {
                Mu.label("Position:");
                Mu.labelf("%d, %d", win.rect.x, win.rect.y);

                Mu.label("Size:");
                Mu.labelf("%d, %d", win.rect.w, win.rect.h);
            });
        }
        
        Mu.number(*number_box_value, 1);
        Mu.slider(*slider_value, 0, 100, 1);

        Mu.treenode("treenode", #code {
            Mu.label("depth 1");

            Mu.treenode("treenode", #code {
                Mu.label("depth 2");

                Mu.treenode("treenode", #code {
                    Mu.label("depth 3");
                });

                Mu.label("depth 2");
            });
        });
    }
}

Screenshot

2023-07-20_13-40

microui-jai's People

Contributors

samueldeboni avatar

Stargazers

 avatar Valentin Ignatev avatar

Watchers

 avatar

microui-jai's Issues

Example is broken

When you renamed layout to column you forgot to update the example

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.