Acnologiak Posted September 12, 2020 Share Posted September 12, 2020 GUI* gui = GUI::Create(context); Widget* base = gui->GetBase(); base->SetScript("Scripts/GUI/Panel.lua"); Widget* button = Widget::Button("Spawn", 20, 20, 100, 40, base); button->SetScript("Scripts/GUI/Button.lua"); Image* img = new Image(); std::cout << img->Initialize(L"Materials/Developer/bluegrid.tex") << std::endl; button->SetImage(img); I used standard lua scripts. Quote Link to comment Share on other sites More sharing options...
GorzenDev Posted September 13, 2020 Share Posted September 13, 2020 if i remember correctly you need the GUI to initialize the image. example: logo = Widget::Panel( 0, 0, gui->GetBase()->GetClientSize().width, gui->GetBase()->GetClientSize().height, gui->GetBase()); logo->SetScript("Scripts/GUI/Custom/ImagePanel.lua"); Image* logoImg = gui->LoadImageA("Materials/Logo/leadwerks_logo.tex"); logo->SetImage(logoImg); logo->Redraw(); logoImg->Release(); 1 1 Quote Link to comment Share on other sites More sharing options...
Acnologiak Posted September 15, 2020 Author Share Posted September 15, 2020 Thanks 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.