Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Using GetTextHitTest

Author
Message
badkneecap
13
Years of Service
User Offline
Joined: 21st Jun 2010
Location:
Posted: 29th Jan 2012 17:35
I'm trying to make by code more flexible. I have the following code:

x# = GetPointerX ( )
y# = GetPointerY ( )

if x# >= 110 and x# < 130 and y# > 250 and y# < 270
tChar1 = chr(AddChar(asc(tChar1)))
SetTextString ( g_Initials [ 1 ], tChar1 )
endif

I'm replacing the if statement with the following:

If GetTextHitTest(g_Initials[1], x#, y#)
tChar1 = Chr(AddChar(asc(tChar1)))
SetTextString(g_Initials[1], tChar1)
EndIf

I'm not getting the expected results (it's not working). What am I missing?
badkneecap
13
Years of Service
User Offline
Joined: 21st Jun 2010
Location:
Posted: 29th Jan 2012 17:48
Wow, never mind. Bad coding. I was looking at the wrong array index.

Login to post a reply

Server time is: 2024-05-04 23:11:01
Your offset time is: 2024-05-04 23:11:01