Support for standard cursors.
It is possible to set custom cursors (*.ani, *.cur).
#import_plugin Cursor
AppStarting = Cursor.CreateCursor('AppStarting.ani')
UpArrow = Cursor.CreateCursor('UpArrow.ani')
//or -2 .. -22
//Cursor.SetCursor(-22)
//Cursor.SetCursorDefault(-7)
//Cursor for title bar
Cursor.SetCursorDefault(AppStarting)
//cursor for client
Cursor.SetCursor(UpArrow)
//-----------------------------------------
Edit = CreateEditBox()
SetEditBoxBorderSize( Edit, 0 )
SetEditBoxPosition(Edit, 50, 50)
//-----------------------------------------
check_cursor = 0
do
if GetEditBoxHitTest(Edit, GetPointerX(), GetPointerY()) = 1
if check_cursor = 0
check_cursor = 1
Cursor.SetCursor(-4)
endif
else
if check_cursor = 1
check_cursor = 0
Cursor.SetCursor(UpArrow)
endif
endif
Sync()
loop
function GetEditBoxHitTest( iEditBoxIndex as integer, x as float, y as float )
eX# = GetEditBoxX(iEditBoxIndex)
eY# = GetEditBoxY(iEditBoxIndex)
eW# = GetEditBoxWidth(iEditBoxIndex)
eH# = GetEditBoxHeight(iEditBoxIndex)
if x > eX# and x < eX#+eW# and y > eY# and y < eY#+eH#
result = 1
else
result = 0
endif
endfunction result
This is not the final result, play around and tell me.
UPD: I kind of fixed it.https://www.instagram.com/qugurun/