Jump to content

_MouseHover UDF


marfdaman
 Share

Recommended Posts

MARFDAMAN!!!!

That's a very very very nice future !!

but how to use it with 'Guictrlsetpic' ?

can you give me a example Gui with picture buttons :wacko:

Recards JPAM

ps; Superslim bedacht man ! :D

Tnx :D , if you'll wait untill probably this evening, I'm currently messing with things as to make them easier, and to take away the need for the restrictions. Check back to see when I've updated it , it will be much easier to use than it is now.

Alzo

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

  • Replies 89
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Check it now. You must have looked while I was updating the post and removed it :D

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

_MouseHover.au3 radically updated, examples updated too.

If you don't understand how it works, look at the examples first!

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

OK, I see.

You've taken many of the functions OUT of the UDF and reformulated them in the individual app.

Got it.

Thanks

Yes, so there's no need to worry about functions that are not supported by "Execute", and because I personally just find this to be more practical.

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

Yup, much cleaner. This way each app does what it needs for HoverFound, HoverLost and Process and your UDF doesn't have to support ever condition possible -- which as of yesterday was where it was headed.

Thanks

Link to comment
Share on other sites

Added a very simple example of user-created buttons, put the images in the same dir as the script.

Note: the button is just an image, not a real one. -> Probably needless to say :">

ButtonHovered.bmpButtonNormal.bmpButtonPressed.bmp

#include <GUIConstants.au3>
#include "_MouseHover.au3"
#include "_PressDetect.au3"
; == GUI generated with Koda ==
$Form1 = GUICreate("AForm1", 257, 101, 192, 125)
$Button1 = GUICtrlCreateButton("AButton1", 48, 24, 180, 50, $BS_BITMAP)
GUICtrlSetImage(-1, @ScriptDir & "\ButtonNormal.bmp")
GUISetState(@SW_SHOW)

_HoverAddCtrl($Button1)
_PressDetectAddCtrl($Button1)

AdlibEnable("_CheckFunctions", 50)

While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
        ;;;;;;;
    EndSelect
WEnd
Exit

Func _CheckFunctions()
    $ControlID = _HoverCheck()
    If IsArray($ControlID) Then
        If $ControlID[0] = "AcquiredHover" Then
            _HoverFound($ControlID[1])
        Else
            _HoverLost($ControlID[1])
        EndIf
    EndIf
    $ControlID2 = _PressDetect()
    If IsArray($ControlID2) Then
        If $ControlID2[0] = "ButtonDePressed" Then
            _ButtonDePressed($ControlID2[1])
        Else
            _ButtonUnPressed($ControlID2[1])
        EndIf
    EndIf
EndFunc

Func _HoverFound($ControlID)
    Switch $ControlID
        Case $Button1
            GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonHovered.bmp")
    EndSwitch
EndFunc

Func _HoverLost($ControlID)
    Switch $ControlID
        Case $Button1
            GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonNormal.bmp")
    EndSwitch
EndFunc

Func _ButtonDePressed($ControlID)
    Switch $ControlID
        Case $Button1
            GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonPressed.bmp")
    EndSwitch
EndFunc

Func _ButtonUnPressed($ControlID)
    Switch $ControlID
        Case $Button1
            GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonHovered.bmp")
    EndSwitch
EndFunc

Alzo

Edited by marfdaman

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

dang you update this so fast.. this is useful!

btw the example in the 2nd page doesn't work with all the changes...

lol, I forgot about that one...updated it now, it should work!

Edit: Is it a forum bug, or has this topic really been viewed over 1800 times in 2 days :D

Alzo

Edited by marfdaman

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

Cool..I think i'll contribute to this project here's

a slightly modified version of your example.. it puts the 4 functions into one..

#include <GUIConstants.au3>
#include "_MouseHover.au3"
#include "_PressDetect.au3"
; == GUI generated with Koda ==
$Form1 = GUICreate("AForm1", 257, 101, 192, 125)
$Button1 = GUICtrlCreateButton("AButton1", 48, 24, 180, 50, $BS_BITMAP)
GUICtrlSetImage(-1, @ScriptDir & "\ButtonNormal.bmp")
GUISetState(@SW_SHOW)

_HoverAddCtrl($Button1)
_PressDetectAddCtrl($Button1)

AdlibEnable("_CheckFunctions", 50)

