Jump to content

GUI problem


Recommended Posts

hi all,

got a first preview for my GUI, problem now is that i have a background picture.

and now the buttons won't work ^_^.

Posted Image

Func Main_Menu()
    Local $Button_1, $Button_2, $msg
    GUICreate("Tribalwars GUI Versie 0.1", 718, 500)
    GUICtrlCreatePic("linksboven.bmp", 0, 0, 48, 48)    
    GUICtrlCreatePic("boven.bmp", 48, 0, 144, 27)
    GUICtrlCreatePic("boven.bmp", 192, 0, 144, 27)  
    GUICtrlCreatePic("boven.bmp", 336, 0, 144, 27)
    GUICtrlCreatePic("boven.bmp", 480, 0, 144, 27)
    GUICtrlCreatePic("boven.bmp", 624, 0, 144, 27)
    GUICtrlCreatePic("onder.bmp", 48, 473, 144, 27) 
    GUICtrlCreatePic("onder.bmp", 192, 473, 144, 27)    
    GUICtrlCreatePic("onder.bmp", 336, 473, 144, 27)    
    GUICtrlCreatePic("onder.bmp", 480, 473, 144, 27)    
    GUICtrlCreatePic("onder.bmp", 624, 473, 144, 27)    
    GUICtrlCreatePic("rechtsboven.bmp", 670, 0, 48, 48)
    GUICtrlCreatePic("links.bmp", 0, 48, 27, 144)
    GUICtrlCreatePic("links.bmp", 0, 192, 27, 144)
    GUICtrlCreatePic("links.bmp", 0, 336, 27, 144)
    GUICtrlCreatePic("rechts.bmp", 691, 48, 27, 144)
    GUICtrlCreatePic("rechts.bmp", 691, 192, 27, 144)
    GUICtrlCreatePic("rechts.bmp", 691, 336, 27, 144)
    GUICtrlCreatePic("linksonder.bmp", 0, 452, 48, 48)
    GUICtrlCreatePic("rechtsonder.bmp", 670, 452, 48, 48)
    GUICtrlCreatePic("back.bmp", 28, 140, 662, 332)
    GUICtrlCreatePic("Logo.bmp", 28, 28, 662, 112)  
    
    $Button_1 = GUICtrlCreateButton("AanvalScript", 51, 185,85,25)
    $Button_2 = GUICtrlCreateButton("DefenceScript", 51, 235,85,25)
    $Button_3 = GUICtrlCreateButton("Pakketjes nodig", 180, 185,85,25)
    $Button_4 = GUICtrlCreateButton("Hoeveel edels", 180, 235,85,25)

    GUISetState(@SW_SHOW)   ; will display an  dialog box with 2 button

 
 

  ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg = $Button_1
                    GUISetState(@SW_HIDE)
                    Aanvalscript()
            Case $msg = $Button_2
                MsgBox(0, 'Script', 'Dit komt nog!!!')  ; Will demonstrate Button 2 being pressed
        EndSelect
    WEnd
EndFunc

this is my source.

is there an easy way to fix the mouse without losing de graphics or do i need to make something with a mouse event.

mike

Edited by Mike23
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...