Search found 7 matches
- Sat Oct 07, 2023 1:39 pm
- Forum: Support and Development
- Topic: Optimal way to track mouse-hover/touch over a tile position ?
- Replies: 10
- Views: 14063
Optimal way to track mouse-hover/touch over a tile position ?
Beginner qn. i have a tilemap. And i use if loops to draw image/rectangle correspnding the table to render it on screen. And currently i use a method that calculates the mouse's x-coordinate and dividing it by the individual tile width. The same process is repeated for the y-coordinate to determine...
- Sun Sep 24, 2023 10:07 am
- Forum: Support and Development
- Topic: Efficient Mouse Interaction and Event Handling for Objects
- Replies: 14
- Views: 9466
Re: Efficient Mouse Interaction and Event Handling for Objects
One other thing, that is relatively off-topic. I have seen browsers rendering css more effectively. Say for instance even the hover function looks like it relatively effortless. Does this mean lua over love2d, has an inherent shortcoming to implement such sort of. Or am i so unaware of some fundame...
- Fri Sep 22, 2023 1:01 pm
- Forum: Support and Development
- Topic: Efficient Mouse Interaction and Event Handling for Objects
- Replies: 14
- Views: 9466
Re: Efficient Mouse Interaction and Event Handling for Objects
One other thing, that is relatively off-topic. I have seen browsers rendering css more effectively. Say for instance even the hover function looks like it relatively effortless. Does this mean lua over love2d, has an inherent shortcoming to implement such sort of. Or am i so unaware of some fundamen...
- Fri Sep 22, 2023 10:41 am
- Forum: Support and Development
- Topic: Efficient Mouse Interaction and Event Handling for Objects
- Replies: 14
- Views: 9466
Re: Efficient Mouse Interaction and Event Handling for Objects
There are a few other methods, but they are all highly situation dependent. This if its in range check is the best option to use usually. So whats wrong with it? Where is your complain? This is easy to write and fast to execute and there is nothing to improve. Unless you have to deal with say a few...
- Fri Sep 22, 2023 8:42 am
- Forum: Support and Development
- Topic: Efficient Mouse Interaction and Event Handling for Objects
- Replies: 14
- Views: 9466
Re: Efficient Mouse Interaction and Event Handling for Objects
I am also a beginner in Lua and my opinion is, that if you want this feature, you have to calculate the positions of all picutures constantly, and this can be very much depending on how many pictures need to be tracked.It could be possible for one or two pictures, but not for a hundred pictures. ye...
- Fri Sep 22, 2023 8:38 am
- Forum: Support and Development
- Topic: Efficient Mouse Interaction and Event Handling for Objects
- Replies: 14
- Views: 9466
Re: Efficient Mouse Interaction and Event Handling for Objects
Here you can move rectangles with the mouse: https://love2d.org/forums/viewtopic.php?p=254122#p254122 No this is still quite buggy, unless i am mistaken. Moreover i think that it is slower, than one might expect. One improvement would be to lock the active rectangle and release the lock only when m...
- Tue Sep 19, 2023 6:57 am
- Forum: Support and Development
- Topic: Efficient Mouse Interaction and Event Handling for Objects
- Replies: 14
- Views: 9466
Efficient Mouse Interaction and Event Handling for Objects
_______new to lua & love2d ___________ Is there a simple way/library to detect hovering, keypress over an object(such as an image, or a shape) ? All methods i see online and in forums, refer to the idea where we trace back to see if the mouse-co ordinates'range is with the image position co-ord...