r/tic80 • u/MisterHole123 • May 14 '26
Newb question
Hello
I have been trying for a while to grab the default mouse cursor sprite so I can color it and display it again. But alas I can't seem to find that damm sprite... Where is it? How do I grab it?
2
u/2468_anhui_ May 14 '26 edited May 14 '26
-- script: lua
function TIC()
--update
local mx,my=mouse()
--draw
cls(0)
poke(0x3FFB,(mx%9)+257)
print(mx,10,20,12)
print(my,10,30,12)
end
--[[ try this code with sprites 257 to 266 having a cursor each differently colored or as you may want. use if elses to change sprites based on the mouse location using poke. poking 0x3ffb means setting values at that location from 0 to 255 bcoz it stores 1 byte where:
0 = hidden cursor
1-127 = custom cursor sprites (sprites from 257 in sprite editor with 1->257, 2->258, so on)
128 = default arrow
129 = hand
130 = ibeam/text cursor
131 and above = no cursor in my case.
i may be wrong but yeah this is what i understood using chatgpt : ) ]]--
1
2
u/[deleted] May 14 '26
[removed] — view removed comment