#_TrEkA!* Posted February 8, 2019 Share Posted February 8, 2019 اهلاًَ شباب كيفكم ان شاء الله بخير ________________________________________________________ كان بدي شرح للجريد ليست بالكامل يرجى المساعدة وشكراً مقدماً . Link to comment
!# H E R O ,_ Posted February 8, 2019 Share Posted February 8, 2019 كل شي له وظايف محددة عشان تقدر تستفيد منه guiGridListAddRow > هذي عشان تضيف سطر guiGridListAddColumn > هذي عشان تضيف عمود guiGridListSetItemText > هذي عشان تسمي غرض في القريد guiGridListGetItemText > هذي عشان تجيب إسم غرض في القريد guiGridListGetSelectedItem > هذي عشان تجيب الغرض المحدد عليه من القريد guiGridListSetSelectedItem > هذي عشان تحدد الغرض إللي تبيه في القريد و الوظايف حقته كثيرة بس هذي بعضها Link to comment
#_TrEkA!* Posted February 8, 2019 Author Share Posted February 8, 2019 On 08/02/2019 at 18:29, #Bad_Boy, said: كل شي له وظايف محددة عشان تقدر تستفيد منه guiGridListAddRow > هذي عشان تضيف سطر guiGridListAddColumn > هذي عشان تضيف عمود guiGridListSetItemText > هذي عشان تسمي غرض في القريد guiGridListGetItemText > هذي عشان تجيب إسم غرض في القريد guiGridListGetSelectedItem > هذي عشان تجيب الغرض المحدد عليه من القريد guiGridListSetSelectedItem > هذي عشان تحدد الغرض إللي تبيه في القريد و الوظايف حقته كثيرة بس هذي بعضها Expand شكراً لك لكن انا بدي افهم مثلا كيف اسوي الضغط عليها مرتين وبعدها تسوي شئ محدد 1 Link to comment
KillerX Posted February 8, 2019 Share Posted February 8, 2019 مثال local playerList = guiCreateGridList(0.80, 0.40, 0.15, 0.35, true) local _PlayerCol = guiGridListAddColumn(playerList, "Player", 0.85) for i , player in ipairs( getElementsByType( 'player' ) ) do local _Row = guiGridListAddRow( playerList ) guiGridListSetItemText( playerList , _Row , _PlayerCol , getPlayerName( player ) , false , false ) end addEventHandler( 'onClientGUIDoubleClick' , playerList , function( ) local selectedRow = guiGridListGetSelectedItem( playerList ) if( selectedRow ~= -1 ) then outputChatBox( guiGridListGetItemText( playerList , _Row , _PlayerCol ) , 0 , 255 , 0 ) end end ) 1 Link to comment
!# H E R O ,_ Posted February 8, 2019 Share Posted February 8, 2019 (edited) On 08/02/2019 at 20:09, #_TrEkA!* said: شكراً لك لكن انا بدي افهم مثلا كيف اسوي الضغط عليها مرتين وبعدها تسوي شئ محدد Expand تفضل ذا مثاال .. addEventHandler("onClientGUIClick",yourGridList, -- اسم القريد function ( ) local Row = guiGridListGetSelectedItem( yourGridList ) -- اسم القريد ليست .. if ( Row ~= -1 ) then -- هنا يتحقق انه ضغط على الرو setClipboard( Row )-- ننسخ اللي حددنا لما نضغط دبل كلك else outputChatBox( 'يـرجـة التـحـديـد مـن الـقـائــمــة .. #', 255, 0, 0, true ) end end ) Edited February 8, 2019 by #Bad_Boy, 1 Link to comment
!# H E R O ,_ Posted February 8, 2019 Share Posted February 8, 2019 تعديل * لو تبـى تضغط دبل كلك استخدم ذا الفنكشن onClientGUIDoubleClick مثاال addEventHandler("onClientGUIDoubleClick",yourGridList, -- اسم القريد function ( ) local Row = guiGridListGetSelectedItem( yourGridList ) -- اسم القريد ليست .. if ( Row ~= -1 ) then -- هنا يتحقق انه ضغط على الرو setClipboard( Row )-- ننسخ اللي حددنا لما نضغط دبل كلك else outputChatBox( 'يـرجـة التـحـديـد مـن الـقـائــمــة .. #', 255, 0, 0, true ) end end ) Link to comment
KillerX Posted February 8, 2019 Share Posted February 8, 2019 On 08/02/2019 at 22:21, #Bad_Boy, said: تفضل ذا مثاال .. addEventHandler("onClientGUIClick",yourGridList, -- اسم القريد function ( ) local Row = guiGridListGetSelectedItem( yourGridList ) -- اسم القريد ليست .. if ( Row ~= -1 ) then -- هنا يتحقق انه ضغط على الرو setClipboard( Row )-- ننسخ اللي حددنا لما نضغط دبل كلك else outputChatBox( 'يـرجـة التـحـديـد مـن الـقـائــمــة .. #', 255, 0, 0, true ) end end ) Expand كدا بتنسخ الرو بس لو تبي تنسخ الشئ اللي في الجريد ليست setClipboard( guiGridListGetItemText( yourGridList , Row , yourColumn ) ) ثانيا لازم تسوي زي الخطوة end ,false بعد الايند حقت الفنكشن حط فولس wiki : Note: If the GUI Element attached to this event has a parent element, this event will be triggered once the parent element of the attached element is clicked too. You can set the parameter getPropagated to false in the call to addEventHandler to prevent this. 1 Link to comment
#_TrEkA!* Posted February 9, 2019 Author Share Posted February 9, 2019 شكرا ليكم جميعا 2 Link to comment
KillerX Posted February 9, 2019 Share Posted February 9, 2019 On 09/02/2019 at 17:04, #_TrEkA!* said: شكرا ليكم جميعا Expand عفوا : ) Link to comment
MR.M1 Posted February 10, 2019 Share Posted February 10, 2019 (edited) On 08/02/2019 at 22:21, #Bad_Boy, said: تفضل ذا مثاال .. addEventHandler("onClientGUIClick",yourGridList, -- اسم القريد function ( ) local Row = guiGridListGetSelectedItem( yourGridList ) -- اسم القريد ليست .. if ( Row ~= -1 ) then -- هنا يتحقق انه ضغط على الرو setClipboard( Row )-- ننسخ اللي حددنا لما نضغط دبل كلك else outputChatBox( 'يـرجـة التـحـديـد مـن الـقـائــمــة .. #', 255, 0, 0, true ) end end ) Expand كــودك خــطـاء فـــي شــي انــت مسوي "onClientGUIClick" ومن المفترض تصيـــر "onClientGUIDoubleClick" DrKAREEM Edited February 10, 2019 by Kareem Amer Link to comment
!# H E R O ,_ Posted February 10, 2019 Share Posted February 10, 2019 On 10/02/2019 at 13:44, Kareem Amer said: كــودك خــطـاء فـــي شــي انــت مسوي "onClientGUIClick" ومن المفترض تصيـــر "onClientGUIDoubleClick" DrKAREEM Expand وانت وش شايف !! خخ On 08/02/2019 at 23:06, #Bad_Boy, said: تعديل * لو تبـى تضغط دبل كلك استخدم ذا الفنكشن onClientGUIDoubleClick مثاال addEventHandler("onClientGUIDoubleClick",yourGridList, -- اسم القريد function ( ) local Row = guiGridListGetSelectedItem( yourGridList ) -- اسم القريد ليست .. if ( Row ~= -1 ) then -- هنا يتحقق انه ضغط على الرو setClipboard( Row )-- ننسخ اللي حددنا لما نضغط دبل كلك else outputChatBox( 'يـرجـة التـحـديـد مـن الـقـائــمــة .. #', 255, 0, 0, true ) end end ) Expand 1 Link to comment
MR.M1 Posted February 10, 2019 Share Posted February 10, 2019 On 10/02/2019 at 13:50, #Bad_Boy, said: وانت وش شايف !! خخ Expand اهـــــا اعــتــذر لــك حـب مــالاحظتها DrKAREEM 1 Link to comment
!# H E R O ,_ Posted February 10, 2019 Share Posted February 10, 2019 On 10/02/2019 at 13:53, Kareem Amer said: اهـــــا اعــتــذر لــك حـب مــالاحظتها DrKAREEM Expand ولا يهمك .. 1 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