Cloudsx Posted February 21, 2006 Author Posted February 21, 2006 oke this what i have till now expandcollapse popup #include <GUIConstants.au3> GUICreate("game",350,400); will create a dialog box that when displayed is centered GUISetState (@SW_SHOW); will display an empty dialog box Opt("GUICoordMode",4) $gebouwen = GUICtrlCreateButton("gebouwen",290,100,60) $militair = GUICtrlCreateButton("militair",290,125,60) $onderzoek = GUICtrlCreateButton("onderzoek",290,150,60) $verdediging = GUICtrlCreateButton("verdediging",290,175,61) $overzicht = GUICtrlCreateButton("overzicht",290,200,60) GUISetState ();this wil create a button While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit if $msg = $gebouwen Then GUI2Create() If $msg = $militair then Gui3create() If $msg = $onderzoek then Gui4create() If $msg = $verdediging then gui5create() If $msg = $overzicht then Gui6create() Wend Func GUI2Create() GUICreate("gebouwen",350,350) GUISetState (@SW_SHOW) EndFunc Func Gui3create() GUICreate("militair",350,350) GUISetState (@SW_SHOW) EndFunc Func gui4create() GUICreate("onderzoek",350,350) GUISetState (@SW_SHOW) EndFunc Func gui5create() GUICreate("verdediging",350,350) GUISetState (@SW_SHOW) EndFunc Func gui6create() GUICreate("overzicht",350,350) GUISetState (@SW_SHOW) EndFunc Valuater Posted February 21, 2006 Valuater MVPs 11.1k 7 Posted February 21, 2006 this is bas akwards... as i said.. i believe you should create all of the gui's... and use the buttons to show themm this approach you are using will get more and more difficult #include <GUIConstants.au3> GUICreate("game",350,400); will create a dialog box that when displayed is centered GUISetState (@SW_SHOW); will display an empty dialog box Opt("GUICoordMode",4) $gebouwen = GUICtrlCreateButton("gebouwen",290,100,60) $militair = GUICtrlCreateButton("militair",290,125,60) $onderzoek = GUICtrlCreateButton("onderzoek",290,150,60) $verdediging = GUICtrlCreateButton("verdediging",290,175,61) $overzicht = GUICtrlCreateButton("overzicht",290,200,60) GUISetState ();this wil create a button Dim $2, $3, $4, $5, $6 While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then If WinActive("game") then Exit If WinActive("gebouwen") then GUIDelete( $2) If WinActive("militair") then GUIDelete( $3) If WinActive("onderzoek") then GUIDelete( $4) If WinActive("verdediging") then GUIDelete( $5) If WinActive("overzicht") then GUIDelete($6) EndIf if $msg = $gebouwen Then GUI2Create() If $msg = $militair then Gui3create() If $msg = $onderzoek then Gui4create() If $msg = $verdediging then gui5create() If $msg = $overzicht then Gui6create() Wend Func GUI2Create() If WinExists("gebouwen") then Return $2 = GUICreate("gebouwen",350,350) GUISetState (@SW_SHOW) EndFunc Func Gui3create() If WinExists("militair") then Return $3 = GUICreate("militair",350,350) GUISetState (@SW_SHOW) EndFunc Func gui4create() If WinExists("onderzoek") then Return $4 = GUICreate("onderzoek",350,350) GUISetState (@SW_SHOW) EndFunc Func gui5create() If WinExists("verdediging") then Return $5 = GUICreate("verdediging",350,350) GUISetState (@SW_SHOW) EndFunc Func gui6create() If WinExists("overzicht") then Return $6 = GUICreate("overzicht",350,350) GUISetState (@SW_SHOW) EndFunc 8)
Cloudsx Posted February 21, 2006 Author Posted February 21, 2006 thanks again i make a little game from what i and you made this far but now my last problem(i think so and hope so) if something in gebouwen (buildings) going to make i press on tax factory i want to make that then i want to see on the parent dialog that tax factory is under construction how can i make that
Valuater Posted February 21, 2006 Posted February 21, 2006 (edited) $Label = create a label guictrlsetdata($Label, " Under Construction") 8) Edited February 21, 2006 by Valuater
Cloudsx Posted February 21, 2006 Author Posted February 21, 2006 this will work so if i have 2 child child 1 and child 2 and use this code then this wil come if i have want to build some thing in child 2 then it will display in child 1
Cloudsx Posted February 22, 2006 Author Posted February 22, 2006 this will workso if i have 2 childchild 1 and child 2and use this code then this wil comeif i have want to build some thing in child 2 then it will display in child 1it dont work i dont know how it must work but it doesent work
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now