reepblue Posted March 16, 2019 Share Posted March 16, 2019 It looks like this now with 4.6. The dots are the arrows. All I did was create a TextArea Widget and added text to it. ConsoleWindow(const std::string& pWinTitle) { m_pWindow = ENGINE_NAMESPACE::Window::Create(pWinTitle, 0, 0, 600, 600, ENGINE_NAMESPACE::Window::Titlebar + ENGINE_NAMESPACE::Window::Center, GetWindow()); m_pGUI = GUI::Create(m_pWindow); m_pGUI->GetBase()->SetScript("Scripts/GUI/Panel.lua"); m_pLogBox = Widget::TextArea(4, 4, m_pGUI->GetBase()->GetClientSize().x - 8, m_pGUI->GetBase()->GetClientSize().y - 30 - 8, m_pGUI->GetBase()); #ifdef USE_CMD m_pTextBox = Widget::TextField("", 4, m_pGUI->GetBase()->GetClientSize().y - 30, m_pGUI->GetBase()->GetClientSize().x - 8 - 72 - 4, 26, m_pGUI->GetBase()); m_pSendBtn = Widget::Button("Send", m_pGUI->GetBase()->GetClientSize().x - 4 - 72, m_pGUI->GetBase()->GetClientSize().y - 30, 72, 26, m_pGUI->GetBase()); #endif #ifdef WIN32 std::string header = "Reep Softworks - Leadwerks Console App (" + std::string(__DATE__) + ")"; #else std::string header = "Reep Softworks - Leadwerks Console App"; #endif m_pLogBox->AddText(header); size = 0; UpdateTextBox(); } Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted March 17, 2019 Share Posted March 17, 2019 Ah okay, the text area script must not be setting the style correctly... 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 17, 2019 Share Posted March 17, 2019 Try this textarea.lua script. TextArea.lua 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...
reepblue Posted March 17, 2019 Author Share Posted March 17, 2019 Vertical works, but not horizontal. USed your new script attached above. Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted March 17, 2019 Share Posted March 17, 2019 I'm trying to figure this out. This code works fine: local window = Window:Create() local context = Context:Create(window) local gui = GUI:Create(context) local base = gui:GetBase() base:SetScript("Scripts/GUI/Panel.lua") x=20 y=20 local sep=30 widget = Widget:Slider(x,y,300,20,base) widget:SetStyle(SLIDER_SCROLLBAR) y=y+sep widget = Widget:Slider(x,y,300,20,base) widget:SetStyle(SLIDER_TRACKBAR) y=y+sep widget = Widget:Slider(x,y,40,20,base) widget:SetStyle(SLIDER_STEPPER) y=y+sep*1.5 widget = Widget:Slider(x,y,20,150,base) widget:SetStyle(SLIDER_VERTICAL+SLIDER_SCROLLBAR) x=x+sep widget = Widget:Slider(x,y,20,150,base) widget:SetStyle(SLIDER_VERTICAL + SLIDER_TRACKBAR) x=x+sep widget = Widget:Slider(x,y,20,40,base) widget:SetStyle(SLIDER_VERTICAL + SLIDER_STEPPER) x=x+sep while true do if window:Closed() then return end if window:KeyHit(Key.Escape) then return end while EventQueue:Peek() do local event = EventQueue:Wait() if event.id == Event.WidgetAction then System:Print("WidgetAction") elseif event.id == Event.WidgetSelect then System:Print("WidgetSelect") end end context:Sync() end 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...
reepblue Posted March 17, 2019 Author Share Posted March 17, 2019 Yep, that code loads fine. (Linux too!) I think it's something with the TextArea script exclusively. Noticed that I'm just calling Widget::TextArea without a script. Does the engine call the TextArea.lua script automatically? Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted March 17, 2019 Share Posted March 17, 2019 Yes. 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 23, 2019 Share Posted March 23, 2019 Here's the fix. TextArea.lua 1 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...
Recommended Posts