Allright sorry Josh,
#include "UltraEngine.h"
using namespace UltraEngine;
int sidepanelwidth = 380;
int main(int argc, const char* argv[])
{
//Get the displays
auto displays = GetDisplays();
//Create a window
auto window = CreateWindow("Ultra Engine", 0, 0, 1200, 800, displays[0], WINDOW_TITLEBAR | WINDOW_RESIZABLE | WINDOW_CENTER);
window->SetMinSize(800, 600);
//Create User Interface
auto ui = CreateInterface(window);
double bgcolor = 0.187;
ui->root->SetColor(bgcolor, bgcolor, bgcolor);
//Create Menu
auto menu = CreateMenu("", ui->root);
menu->SetColor(bgcolor, bgcolor, bgcolor);
auto menu_file = CreateMenu("File", menu);
auto menu_edit = CreateMenu("Edit", menu);
auto menu_view = CreateMenu("View", menu);
auto menu_window = CreateMenu("Window", menu);
auto menu_help = CreateMenu("Help", menu);
//Create viewport
int gap = 6;
int y_size = 30;
auto sz = ui->root->GetSize();
auto viewport = CreateTabber(gap, y_size, sz.x - sidepanelwidth - gap, sz.y - gap - y_size, ui->root);
viewport->AddItem("Albedo", true);
viewport->AddItem("Normal");
viewport->AddItem("Roughness");
viewport->AddItem("AmbientOcclusion");
viewport->AddItem("Metalness");
viewport->AddItem("Height");
viewport->SetLayout(1, 1, 1, 1);
while (true)
{
const Event ev = WaitEvent();
switch (ev.id)
{
case EVENT_WIDGETACTION:
Print("Item " + String(ev.data) + " action");
break;
case EVENT_WIDGETSELECT:
break;
case EVENT_QUIT:
case EVENT_WINDOWCLOSE:
return 0;
break;
default: break;
}
}
return 0;
}
now this should be allright, as you can see i added 2 more tabs, but a taked out the functioning of the tabber, but that doesnt change anything, as you can see, i'm running this code now:
the AO has the same position as the Metalness