While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
       ;;;;;;;
    EndSelect
WEnd
Exit

Func _CheckFunctions()
    $ControlID = _HoverCheck()
    If IsArray($ControlID) Then
        If $ControlID[0] = "AcquiredHover" Then
            _Buttons($ControlID[1],'HoverFound')
        Else
            _Buttons($ControlID[1],'HoverLost')
        EndIf
    EndIf
    $ControlID2 = _PressDetect()
    If IsArray($ControlID2) Then
        If $ControlID2[0] = "ButtonDePressed" Then
            _Buttons($ControlID2[1],'ButtonsDepressed')
        Else
            _Buttons($ControlID2[1],'ButtonUnpressed')
        EndIf
    EndIf
EndFunc

Func _Buttons(ByRef $ControlID,$ButtonState)
    If $ButtonState = 'HoverFound' Then
        Switch $ControlID
            Case $Button1
                GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonHovered.bmp")
        EndSwitch
    ElseIf $ButtonState = 'HoverLost' Then
        Switch $ControlID
            Case $Button1
                GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonNormal.bmp")
        EndSwitch
    ElseIf $ButtonState = 'ButtonDepressed' Then
        Switch $ControlID
            Case $Button1
                GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonPressed.bmp")
        EndSwitch
    ElseIf $ButtonState = 'ButtonUnpressed' Then
        Switch $ControlID
            Case $Button1
                GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonHovered.bmp")
        EndSwitch
    EndIf
EndFunc
Link to comment
Share on other sites

And another example that demostrates the use of 3 buttons along with the status of button states

#include <GUIConstants.au3>
#include "_MouseHover.au3"
#include "_PressDetect.au3"


$Form1 = GUICreate("MouseHover Example", 275, 342, 459, 121)
$Button1 = GUICtrlCreateButton("AButton1", 37, 35, 198, 49, $BS_BITMAP)
GUICtrlSetImage(-1, @ScriptDir & "\ButtonNormal.bmp")
$Button2 = GUICtrlCreateButton("AButton1", 37, 112, 198, 49, $BS_BITMAP)
GUICtrlSetImage(-1, @ScriptDir & "\ButtonNormal.bmp")
$Button3 = GUICtrlCreateButton("AButton1", 37, 186, 198, 49, $BS_BITMAP)
GUICtrlSetImage(-1, @ScriptDir & "\ButtonNormal.bmp")
$StatusBar = GUICtrlCreateLabel("Status bar", 0, 316, 275, 26, -1, $WS_EX_STATICEDGE)
GUICtrlSetBkColor(-1, 0xD4D0C8)
GUISetState(@SW_SHOW)
_HoverAddCtrl($Button1)
_PressDetectAddCtrl($Button1)
_HoverAddCtrl($Button2)
_PressDetectAddCtrl($Button2)
_HoverAddCtrl($Button3)
_PressDetectAddCtrl($Button3)
;----------------
;Add more here
;----------------

;AdlibEnable("_CheckFunctions", 50)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
        _CheckFunctions()
    EndSelect
WEnd
Exit
;----------------
;Don't modify!
;----------------
Func _CheckFunctions()
    $ControlID = _HoverCheck()
    If IsArray($ControlID) Then
        If $ControlID[0] = "AcquiredHover" Then
            _Buttons($ControlID[1],'HoverFound')
        Else
            _Buttons($ControlID[1],'HoverLost')
        EndIf
    EndIf
    $ControlID2 = _PressDetect()
    If IsArray($ControlID2) Then
        If $ControlID2[0] = "ButtonDePressed" Then
            _Buttons($ControlID2[1],'ButtonsDepressed')
        Else
            _Buttons($ControlID2[1],'ButtonUnpressed')
        EndIf
    EndIf
EndFunc

Func _Buttons(ByRef $ControlID,$ButtonState)
;--------------
;Button Hovered
;--------------
    If $ButtonState = 'HoverFound' Then
        Switch $ControlID
            Case $Button1
                GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonHovered.bmp")
                GUICtrlSetData($StatusBar,'Button 1 Hovered')
            Case $Button2
                GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonHovered.bmp")
                GUICtrlSetData($StatusBar,'Button 2 Hovered')
            Case $Button3
                GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonHovered.bmp")
                GUICtrlSetData($StatusBar,'Button 3 Hovered')
        EndSwitch
