Skip to content
Crutiatix edited this page Apr 29, 2017 · 5 revisions

The first thing what you'll need to do is to copy TICuare library snippet to your code. Also, it's needed to define mouse input in metadata.

Then, you'll need to update the ticuare object in order to update the status of your elements, using ticuare.update([mouseX, mouseY, mousePress] or [active_element, btnp(n)]) and lastly, you'll want to draw your buttons using ticuare.draw(). Alternatively, you can draw individual buttons using myElement:drawSelf().

-- input: mouse -- or gamepad
-- ticuare code snippet
-- ticuare elements definitions

function TIC()
  cls(0)
  ticuare.update(mouse()) -- or active element and button check for click
  ticuare.draw()
end
Clone this wiki locally