Dreikblack Posted March 24 Share Posted March 24 Style should make UI looks brown (to check if it's loaded correctly) Also file name is looks wrong if it's not Latin symbolsData.zip #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto package = LoadPackage("Data.zip"); if (package == nullptr) { Notify("No Package Found"); } package->FileType(""); auto plugin = LoadPlugin("Plugin\\FITextureLoader"); if (!plugin) Notify("No plugin Found"); else Notify("Plugin Found"); auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 500, 500, displays[0], WINDOW_DEFAULT); auto framebuffer = CreateFramebuffer(window); auto world = CreateWorld(); auto font = LoadFont("Fonts\\arial.ttf"); auto ui = CreateInterface(world, font, framebuffer->GetSize()); ui->SetRenderLayers(2); auto uiCamera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); uiCamera->SetPosition((float)framebuffer->GetSize().x * 0.5f, (float)framebuffer->GetSize().y * 0.5f, 0); uiCamera->SetRenderLayers(2); uiCamera->SetClearMode(CLEAR_DEPTH); ui->LoadColorScheme("Style.json"); auto btn = CreateButton("TEST", 10, 10, 100, 100, ui->root); auto dir = LoadDir("Ru"); for (WString localFile : dir) { btn->SetText(localFile); Print(localFile); } //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; } Quote Link to comment Share on other sites More sharing options...
Josh Posted March 26 Share Posted March 26 It's normal that a plugin cannot be loaded from a zip archive, because under the hood this is using the Win32 function LoadLibrary. There may be a win32 function to load a library from memory, but I have not confirmed whether there the equivalent functions for Mac and Linux exist. 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...
Josh Posted March 26 Share Posted March 26 As for the font rendering, I need to modify the way the font texture works... 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...
Dreikblack Posted March 27 Author Share Posted March 27 What about issue with Style.json not being loaded from archive? Quote Link to comment Share on other sites More sharing options...
Josh Posted March 27 Share Posted March 27 15 minutes ago, Dreikblack said: What about issue with Style.json not being loaded from archive? I was able to fix this. 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...
Dreikblack Posted March 29 Author Share Posted March 29 Also LoadCursorFromFileW() does not load an icon from zip. But it's WinUser class tho. Quote Link to comment Share on other sites More sharing options...
Josh Posted March 29 Share Posted March 29 59 minutes ago, Dreikblack said: Also LoadCursorFromFileW() does not load an icon from zip. But it's WinUser class tho. Something like this might help: const int guardbandSize = 8; FILE* fs = fopen("action.ani", "rb"); fseek(fs, 0,SEEK_END); int dwSize = ftell(fs); fseek(fs, 0,SEEK_SET); char* memory = new char[dwSize + guardbandSize]; fread(memory, 1, dwSize, fs); memset(memory + dwSize, 0, guardbandSize); fclose(fs); cursor = (HCURSOR)CreateIconFromResource((PBYTE)memory,dwSize,FALSE,0x00030000); delete memory; 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...
Solution Dreikblack Posted May 20 Author Solution Share Posted May 20 Seems to be resolved at some point in beta branch 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.