;--------------
;Button Not Hovered
;--------------
    ElseIf $ButtonState = 'HoverLost' Then
        Switch $ControlID
            Case $Button1
                GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonNormal.bmp")
                GUICtrlSetData($StatusBar,'Status Bar')
            Case $Button2
                GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonNormal.bmp")
                GUICtrlSetData($StatusBar,'Status Bar')
            Case $Button3
                GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonNormal.bmp")
                GUICtrlSetData($StatusBar,'Status Bar')
        EndSwitch
;--------------
;Button Pressed
;--------------
    ElseIf $ButtonState = 'ButtonsDepressed' Then
        Switch $ControlID
            Case $Button1
                GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonPressed.bmp")
                GUICtrlSetData($StatusBar,'Button 1 Pressed')
            Case $Button2
                GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonPressed.bmp")
                GUICtrlSetData($StatusBar,'Button 2 Pressed')
            Case $Button3
                GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonPressed.bmp")
                GUICtrlSetData($StatusBar,'Button 3 Pressed')
        EndSwitch
;--------------
;Button Not Pressed
;--------------
    ElseIf $ButtonState = 'ButtonUnpressed' Then
        Switch $ControlID
            Case $Button1
                GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonHovered.bmp")
                GUICtrlSetData($StatusBar,'Button 1 Hovered')
            Case $Button2
                GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonHovered.bmp")
                GUICtrlSetData($StatusBar,'Button 2 Hovered')
            Case $Button3
                GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonHovered.bmp")
                GUICtrlSetData($StatusBar,'Button 3 Hovered')
        EndSwitch
    EndIf
EndFunc
Link to comment
Share on other sites

@ WTS: tnx for the examples, I really appreciate it :D , but I noticed a bug in your first one: change

