Vida Marcell Posted August 19, 2021 Share Posted August 19, 2021 #include "UltraEngine.h" using namespace UltraEngine; const int STATUSBARHEIGHT = 32; const int SIDEPANELWIDTH = 300; const int CONSOLEHEIGHT = 120; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 920, 680, displays[0]); //Create User Interface auto ui = CreateInterface(window); iVec2 sz = ui->root->ClientSize(); auto mainmenu = CreateMenu("", ui->root); mainmenu->SetColor(0, 1, 1); auto statusbar = CreatePanel(0, sz.y - STATUSBARHEIGHT, sz.x, STATUSBARHEIGHT, ui->root); statusbar->SetLayout(1, 1, 0, 1); statusbar->SetColor(0, 1, 0); auto mainpanel = CreatePanel(0, mainmenu->position.y + mainmenu->size.y, sz.x, sz.y - mainmenu->size.y - mainmenu->position.y - statusbar->size.y, ui->root); mainpanel->SetLayout(1, 1, 1, 1); sz = mainpanel->ClientSize(); mainpanel->SetColor(0, 0, 1); auto sidepanel = CreatePanel(sz.x - SIDEPANELWIDTH, 0, SIDEPANELWIDTH, sz.y, mainpanel); sidepanel->SetLayout(0, 1, 1, 1); sidepanel->SetColor(1, 0, 0); while (window->Closed() == false) { WaitEvent(); } return 0; } Quote Link to comment Share on other sites More sharing options...
Roland Posted August 19, 2021 Share Posted August 19, 2021 sidepanel->SetLayout(1, 0, 1, 1); Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Vida Marcell Posted August 19, 2021 Author Share Posted August 19, 2021 Its not working Quote Link to comment Share on other sites More sharing options...
Josh Posted August 19, 2021 Share Posted August 19, 2021 auto sidepanel = CreatePanel(0, 0, SIDEPANELWIDTH, sz.y, mainpanel); sidepanel->SetLayout(1, 0, 1, 1); Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Roland Posted August 19, 2021 Share Posted August 19, 2021 Ooops I missed one line :) auto sidepanel = CreatePanel(0, 0, SIDEPANELWIDTH, sz.y, mainpanel); sidepanel->SetLayout(0, 1, 1, 1); sidepanel->SetColor(1, 0, 0); 1 Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Vida Marcell Posted August 19, 2021 Author Share Posted August 19, 2021 Thanks Josh, Thanks Roland ? 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.