TheHellTower Posted January 18, 2023 Share Posted January 18, 2023 (edited) Hello, I wanted to change the color of my main tab, it didn't work then I wanted to add a text field, same.. When I comment the panels[1].SetColor, no color is set, but when I don't comment it, the color is set for all tabs. So today I'm asking for your help to fix both, or are they broken(not working) ? Not sure.. Screenshot Code: #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Joked", 0, 0, 800, 600, displays[0], WINDOW_TITLEBAR | WINDOW_CENTER); auto ui = CreateInterface(window); auto sz = ui->root->GetSize(); auto tabber = CreateTabber(10, 10, sz.x - 20, sz.y - 20, ui->root); tabber->AddItem("Main", true); tabber->AddItem("Settings"); std::array<std::shared_ptr<Widget>, 3> panels; sz = tabber->ClientSize(); panels[0] = CreatePanel(0, 0, sz.x, sz.y, tabber); panels[0]->SetColor(54, 57, 63, 1); panels[1] = CreatePanel(0, 0, sz.x, sz.y, tabber); panels[1]->SetColor(0.1, 0.15, 0.1, 1); panels[1]->Hidden(true); auto textfield = CreateTextField(20, 20, 300, 32, panels[0], TEXTFIELD_DEFAULT); textfield->SetText("Here is some text!"); textfield->SelectText(0, textfield->text.size()); //auto scriptEditing = CreateTextField(20, 20, 400,40, ui->root); while (true) { const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WIDGETACTION: Print("Item " + String(ev.data) + " action"); break; case EVENT_WIDGETSELECT: if (ev.source == tabber) { for (int n = 0; n < tabber->items.size(); ++n) { n == ev.data ? panels[n]->Hidden(false) : panels[n]->Hidden(true); } } break; break; case EVENT_QUIT: case EVENT_WINDOWCLOSE: return 0; break; default: break; } } return 0; } Regards. Edited January 18, 2023 by TheHellTower Add detail Quote Link to comment Share on other sites More sharing options...
Solution Josh Posted January 18, 2023 Solution Share Posted January 18, 2023 Here you go. You were calling Hidden() instead of Hide/Show(). #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Joked", 0, 0, 800, 600, displays[0], WINDOW_TITLEBAR | WINDOW_CENTER); auto ui = CreateInterface(window); auto sz = ui->root->GetSize(); auto tabber = CreateTabber(10, 10, sz.x - 20, sz.y - 20, ui->root); tabber->AddItem("Main", true); tabber->AddItem("Settings"); std::array<std::shared_ptr<Widget>, 3> panels; sz = tabber->ClientSize(); panels[0] = CreatePanel(0, 0, sz.x, sz.y, tabber); panels[0]->SetColor(54.0 / 255.0, 57.0 / 255.0, 63.0 / 255.0, 1); panels[1] = CreatePanel(0, 0, sz.x, sz.y, tabber); panels[1]->SetColor(0.1, 0.15, 0.1, 1); panels[1]->Hide(); auto textfield = CreateTextField(20, 20, 300, 32, panels[0], TEXTFIELD_DEFAULT); textfield->SetText("Here is some text!"); textfield->SelectText(0, textfield->text.size()); //auto scriptEditing = CreateTextField(20, 20, 400,40, ui->root); while (true) { const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WIDGETACTION: Print("Item " + String(ev.data) + " action"); break; case EVENT_WIDGETSELECT: if (ev.source == tabber) { for (int n = 0; n < tabber->items.size(); ++n) { n == ev.data ? panels[n]->Show() : panels[n]->Hide(); } } break; break; case EVENT_QUIT: case EVENT_WINDOWCLOSE: return 0; break; default: break; } } return 0; } 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...
TheHellTower Posted January 18, 2023 Author Share Posted January 18, 2023 5 minutes ago, Josh said: Here you go. You were calling Hidden() instead of Hide/Show(). #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Joked", 0, 0, 800, 600, displays[0], WINDOW_TITLEBAR | WINDOW_CENTER); auto ui = CreateInterface(window); auto sz = ui->root->GetSize(); auto tabber = CreateTabber(10, 10, sz.x - 20, sz.y - 20, ui->root); tabber->AddItem("Main", true); tabber->AddItem("Settings"); std::array<std::shared_ptr<Widget>, 3> panels; sz = tabber->ClientSize(); panels[0] = CreatePanel(0, 0, sz.x, sz.y, tabber); panels[0]->SetColor(54.0 / 255.0, 57.0 / 255.0, 63.0 / 255.0, 1); panels[1] = CreatePanel(0, 0, sz.x, sz.y, tabber); panels[1]->SetColor(0.1, 0.15, 0.1, 1); panels[1]->Hide(); auto textfield = CreateTextField(20, 20, 300, 32, panels[0], TEXTFIELD_DEFAULT); textfield->SetText("Here is some text!"); textfield->SelectText(0, textfield->text.size()); //auto scriptEditing = CreateTextField(20, 20, 400,40, ui->root); while (true) { const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WIDGETACTION: Print("Item " + String(ev.data) + " action"); break; case EVENT_WIDGETSELECT: if (ev.source == tabber) { for (int n = 0; n < tabber->items.size(); ++n) { n == ev.data ? panels[n]->Show() : panels[n]->Hide(); } } break; break; case EVENT_QUIT: case EVENT_WINDOWCLOSE: return 0; break; default: break; } } return 0; } Thanks haha the tab example was not up to date so I did guess it was the good call Quote Link to comment Share on other sites More sharing options...
TheHellTower Posted January 18, 2023 Author Share Posted January 18, 2023 I seen that multiple code example are not really up to date, should I fork the documentation repository and make a PR to fix some ? Quote Link to comment Share on other sites More sharing options...
Josh Posted January 18, 2023 Share Posted January 18, 2023 You are using Ultra App Kit from Steam, right? It's an older build. There's a couple of small API changes that were made for Ultra Engine, which is basically UAK + Vulkan graphics. 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...
TheHellTower Posted January 18, 2023 Author Share Posted January 18, 2023 1 minute ago, Josh said: You are using Ultra App Kit from Steam, right? It's an older build. There's a couple of small API changes that were made for Ultra Engine, which is basically UAK + Vulkan graphics. Oh then how am I supposed to use the last version ? I would like to be up to date it's better in my opinion Quote Link to comment Share on other sites More sharing options...
Josh Posted January 18, 2023 Share Posted January 18, 2023 Well, UAK is free but Ultra Engine is not free: https://www.ultraengine.com/community/store/category/1-software/ UAK is also compiled for Linux and Mac, but Ultra Engine does not yet support these platforms (although it is planned to in the future). Also, UAK has a 64 and 32-bit build for Windows, but Ultra Engine is 64-bit only. 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...
TheHellTower Posted January 18, 2023 Author Share Posted January 18, 2023 2 minutes ago, Josh said: Well, UAK is free but Ultra Engine is not free: https://www.ultraengine.com/community/store/category/1-software/ UAK is also compiled for Linux and Mac, but Ultra Engine does not yet support these platforms (although it is planned to in the future). Also, UAK has a 64 and 32-bit build for Windows, but Ultra Engine is 64-bit only. Oh okay I see basically UAK is a kind of free version of Ultra Engine if I get it correctly ! Yeah for the moment I will not buy it, it's just for a small project in free access I can't really take this right now but why not later, is there any place where I can see detailed demo of Ultra Engine ? Quote Link to comment Share on other sites More sharing options...
Josh Posted January 18, 2023 Share Posted January 18, 2023 UAK was released about 1.5 years ago when I finished the GUI system but had not finished the full 3D engine yet, so I released what I had for GUI application development. Now that the full engine is released I decided to make UAK free. Ultra Engine is currently in "early access" so there's no big demos of what it can do, but what it does offer is extremely good performance. You can try the benchmarks here if you like: https://github.com/UltraEngine/Benchmarks 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...
TheHellTower Posted January 18, 2023 Author Share Posted January 18, 2023 2 minutes ago, Josh said: UAK was released about 1.5 years ago when I finished the GUI system but had not finished the full 3D engine yet, so I released what I had for GUI application development. Now that the full engine is released I decided to make UAK free. Ultra Engine is currently in "early access" so there's no big demos of what it can do, but what it does offer is extremely good performance. You can try the benchmarks here if you like: https://github.com/UltraEngine/Benchmarks Yeah I like UAK's style and I'm glad I discovered it you did a amazing work ! So UAK is for C++ and Ultra Engine for .Net ? If yes sadly I will not be able to take it as I want to release a free access product without having to care too much about security since you can decompile .Net apps Quote Link to comment Share on other sites More sharing options...
Josh Posted January 18, 2023 Share Posted January 18, 2023 No, Ultra Engine is C++. The .NET stuff in that repository is from the Unity project. 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...
TheHellTower Posted January 18, 2023 Author Share Posted January 18, 2023 1 minute ago, Josh said: No, Ultra Engine is C++. The .NET stuff in that repository is from the Unity project. Oh okay thanks for claryfying this ! It would've had been a lot of work to rewrite the entire for another language thing anyway Quote Link to comment Share on other sites More sharing options...
TheHellTower Posted January 18, 2023 Author Share Posted January 18, 2023 And do you plan to update UAK or not anymore and only focus on Ultra Engine ? Quote Link to comment Share on other sites More sharing options...
Josh Posted January 18, 2023 Share Posted January 18, 2023 All future development will be in Ultra Engine. 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...
TheHellTower Posted January 18, 2023 Author Share Posted January 18, 2023 Just now, Josh said: All future development will be in Ultra Engine. Okay thanks ! Any date for the stable paid release ? Quote Link to comment Share on other sites More sharing options...
Josh Posted January 18, 2023 Share Posted January 18, 2023 Well, right now it's an SDK. A visual editor is in development, and once that is out I think will mark the point where it will no longer be considered "early access": https://www.ultraengine.com/community/blogs/entry/2801-ultra-engine-sdk-early-access-now-available/?tab=comments#comment-15305 I don't have an expected release date, but it's coming along pretty quickly. 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...
TheHellTower Posted January 18, 2023 Author Share Posted January 18, 2023 4 minutes ago, Josh said: Well, right now it's an SDK. A visual editor is in development, and once that is out I think will mark the point where it will no longer be considered "early access": https://www.ultraengine.com/community/blogs/entry/2801-ultra-engine-sdk-early-access-now-available/?tab=comments#comment-15305 I don't have an expected release date, but it's coming along pretty quickly. Okay perfect, will Ultra Engine only be for games or will I be able to make a program GUI with it ? Since it will be the only updated I'm interested in it Quote Link to comment Share on other sites More sharing options...
Josh Posted January 18, 2023 Share Posted January 18, 2023 You can still use it just for a GUI application, without initializing graphics or requiring drivers. The executables are a little bit bigger than UAK, but still pretty small, around 6 mb when UPX compression is used. 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...
TheHellTower Posted January 18, 2023 Author Share Posted January 18, 2023 1 minute ago, Josh said: You can still use it just for a GUI application, without initializing graphics or requiring drivers. The executables are a little bit bigger than UAK, but still pretty small, around 6 mb when UPX compression is used. Perfect ! The final output size doesn't really matter for me as long as it work but yeah probably some users would like it to be optimized as much as possible and the smallest possible but it's not really that simple so it's perfect already 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.