or
myText1=newText('AppGameKit_1', 60 )
SetTextPosition(myText1,100,100)
myText2=newText('AppGameKit_2', 60 )
SetTextPosition(myText2,100,200)
myText3=newText('AppGameKit_3', 60 )
SetTextPosition(myText3,100,300)
do
if GetPointerPressed() = 1
textHit = GetTextHit( GetPointerX(), GetPointerY())
if textHit <> 0
SetTextColorAlpha(textHit, 100)
endif
elseif GetPointerReleased() = 1
if textHit <> 0
if GetTextColorAlpha(textHit) < 255
SetTextColorAlpha(textHit, 255)
endif
endif
endif
Sync()
loop
function newText(_label as string, _size as float)
if all_text.length = -1 // if array empty
global dim all_text[] as integer
endif
temp = CreateText(_label)
SetTextSize(temp, _size)
all_text.insert(temp)
endfunction temp
function GetTextHit( _x as float, _y as float )
result = 0
for i=0 to all_text.length
if GetTextHitTest(all_text[i], _x, _y ) = 1
result = all_text[i]
exitfunction result
endif
next i
endfunction result
https://www.instagram.com/qugurun/