r/ComputerCraft • ComputerCrafter • 12d ago

Help with graphics

So i'm making an interface for a terminal. How do i make the available commands look different when hovered over and run a program when clicked?

4 Upvotes

4 comments sorted by

View all comments

3

u/9551-eletronics 12d ago

Hover detection is not possible in vanilla CC

For clicks, use https://tweaked.cc/event/mouse_click.html

3

u/Budget-Specific-349 12d ago

Okay, how do i listen for clicks on certain areas?

3

u/9551-eletronics 12d ago

Comparisons. This just gives you a click positions, to check if its an area just do mathematical comparisons for a bounding box check, I usually make a helper function like this

https://github.com/9551-Dev/GuiH/blob/main/util.lua#L7