papsmurfer Posted June 24, 2010 Posted June 24, 2010 I created a gui window with a button but when you click the window the button disappears. How can I fix this?
Xierra Posted June 24, 2010 Posted June 24, 2010 Yo, started to help here. It's not invisible. The button is moved to back, and the window in front. This is because the button was not attached inside the window GUI. The solution is simple, you need to attach it inside the GUI window. Attribute: As the window is parent, the button must be the child. But first I need your GUI functions, cause other problems than this is possible.
papsmurfer Posted June 24, 2010 Author Posted June 24, 2010 GUIEditor_TabPanel = {} GUIEditor_Button = {} CharScreen = guiCreateTabPanel(42,53,395,514,false) CharTAB = guiCreateTab("Character Selection",CharScreen) AccountTAB = guiCreateTab("Account Managment",CharScreen) SettingsTAB = guiCreateTab("Settings",CharScreen) CharSlot1 = guiCreateButton(53,120,375,105,"",false,Char_SelectionTAB) guiSetVisible ( CharSlot1, true ) --[[ CharSlot2 = guiCreateButton(53,230,375,105,"",false,Char_SelectionTAB) CharSlot3 = guiCreateButton(53,340,375,105,"",false,Char_SelectionTAB) CharSlot4 = guiCreateButton(53,450,375,105,"",false,Char_SelectionTAB) ]]-- showCursor ( true ) addEventHandler ("onClientGUIClick", CharSlot1, move1) addEventHandler ("onClientGUIClick", CharSlot1, HideCharScreen) addEventHandler ("onClientGUIClick", CharSlot1, MakePed) sooo how would that work?
papsmurfer Posted June 24, 2010 Author Posted June 24, 2010 good question...lol I switched it to CHARTAB
papsmurfer Posted June 24, 2010 Author Posted June 24, 2010 but now you can click the screen and it's like clicking the button O-O. How can I fix this?
50p Posted June 24, 2010 Posted June 24, 2010 Add false to addEventHandler's as last argument. This is mainly why I made GUI Lib. With it, adding "on click" handlers is much easier.
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