#Rmad~> Posted May 3, 2014 Share Posted May 3, 2014 السلام عليكم ياخوان ايفنت الظغط لل Gui "onClientGUIClick" بغيت اسالكم لدي اكس وش الي استخدمه ؟ Link to comment
al-Kobra Posted May 3, 2014 Share Posted May 3, 2014 تقدر تسوي ليبل على الشي الا تستخدمه في الدي اكس ,, او زر شفاف Link to comment
#Rmad~> Posted May 3, 2014 Author Share Posted May 3, 2014 تقدر تسوي ليبل على الشي الا تستخدمه في الدي اكس ,, او زر شفاف بتاخذ وقت طويل لو سويتها على كل شي ابيه فاحسن اسويه Link to comment
Mr-M3AND Posted May 3, 2014 Share Posted May 3, 2014 dx اعتقد هذا يستخدم لل onClientClick Link to comment
#Rmad~> Posted May 3, 2014 Author Share Posted May 3, 2014 جربت حركتك كوبرا وصار لااق غير طبيعي function click() if ( source == Join ) then addEventHandler("onClientRender",root,Dx) outputChatBox'ss' end end addEventHandler("onClientGUIClick", root,click) معاند جربته وماظبط Link to comment
al-Kobra Posted May 3, 2014 Share Posted May 3, 2014 label1 = guiCreateLabel(287, 442, 90, 38, "", false) -- الليبل function Button () -- نسوي وظيفة dxDrawRectangle(288, 442, 89, 38, tocolor(13, 57, 0, 136), true) -- نسوي لوحة او بوتون ذذ end -- نغلق الوظيفة addEventHandler("onClientRender", root,Button) -- حدث للوظيفة addEventHandler('onClientResourceStart',resourceRoot, -- اول ما يشتغل السكربت function() -- وظيفة removeEventHandler("onClientRender", root,Button) -- نحذف الحدث عشان ماتطلع اللوحة او البوتون اول ما يشتغل السكربت end -- نغلق الوظيفة ) -- نغلق الحدث local marker = createMarker ( 2354.32300, -655.82379, 128.05469, "cylinder", 2, 255, 0, 255, 0 ) -- الماركر addEventHandler('onClientMarkerHit', marker, -- حذث اذا لمس الماركر function ( ) --وظيفة addEventHandler( "onClientRender", root, Button ) -- نخلي اللوحة او البوتون يظهر showCursor ( true ) -- نخلي المؤشر يظهر end -- نغلق الوظيفة ) -- نغلق الحدث addEventHandler("onClientGUIClick", root, -- حدث اذا ضرب على زر function () -- وظيفة if source == label1 then -- نتحقق ان الا ضغط عليه هو ليبل removeEventHandler("onClientRender", root,Button) -- نخفي او نحذف اللوحة showCursor (false) -- نخفي المؤشر outputChatBox([[ss]]) -- نطلع كلام في الشات end -- اغلاق التحقق end -- اغلاق الوظيفة ) -- اغلاق الحدث Link to comment
#Rmad~> Posted May 3, 2014 Author Share Posted May 3, 2014 label1 = guiCreateLabel(287, 442, 90, 38, "", false) -- الليبل function Button () -- نسوي وظيفة dxDrawRectangle(288, 442, 89, 38, tocolor(13, 57, 0, 136), true) -- نسوي لوحة او بوتون ذذ end -- نغلق الوظيفة addEventHandler("onClientRender", root,Button) -- حدث للوظيفة addEventHandler('onClientResourceStart',resourceRoot, -- اول ما يشتغل السكربت function() -- وظيفة removeEventHandler("onClientRender", root,Button) -- نحذف الحدث عشان ماتطلع اللوحة او البوتون اول ما يشتغل السكربت end -- نغلق الوظيفة ) -- نغلق الحدث local marker = createMarker ( 2354.32300, -655.82379, 128.05469, "cylinder", 2, 255, 0, 255, 0 ) -- الماركر addEventHandler('onClientMarkerHit', marker, -- حذث اذا لمس الماركر function ( ) --وظيفة addEventHandler( "onClientRender", root, Button ) -- نخلي اللوحة او البوتون يظهر showCursor ( true ) -- نخلي المؤشر يظهر end -- نغلق الوظيفة ) -- نغلق الحدث addEventHandler("onClientGUIClick", root, -- حدث اذا ضرب على زر function () -- وظيفة if source == label1 then -- نتحقق ان الا ضغط عليه هو ليبل removeEventHandler("onClientRender", root,Button) -- نخفي او نحذف اللوحة showCursor (false) -- نخفي المؤشر outputChatBox([[ss]]) -- نطلع كلام في الشات end -- اغلاق التحقق end -- اغلاق الوظيفة ) -- اغلاق الحدث createMarker 'onClientMarkerHit' مافهمت طلبي انا مسوي صورة dx ابيه لاظغطها يسوي امر انا اظبطه مثل addEventHandler( "onClientGUIClick", resourceRoot, function( ) if ( source == GUIEditor.staticimage[3] ) then ------ Code------ end end) اانا بس احتاج الحدث حق الظغط Link to comment
al-Kobra Posted May 3, 2014 Share Posted May 3, 2014 قلت لك مافيه الا هالحل ,, تسوي ليبل على الدي اكس وبعدين تحقق اذا ضرب الليبل ,, وبصير كأن ضغط على الصورة ذذ Link to comment
#Rmad~> Posted May 3, 2014 Author Share Posted May 3, 2014 قلت لك مافيه الا هالحل ,,تسوي ليبل على الدي اكس وبعدين تحقق اذا ضرب الليبل ,, وبصير كأن ضغط على الصورة ذذ كيف مافي حل معقولة ؟؟ Link to comment
TAPL Posted May 3, 2014 Share Posted May 3, 2014 فيه طريقتين فقط onClientGUIClick الأسهل تسوي ليبل مثلاً في نفس مكان الدي اكس و تخلي الليبل فاضي ما تكتب فيه شي و تستخدم معه الأفنت أو و تتحقق من احداثيات الضغطة بالشاشة ان كانت في نفس مكان الدي اكس onClientClick تستخدم الأفنت Link to comment
#Rmad~> Posted May 3, 2014 Author Share Posted May 3, 2014 فيه طريقتين فقطonClientGUIClick الأسهل تسوي ليبل مثلاً في نفس مكان الدي اكس و تخلي الليبل فاضي ما تكتب فيه شي و تستخدم معه الأفنت أو و تتحقق من احداثيات الضغطة بالشاشة ان كانت في نفس مكان الدي اكس onClientClick تستخدم الأفنت ممم خلاص مشكورين شباب سويت الطريقة سويت زر بمقاس الصورة والحجم وكلش وخليته شفاف يغلق, Link to comment
Mr-M3AND Posted May 3, 2014 Share Posted May 3, 2014 سويت لك هذا المثال جربه :: Client local sx, sy = guiGetScreenSize ( ) local mx, my = ( sx - 200 )/2 , ( sy - 165 )/2 function dxImage() dxDrawImage(mx, my,200,165,"Mr-M3AND.png", 0, 0, 0, tocolor (255, 255, 255, 190),false) end addEventHandler("onClientRender",root, dxImage) function M3AND (_, _, x, y ) if ( y >= my + 4 and y <= my + 150 ) then if ( x >= mx + 1 and x <= mx + 195 ) then removeEventHandler("onClientRender",root, dxImage) end end end addEventHandler ( "onClientClick",root,M3AND) 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