Search the Community
Showing results for tags 'button'.
-
Hi, I was wondering that I couldn't find any tutorial about creating simple UI elements. I searched the web and the forum for a while, and because I couldnt find anything useful I started this thread. The problem is I dont get how to check whether my mouse cursor is hovering over an element or not. To give you an more exact example: I just finished a simple inventory generation system where you can choose how many columns and slots it has and some other stuff. This works very well. However now I want to implement that, if you click on one of the items collected and shown in the inventory, that they get used/activated. The method I know from previous game developing experience is that you cast a ray from your camera origin through the mouse position and grab the UI elements which get intersected. My questions so far: Info: I only code in LUA. - How to check if my mouse hovers an context object (for example an image drawn with context:DrawImage()) - How to unlock my mouse so that I can move it around freely You would do me a great favor, if you tell me how this works in Leadwerks. Phoenix