_Buttons($ControlID2[1],'ButtonsDepressed')oÝ÷ Ø l %m)¨v'âyܨº»rÝ¢w¬¡«-¢Èh¨¦W­«bµÆ§j[(mæ'¯yÜ"¶"^趹B­æ­xøßÛ(®Vz[(¯ZµëÞ¬ZvÚ+zȳzØ^¢¸ v¥¦'-º·¨|­¶Ï­ë,yÖÛ(#fjÛZr§ØZ¶Ú(jÛZr

Alzo

ButtonPressed.bmp

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

I like the new way of doing things, what about this:

#include <GUIConstants.au3>
#include "_MouseHover.au3"
#include "_PressDetect.au3"
; == GUI generated with Koda ==
$Form1 = GUICreate("AForm1", 257, 101, 192, 125)
$Button1 = GUICtrlCreatePic(@ScriptDir & "\ButtonNormal.bmp", 48, 24, 171, 42)
GUISetState(@SW_SHOW)

_HoverAddCtrl($Button1)
_PressDetectAddCtrl($Button1)

AdlibEnable("_CheckFunctions", 50)

While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
        ;;;;
    EndSelect
WEnd
Exit

Func _CheckFunctions()
    $ControlID = _HoverCheck()
    If IsArray($ControlID) Then
        If $ControlID[0] = "AcquiredHover" Then
            _HoverFound($ControlID[1])
        Else
            _HoverLost($ControlID[1])
        EndIf
    EndIf
    $ControlID2 = _PressDetect()
    If IsArray($ControlID2) Then
        If $ControlID2[0] = "ButtonDePressed" Then
            _ButtonDePressed($ControlID2[1])
        Else
            _ButtonUnPressed($ControlID2[1])
        EndIf
    EndIf
EndFunc

Func _HoverFound($ControlID)
    Switch $ControlID
        Case $Button1
            GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonHovered.bmp")
    EndSwitch
EndFunc

Func _HoverLost($ControlID)
    Switch $ControlID
        Case $Button1
            GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonNormal.bmp")
    EndSwitch
EndFunc

Func _ButtonDePressed($ControlID)
    Switch $ControlID
        Case $Button1
            GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonPressed.bmp")
    EndSwitch
EndFunc

Func _ButtonUnPressed($ControlID)
    Switch $ControlID
        Case $Button1
            GUICtrlSetImage($ControlID, @ScriptDir & "\ButtonHovered.bmp")
    EndSwitch
EndFunc

Edited by RazerM
My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
Link to comment
Share on other sites

I like the new way of doing things, what about this:

Yep, that looks terribly real, doesn't it :D Just like the one I edited in my previous post.

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

Ha thats awesome razor, and this is an awesome UDF marf, gj

Vote for inclusion #2 (or 3 if marf's counts) :wacko:

Tnx, it's always nice to know someone likes what you do! And @all, about the inclusion, if you like this enough to be included, please let me know as well :D

Alzo

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

JUST POSTING AN IDEA I GOT FROM TAURUS905.

And no, I hadn't got caps-lock turned on, nor was I pressing shift, I was merely using the script posted below to type this. It's a virtual keyboard, made with my two UDF's, which primarily demonstrates how they can be used to create cursors, but I just really liked it when I finished it. It began with a question I got from taurus905 about transparent buttons, but I continued it so I could post it here.

Note: the window to be typed in must be active before pressing the keyboard!

Anyway, let me know how it works (only the letters, numbers and "~[];',./" work, the rest could be added if people like it):

#include <GUIConstants.au3>
#include <_MouseHover.au3>
#include <_PressDetect.au3>

Opt("GuiOnEventMode", 1)

$mainwindow = GUICreate("test", 562, 220, -1, -1, $WS_POPUP, $WS_EX_TOPMOST)
GUICtrlCreatePic(@ScriptDir & "\layout.bmp", 0, 0, 562, 220);30-102
GUICtrlSetState(-1, $GUI_DISABLE)
Dim $label[48], $pos
$height = 14
$x = 9
Dim $context[UBound($label)], $row = 0
Global $title, $control

$array = StringSplit("~ 1 2 3 4 5 6 7 8 9 0 - = Q W E R T Y U I O P [ ] A S D F G H J K L ; ' Z X C V B N M , . / spatie", " ")
$array[47] = Chr(32)

$i = 1
For $j = 1 To UBound($label)-2
    $label[$j] = GUICtrlCreateLabel("", $x+($i-1)*(1.5+35), $height, 35, 35)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetCursor(-1, 0)
    _HoverAddCtrl($label[$j])
    _PressDetectAddCtrl($label[$j])
    $context[$j] = GUICtrlCreateContextMenu($label[$j])
    GUICtrlCreateMenuitem("Test", $context[$j])
    If $i = 11 And $row = 2 Then
        $height = 130
        $x = 93
        $i = 0
        $row = 2
    EndIf
    If $i = 12 And $row = 1 Then
        $height = 91
        $x = 73
        $i = 0
        $row = 2
    EndIf
    If $i = 13 And $row = 0 Then
        $height = 53
        $x = 63
        $i = 0
        $row = 1
    EndIf
    $i += 1
Next

$label[UBound($label)-1] = GUICtrlCreateLabel("", 158, 168, 197, 35)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetCursor(-1, 0)
_HoverAddCtrl($label[UBound($label)-1])
_PressDetectAddCtrl($label[UBound($label)-1])
$context[$j] = GUICtrlCreateContextMenu($label[UBound($label)-1])
GUICtrlCreateMenuitem("Test", $context[UBound($label)-1])

$hover1 = @ScriptDir & "\hover.bmp"

$pressed = @ScriptDir & "\pressed2.bmp"

Dim $cursor1[5]
$cursor1[1] = GUICtrlCreatePic($hover1, -100, -100, 35, 2)
$cursor1[2] = GUICtrlCreatePic($hover1, -100, -100, 2, 35)
$cursor1[3] = GUICtrlCreatePic($hover1, -100, -100, 35, 2)
$cursor1[4] = GUICtrlCreatePic($hover1, -100, -100, 2, 35)

Dim $cursor2[5]
$cursor2[1] = GUICtrlCreatePic($pressed, -100, -100, 35, 5)
$cursor2[2] = GUICtrlCreatePic($pressed, -100, -100, 5, 35)
$cursor2[3] = GUICtrlCreatePic($pressed, -100, -100, 35, 5)
$cursor2[4] = GUICtrlCreatePic($pressed, -100, -100, 5, 35)

$trans = 170
WinSetTrans($mainwindow, "", $trans)
GUISetState(@SW_SHOWNA, $mainwindow)

GUISetOnEvent(-3, "_eventhandler")

AdlibEnable("_CheckHoverAndPressed", 50)

While 1
    Sleep(10000)
WEnd

Func _eventhandler()
    If @GUI_CtrlId = -3 Then Exit
EndFunc


Func _CheckHoverAndPressed()
    $ctrlid = _HoverCheck()
    If IsArray($ctrlid) Then
        If $ctrlid[0] = "AcquiredHover" Then
            _HoverFound($ctrlid[1])
        Else
            _HoverLost($ctrlid[1])
        EndIf
    EndIf
    $ctrlid2 = _PressDetect()
    If IsArray($ctrlid2) Then
        If $ctrlid2[0] = "ButtonDePressed" Then
            _ButtonDePressed($ctrlid2[1])
        Else
            _ButtonUnPressed($ctrlid2[1])
        EndIf
    EndIf
EndFunc

Func _HoverFound($ControlID)
    If Not BitAND(WinGetState($mainwindow), 8) Then
        $title = WinGetTitle("")
        $control = ControlGetFocus($title)
    EndIf
    For $i = 1 To UBound($label)-1
        If $ControlID = $label[$i] Then
            Global $pos = ControlGetPos($mainwindow, "", $ControlID)
            If $pos[2] < 36 Then
                _MoveCursor($pos[0], $pos[1])
            Else
                _MoveCursor($pos[0], $pos[1], 5.62)
            EndIf
;~          ConsoleWrite("Label " & $ControlID & " is being hovered over, but has not yet been pressed." & @LF)
            Return
        EndIf
    Next
EndFunc

Func _HoverLost($ControlID)
    ;Not needed here...
EndFunc

Func _ButtonDePressed($ControlID)
    For $i = 1 To UBound($label)-1
        If $ControlID = $label[$i] Then
            If $pos[2] < 36 Then
                _SetCursorPressed($pos[0], $pos[1])
            Else
                _SetCursorPressed($pos[0], $pos[1], 5.62)
            EndIf
;~          ConsoleWrite("Label " & $ControlID & " is being held down, but has not yet been pressed." & @LF)
            Return
        EndIf
    Next
EndFunc

Func _ButtonUnPressed($ControlID)
    For $i = 1 To UBound($label)-1
        If $ControlID = $label[$i] Then
            If $pos[2] < 36 Then
                _MoveCursor($pos[0], $pos[1])
            Else
                _MoveCursor($pos[0], $pos[1], 5.62)
            EndIf
;~          ConsoleWrite("Label " & $ControlID & " has been pressed (mousedown followed by mouseup event)." & @LF)
            ControlSend($title, "", $control, $array[$i])
            WinActivate($title)
            WinWaitActive($title)
            Return
        EndIf
    Next
EndFunc

Func _MoveCursor($x, $y, $multiply=1)
    GUICtrlSetPos($cursor2[1], -100, -100, 35*$multiply, 2)
    GUICtrlSetPos($cursor2[2], -100, -100, 1, 35)
    GUICtrlSetPos($cursor2[3], -100, -100, 35*$multiply, 1)
    GUICtrlSetPos($cursor2[4], -100, -100, 1, 35)
    GUICtrlSetPos($cursor1[1], $x, $y, 35*$multiply, 2)
    GUICtrlSetPos($cursor1[2], $x+35*$multiply, $y, 1, 35)
    GUICtrlSetPos($cursor1[3], $x, $y+35, 35*$multiply, 1)
    GUICtrlSetPos($cursor1[4], $x, $y, 1, 35)
EndFunc

Func _SetCursorPressed($x, $y, $multiply=1)
    GUICtrlSetPos($cursor1[1], -100, -100);, 35*$multiply, 2)
    GUICtrlSetPos($cursor1[2], -100, -100);, 1, 35*$multiply)
    GUICtrlSetPos($cursor1[3], -100, -100);, 35*$multiply, 1)
    GUICtrlSetPos($cursor1[4], -100, -100);, 1, 35*$multiply)
    GUICtrlSetPos($cursor2[1], $x, $y, 35*$multiply, 2)
    GUICtrlSetPos($cursor2[2], $x+35*$multiply, $y, 2, 35)
    GUICtrlSetPos($cursor2[3], $x, $y+35, 35*$multiply, 2)
    GUICtrlSetPos($cursor2[4], $x, $y, 2, 35)
EndFunc

Pics:http://marfdaman.googlepages.com/hover.bmp

http://marfdaman.googlepages.com/pressed2.bmp

http://marfdaman.googlepages.com/layout.bmp

Alzo

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...