gamecreator Posted December 4, 2016 Share Posted December 4, 2016 We have it for Windows, why not Fonts? context->DrawText(text, x, y, Leadwerks::Font::CenterHorizontal | Leadwerks::Font::CenterVertical); Or maybe it would work with Contexts somehow. Absolutely the lowest priority but just a nice ease-of-life feature. Quote Link to comment Share on other sites More sharing options...
Rick Posted December 4, 2016 Share Posted December 4, 2016 Fonts in general would be nice if they could be relative to screen res somehow? Quote Link to comment Share on other sites More sharing options...
macklebee Posted December 4, 2016 Share Posted December 4, 2016 We have it for Windows, why not Fonts? context->DrawText(text, x, y, Leadwerks::Font::CenterHorizontal | Leadwerks::Font::CenterVertical); Or maybe it would work with Contexts somehow.Absolutely the lowest priority but just a nice ease-of-life feature. er... i thought we had this already? does it not work?http://www.leadwerks.com/werkspace/blog/1/entry-1712-improved-2d-drawing-command-set/ Edit-- It appears to be working at least in the beta window = Window:Create("example",0,0,600,400) context = Context:Create(window) world = World:Create() light = DirectionalLight:Create() light:SetRotation(45,45,0) camera = Camera:Create() camera:SetPosition(0,0,-3) box = Model:Box() box:SetColor(1,0.5,1,1) while not window:KeyHit(Key.Escape) do if window:Closed() then return false end box:Turn(0.5*Time:GetSpeed(),0.5*Time:GetSpeed(),0) Time:Update() world:Update() world:Render() context:SetBlendMode(Blend.Alpha) context:SetColor(1,0,0,.5) context:DrawRect(2,2,300,100) context:SetColor(1,0.5,0,.5) context:DrawRect(302,2,300,100) context:SetColor(1,1,1,1) context:DrawText(camera:GetPosition():ToString(),2,2,300,100,Text.Center) context:DrawText(camera:GetPosition():ToString(),302,2,300,100,Text.VCenter+Text.Center) context:SetBlendMode(Blend.Solid) context:Sync(true) end 1 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
gamecreator Posted December 4, 2016 Author Share Posted December 4, 2016 er... i thought we had this already? does it not work?http://www.leadwerks.com/werkspace/blog/1/entry-1712-improved-2d-drawing-command-set/ ... It appears to be working at least in the beta Ah, thank you. Just tried it in standard C and it's not there yet that I could see (nor is it in the documentation yet, probably for that reason). But great to be reminded that it'll be part of the GUI functionality! Quote Link to comment Share on other sites More sharing options...
macklebee Posted December 4, 2016 Share Posted December 4, 2016 Ah, thank you. Just tried it in standard C and it's not there yet that I could see (nor is it in the documentation yet, probably for that reason). But great to be reminded that it'll be part of the GUI functionality! That seems odd? For it to be available in lua typically means its in c++ version and ported to lua. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
gamecreator Posted December 4, 2016 Author Share Posted December 4, 2016 I misspoke. By standard I meant stable. Non-beta. 1 Quote Link to comment Share on other sites More sharing options...
Admin Posted December 5, 2016 Share Posted December 5, 2016 This has been silently added as part of the new GUI system that is still in development. 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.