Search the Community
Showing results for tags 'Programing'.
-
I've been spending the past few days trying to figure out how to add SDL2 to Leadwerks, as it has an additional Lua binding that would be nice to have. Not to mention the gamepad support (which is the main reason because just adding XInput only would give support for XBox 360 and Dualshock 3 controllers). Not having any experience with an engine like Leadwerks, application building, or libraries has severely impacted my ability to figure out what to do in my current situation. I know I need to include the library and expose it to Lua, but I don't know how to do that, and I don't know how to actually add it to the engine either. I've taken a look at some resources online, such as lazyfoo, and it hasn't really helped me understand. Any help or other resources that could be passed along to me would be greatly appreciated. Thanks!
- 4 replies
-
- programing
- lua
-
(and 2 more)
Tagged with:
-
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