Yue Posted July 27, 2017 Share Posted July 27, 2017 Hello in my learning process, I created a simple button to exit the program through the mouse interaction. The drawback is that I do not know how to do the output? Any suggestions? function Script:PostRender(context) context:SetBlendMode(Blend.Alpha) context:DrawImage(baseBoton,100,100,128,128) context:DrawText("EXIT",145,155 ) context:DrawText("Mouse position: "..window:GetMousePosition():ToString(), 2, 2) local mouse = window:GetMousePosition() if mouse.x > 100 and mouse.x < 225 then if mouse.y > 146 and mouse.y < 176 then context:DrawText("Over Button", 2, 20) if window:MouseDown(Key.LButton) then end end end context:SetBlendMode(Blend.Solid) end Quote Link to comment Share on other sites More sharing options...
Rick Posted July 27, 2017 Share Posted July 27, 2017 What do you mean do the output? Thats a fairly primitive style of ui but it looks like I'm that certain case yiu would set some variable that causes the app to exit? Quote Link to comment Share on other sites More sharing options...
Yue Posted July 27, 2017 Author Share Posted July 27, 2017 Hello, I'm using version 4.3. The idea is to close the application. I do not know if it will delete the button and the world before or leadwerks does that automatically. Quote Link to comment Share on other sites More sharing options...
Rick Posted July 27, 2017 Share Posted July 27, 2017 If the goal is to close the Game then I wouldn't worry about what gets deleted as the OS will free up everything when the app ends. 1 Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted July 28, 2017 Share Posted July 28, 2017 just fyi: If you are sticking to 4.3 you can use https://bitbucket.org/Aggror/flowgui which is free. 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.