Skip to content

SamuelDeboni/Microui-Jai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Microui port to Jai

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published