reepblue Posted July 25 Posted July 25 So far, I've found that AddText isn't exposed. TEXTAREA_SCROLLDOWN isn't exposed. Lock/Unlock isn't exposed. --Get the displays local displays = GetDisplays() --Create a window local window = CreateWindow("Console", 0, 0, 800 * displays[1].scale, 600 * displays[1].scale, displays[1], WINDOW_CENTER | WINDOW_TITLEBAR) local ui = CreateInterface(window) local parent = ui.background local x = 8 local y = 8 local sz = parent:ClientSize() local log = CreateTextArea(x, y, sz.x - x * 2, sz.y - 40 - y, parent, TEXTAREA_SCROLLDOWN) log:SetLayout(1, 1, 1, 1) local textentryfield = CreateTextField(x, sz.y - 32, sz.x - x * 2, 24, parent) textentryfield:SetLayout(1, 1, 0, 1) while not window:Closed() do local ev = WaitEvent() --ui:ProcessEvent(ev) if ev.id == EVENT_PRINT then if log.text == "" then log:AddText(ev.text) else log:AddText("\n" .. ev.text) end elseif ev.id == EVENT_WIDGETACTION then if ev.source == textentryfield then textentryfield:Lock() Print("] " .. ev.text) textentryfield:Activate() textentryfield:SetText("") textentryfield:UnLock() end elseif ev.id == EVENT_WINDOWCLOSE then return 0 end end Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
Josh Posted July 26 Posted July 26 I can see Lock/Unlock in the Lua binding code. What makes you think it is not present? I can see they are not in the documentation, which means they won't show up in autocompletion and syntax highlighting, but they should still work. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
reepblue Posted July 26 Author Posted July 26 Ok, I was under the impression that they weren't' exposed because they didn't auto complete. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
Josh Posted July 27 Posted July 27 Widget:AddText is added to Lua. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Solution Josh Posted July 27 Solution Posted July 27 Constant is renamed to TEXTAREA_AUTOSCROLL and added to Lua. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
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.