Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

ChronesDev/Index2

Repository files navigation

⚠️ This project has been deprecated by chr

Index2

Index, an adaptive UI Engine for any renderer.

What is Index?
*Index is a UI layout engine which can be adopted in any renderer. What Index does is calculating the alignment and position of each UIElement. Also it supports hit testing.

Quickdemo

#include <index>
#include <index_ui>

#include <index_macros>
#include <index_ui_macros>

int main()
{
    using namespace Index;
    using namespace Index::UI;

    sub ContainerMapper mapper;
    sub Container mapn
    {
        set Name = "MyElementName";

        sub VStack mapn
        {
            set MinWidth = 30;

            sub Container mapn 
            {
                set Name = "My Container 1";
                set MinSize = { 10, 20 };
            };

            sub Container mapn { set Name = "My Container 2"; };
        };
    };

    // Work in progress
    Index::UI::DebugHelpers::PrintTree(mapper.Make());
}

#include <index_macros_end>
#include <index_ui_macros_end>

Output

(Container) "MyElementName"
|-- (VStack)
    |-- (Container) "My Container 1"
    |-- (Container) "My Container 2"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published