فاّرس Posted December 22, 2012 Share Posted December 22, 2012 (edited) بسم الله الرحمن الرحيم السلام عليكم ورحمة الله وبركاتهه اذا ما عليكم امر ابي كود زر ينفتح لك بدون ما تضغط عليه بس تلف عليه بالموس تفتح لك النافذهه ملآحظهه : Note : هذا الموضوع فقط لمشاكلي ! يرجى عدم الاغلاق ! ------- This topic only to my problems! Please do not close! Edited January 14, 2013 by Guest Link to comment
3NAD Posted December 22, 2012 Share Posted December 22, 2012 Event : "onClientMouseEnter" Link to comment
فاّرس Posted December 22, 2012 Author Share Posted December 22, 2012 Event : "onClientMouseEnter" يآريت مثآل على زر لآهنت Link to comment
3NAD Posted December 22, 2012 Share Posted December 22, 2012 -- Show Picture addEventHandler ( "onClientMouseEnter", root, function ( ) if source == theButton then guiSetVisible ( theImage, true ) end end ) addEventHandler ( "onClientMouseLeave", root, function ( ) if source == theButton then guiSetVisible ( theImage, false ) end end ) Link to comment
فاّرس Posted December 22, 2012 Author Share Posted December 22, 2012 -- Show Picture addEventHandler ( "onClientMouseEnter", root, function ( ) if source == theButton then guiSetVisible ( theImage, true ) end end ) addEventHandler ( "onClientMouseLeave", root, function ( ) if source == theButton then guiSetVisible ( theImage, false ) end end ) مشكور يعطيك الف عآفيه بس ممكن كود تضغط على الزر يطلع لك صفحه ثانيه ^_* مع المثال لاهنت Link to comment
3NAD Posted December 22, 2012 Share Posted December 22, 2012 مشكور يعطيك الف عآفيهبس ممكن كود تضغط على الزر يطلع لك صفحه ثانيه ^_* مع المثال لاهنت Event : "onClientGUIClick" والمثال نفس اللي فوق ذذ Link to comment
فاّرس Posted December 22, 2012 Author Share Posted December 22, 2012 (edited) مشكور يعطيك الف عآفيهبس ممكن كود تضغط على الزر يطلع لك صفحه ثانيه ^_* مع المثال لاهنت Event : "onClientGUIClick" والمثال نفس اللي فوق ذذ اها تسلم الله يعطيك الف عافيه ما قصررت Edited December 22, 2012 by Guest Link to comment
فاّرس Posted December 22, 2012 Author Share Posted December 22, 2012 مشكور يعطيك الف عآفيهبس ممكن كود تضغط على الزر يطلع لك صفحه ثانيه ^_* مع المثال لاهنت addEventHandler ( "onClientMouseEnter", root, function ( ) if source == theButton then guiSetVisible ( theImage, true ) end end ) addEventHandler ( "onClientMouseLeave", root, function ( ) if source == theButton then guiSetVisible ( theImage, false ) end end ) اخوي عناد thebutton احط اسم الزر ؟ the image احط اسم الصوره ؟ Link to comment
فاّرس Posted December 22, 2012 Author Share Posted December 22, 2012 ^ ايه صح ^ سويتهآ ومآ ضبطتت النافذه مثل ماهي ما تغيرتت Link to comment
abu5lf Posted December 22, 2012 Share Posted December 22, 2012 ^ ايه صح ^ سويتهآ ومآ ضبطتت النافذه مثل ماهي ما تغيرتت حط كودك كامل Link to comment
فاّرس Posted December 23, 2012 Author Share Posted December 23, 2012 GUIEditor_Window = {} GUIEditor_Button = {} Win = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"...........",true) GUIEditor_Button[1] = guiCreateButton(0.1125,0.175,0.065,0.0817,"Info",true,Win) GUIEditor_Button[2] = guiCreateButton(0.1175,0.2983,0.0613,0.0783,"MyWin",true,Win) GUIEditor_Button[3] = guiCreateButton(0.1187,0.405,0.06,0.0817,"MyWin2",true,Win) ابي يكون تلف على زر انفو يطلع لك نافذه ! Link to comment
abu5lf Posted December 23, 2012 Share Posted December 23, 2012 function VisibleWindow( ) if eventName == 'onClientMouseEnter' then guiSetVisible( اسم نافذتك الي تبي تظهرها, true ) else guiSetVisible( اسم نافذتك الي تبي تظهرها, false ) end end addEventHandler( 'onClientMouseEnter', GUIEditor_Button[1], VisibleWindow, false ) addEventHandler( 'onClientMouseLeave', GUIEditor_Button[1], VisibleWindow, false ) مافيه نافذة ثانية عشان تظهرهآ !! Link to comment
فاّرس Posted December 23, 2012 Author Share Posted December 23, 2012 function VisibleWindow( ) if eventName == 'onClientMouseEnter' then guiSetVisible( اسم نافذتك الي تبي تظهرها, true ) else guiSetVisible( اسم نافذتك الي تبي تظهرها, false ) end end addEventHandler( 'onClientMouseEnter', GUIEditor_Button[1], VisibleWindow, false ) addEventHandler( 'onClientMouseLeave', GUIEditor_Button[1], VisibleWindow, false ) مافيه نافذة ثانية عشان تظهرهآ !! GUIEditor_Window = {} GUIEditor_Button = {} Win = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"...........",true) GUIEditor_Button[1] = guiCreateButton(0.1125,0.175,0.065,0.0817,"Info",true,Win) function VisibleWindow( ) if eventName == 'onClientMouseEnter' then guiSetVisible( Win2, true ) else guiSetVisible( Win2, false ) end end addEventHandler( 'onClientMouseEnter', GUIEditor_Button[1], VisibleWindow, false ) addEventHandler( 'onClientMouseLeave', GUIEditor_Button[1], VisibleWindow, false ) GUIEditor_Button[2] = guiCreateButton(0.1175,0.2983,0.0613,0.0783,"MyWin",true,Win) GUIEditor_Button[3] = guiCreateButton(0.1187,0.405,0.06,0.0817,"MyWin2",true,Win) كذآ تصير ؟ Link to comment
abu5lf Posted December 23, 2012 Share Posted December 23, 2012 ؟ Win2 يب كذا بس وين النافذة Link to comment
فاّرس Posted December 23, 2012 Author Share Posted December 23, 2012 ؟ Win2 يب كذا بس وين النافذة GUIEditor_Window = {} GUIEditor_Button = {} Win = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"...........",true) GUIEditor_Button[1] = guiCreateButton(0.1125,0.175,0.065,0.0817,"Info",true,Win) Win2 = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"Win2",true) function VisibleWindow( ) if eventName == 'onClientMouseEnter' then guiSetVisible( Win2, true ) else guiSetVisible( Win2, false ) end end addEventHandler( 'onClientMouseEnter', GUIEditor_Button[1], VisibleWindow, false ) addEventHandler( 'onClientMouseLeave', GUIEditor_Button[1], VisibleWindow, false ) GUIEditor_Button[2] = guiCreateButton(0.1175,0.2983,0.0613,0.0783,"MyWin",true,Win) GUIEditor_Button[3] = guiCreateButton(0.1187,0.405,0.06,0.0817,"MyWin2",true,Win) كذآ ؟ Link to comment
abu5lf Posted December 23, 2012 Share Posted December 23, 2012 GUIEditor_Button = {} Win = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"...........",true) GUIEditor_Button[1] = guiCreateButton(0.1125,0.175,0.065,0.0817,"Info",true,Win) GUIEditor_Button[2] = guiCreateButton(0.1175,0.2983,0.0613,0.0783,"MyWin",true,Win) GUIEditor_Button[3] = guiCreateButton(0.1187,0.405,0.06,0.0817,"MyWin2",true,Win) Win2 = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"Win2",true) guiSetVisible( Win2, false ) function VisibleWindow( ) guiSetVisible( Win2, not guiGetVisible( Win2 ) ) end addEventHandler( 'onClientMouseEnter', GUIEditor_Button[1], VisibleWindow, false ) Link to comment
Blaawee Posted December 23, 2012 Share Posted December 23, 2012 ؟ Win2 يب كذا بس وين النافذة GUIEditor_Window = {} GUIEditor_Button = {} Win = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"...........",true) GUIEditor_Button[1] = guiCreateButton(0.1125,0.175,0.065,0.0817,"Info",true,Win) Win2 = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"Win2",true) function VisibleWindow( ) if eventName == 'onClientMouseEnter' then guiSetVisible( Win2, true ) else guiSetVisible( Win2, false ) end end addEventHandler( 'onClientMouseEnter', GUIEditor_Button[1], VisibleWindow, false ) addEventHandler( 'onClientMouseLeave', GUIEditor_Button[1], VisibleWindow, false ) GUIEditor_Button[2] = guiCreateButton(0.1175,0.2983,0.0613,0.0783,"MyWin",true,Win) GUIEditor_Button[3] = guiCreateButton(0.1187,0.405,0.06,0.0817,"MyWin2",true,Win) كذآ ؟ ابي افهم من وين جآآيه ذي !! if eventName == 'onClientMouseEnter' then ------------------------------------ GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Window[1] = guiCreateWindow( 0.1025, 0.0933, 0.4375, 0.4183, "...........", true ) GUIEditor_Button[1] = guiCreateButton( 0.1125, 0.175, 0.065, 0.0817, "Info", true, GUIEditor_Window[1] ) GUIEditor_Button[2] = guiCreateButton( 0.1175, 0.2983, 0.0613, 0.0783, "MyWin", true, GUIEditor_Window[1] ) GUIEditor_Button[3] = guiCreateButton( 0.1187, 0.405, 0.06, 0.0817, "MyWin2", true, GUIEditor_Window[1] ) GUIEditor_Window[2] = guiCreateWindow( 0.1025, 0.0933, 0.4375, 0.4183, "Win2", true ) addEventHandler( 'onClientMouseEnter', guiRoot, function( ) if source == GUIEditor_Button[1] then guiSetVisible( GUIEditor_Window[2], true ) end end ) addEventHandler( 'onClientMouseLeave', guiRoot, function( ) if source == GUIEditor_Button[1] then guiSetVisible( GUIEditor_Window[2], false ) end end ) Link to comment
فاّرس Posted December 23, 2012 Author Share Posted December 23, 2012 GUIEditor_Button = {} Win = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"...........",true) GUIEditor_Button[1] = guiCreateButton(0.1125,0.175,0.065,0.0817,"Info",true,Win) GUIEditor_Button[2] = guiCreateButton(0.1175,0.2983,0.0613,0.0783,"MyWin",true,Win) GUIEditor_Button[3] = guiCreateButton(0.1187,0.405,0.06,0.0817,"MyWin2",true,Win) Win2 = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"Win2",true) guiSetVisible( Win2, false ) function VisibleWindow( ) guiSetVisible( Win2, not guiGetVisible( Win2 ) ) end addEventHandler( 'onClientMouseEnter', GUIEditor_Button[1], VisibleWindow, false ) يعطيك الف عافيه يالغالي ما قصررت بس ممكن طلب ابي صوره للزر مثلا زر info ابي يكون له صورهه مثل شوب ابو زهره يكون الاطار حق الزر محاط بلون تحط له صوره محدده Link to comment
Blaawee Posted December 23, 2012 Share Posted December 23, 2012 استخدم : guiCreateStaticImage بدآل : guiCreateButton Link to comment
فاّرس Posted December 23, 2012 Author Share Posted December 23, 2012 استخدم : guiCreateStaticImage بدآل : guiCreateButton اسم الصورهه وين يجي ؟ كذآ يصير ؟ GUIEditor_Button[1] = guiCreateStaticImage(606,299,95,26,"Info",false,Win2) Link to comment
Blaawee Posted December 23, 2012 Share Posted December 23, 2012 ططآلع الويكي : guiCreateStaticImage ( x, y, width, height, path, relative, [ parent = nil ] ) الكود الاول مثآل ,الكود الثآني الطريقه الصحيحه GUIEditor_Button[1] = guiCreateStaticImage( 606, 299, 95, 26, "Example.png", false, Win2 ) GUIEditor_Button[1] = guiCreateStaticImage( 606, 299, 95, 26, "imgname.imgtype", false, Win2 ) Link to comment
abu5lf Posted December 23, 2012 Share Posted December 23, 2012 ابي افهم من وين جآآيه ذي !! if eventName == 'onClientMouseEnter' then Read wiki: addEventHandler Link to comment
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