Ahmed Ly Posted May 17, 2016 Share Posted May 17, 2016 (edited) ----------------- Xml.xml [lua----------[/lua] Edited May 17, 2016 by Guest Link to comment
Mr.CoR Posted May 17, 2016 Share Posted May 17, 2016 GUIEditor = { button = {}, gridlist = {}, } ضيف هذي بأول السكربت وبيشتغل معلومة بسيطة : لما ماتحط قيمة للزر او اي عنصر من عناصر الجي يو أي لازم تحط له مثل الجدول الي فوق على شان مايحصل اختلاط يعني شوف انت حاط زر وحاط قريد ليست وحاطهم بدون قيم يعني كذا GUIEditor.button[1] GUIEditor.gridlist[1] اذا بتكتبهم كذا لازم تحط جدول على شان مايصير إختلاط ومايشتغل المود اما لو حاطهم كذا CoR = guiCreateButton(381, 588, 104, 42, "", false) Ahmad Ly = guiCreateGridList(398, 266, 316, 302, false) مايحتاج تحط جدول على شان انت حاط قيم لعناصر ال جي يو اي بالتوفيق Link to comment
Ahmed Ly Posted May 17, 2016 Author Share Posted May 17, 2016 (edited) حطهم من قبل ما اشتغل و هدا اكود كمل --- Edited May 17, 2016 by Guest Link to comment
Mr.CoR Posted May 17, 2016 Share Posted May 17, 2016 انت ناسي تحط guiGridListSetItemData كودك قبل التعديل for i,v in pairs(xmlNodeGetChildren(xmlFindChild(xmlLoadFile("Xml.xml"),"Ahmed",0))) do local row = guiGridListAddRow (GUIEditor.gridlist[1] ) guiGridListSetItemText (GUIEditor.gridlist[1], row, 1,i..'-', false, false) guiGridListSetItemText (GUIEditor.gridlist[1] , row,name,xmlNodeGetAttribute(v, "name"), false, false) guiGridListSetItemText (GUIEditor.gridlist[1] , row, x1,xmlNodeGetAttribute(v, "x"), false, false) guiGridListSetItemText (GUIEditor.gridlist[1] , row,y1,xmlNodeGetAttribute(v, "y"), false, false) guiGridListSetItemText (GUIEditor.gridlist[1] , row,z1,xmlNodeGetAttribute(v, "z"), false, false) guiGridListSetItemColor(GUIEditor.gridlist[1] , row,x1,255,255,0) guiGridListSetItemColor(GUIEditor.gridlist[1] , row,y1,0,255,0) guiGridListSetItemColor(GUIEditor.gridlist[1] , row,z1,255,0,0) guiGridListSetItemColor(GUIEditor.gridlist[1] , row,name,0,0,255) end بعد التعديل for i,v in pairs(xmlNodeGetChildren(xmlFindChild(xmlLoadFile("Xml.xml"),"Ahmed",0))) do local row = guiGridListAddRow (GUIEditor.gridlist[1] ) guiGridListSetItemText (GUIEditor.gridlist[1], row, 1,i..'-', false, false) guiGridListSetItemText (GUIEditor.gridlist[1] , row,name,xmlNodeGetAttribute(v, "name"), false, false) guiGridListSetItemText (GUIEditor.gridlist[1] , row, x1,xmlNodeGetAttribute(v, "x"), false, false) guiGridListSetItemText (GUIEditor.gridlist[1] , row,y1,xmlNodeGetAttribute(v, "y"), false, false) guiGridListSetItemText (GUIEditor.gridlist[1] , row,z1,xmlNodeGetAttribute(v, "z"), false, false) guiGridListSetItemData (GUIEditor.gridlist[1] , row, x1,xmlNodeGetAttribute(v, "x"), false, false) guiGridListSetItemData (GUIEditor.gridlist[1] , row,y1,xmlNodeGetAttribute(v, "y"), false, false) guiGridListSetItemData (GUIEditor.gridlist[1] , row,z1,xmlNodeGetAttribute(v, "z"), false, false) guiGridListSetItemColor(GUIEditor.gridlist[1] , row,x1,255,255,0) guiGridListSetItemColor(GUIEditor.gridlist[1] , row,y1,0,255,0) guiGridListSetItemColor(GUIEditor.gridlist[1] , row,z1,255,0,0) guiGridListSetItemColor(GUIEditor.gridlist[1] , row,name,0,0,255) end وتم التجربة وشغال موفق # Link to comment
Ahmed Ly Posted May 17, 2016 Author Share Posted May 17, 2016 انت ناسي تحط guiGridListSetItemData كودك قبل التعديل for i,v in pairs(xmlNodeGetChildren(xmlFindChild(xmlLoadFile("Xml.xml"),"Ahmed",0))) do local row = guiGridListAddRow (GUIEditor.gridlist[1] ) guiGridListSetItemText (GUIEditor.gridlist[1], row, 1,i..'-', false, false) guiGridListSetItemText (GUIEditor.gridlist[1] , row,name,xmlNodeGetAttribute(v, "name"), false, false) guiGridListSetItemText (GUIEditor.gridlist[1] , row, x1,xmlNodeGetAttribute(v, "x"), false, false) guiGridListSetItemText (GUIEditor.gridlist[1] , row,y1,xmlNodeGetAttribute(v, "y"), false, false) guiGridListSetItemText (GUIEditor.gridlist[1] , row,z1,xmlNodeGetAttribute(v, "z"), false, false) guiGridListSetItemColor(GUIEditor.gridlist[1] , row,x1,255,255,0) guiGridListSetItemColor(GUIEditor.gridlist[1] , row,y1,0,255,0) guiGridListSetItemColor(GUIEditor.gridlist[1] , row,z1,255,0,0) guiGridListSetItemColor(GUIEditor.gridlist[1] , row,name,0,0,255) end بعد التعديل for i,v in pairs(xmlNodeGetChildren(xmlFindChild(xmlLoadFile("Xml.xml"),"Ahmed",0))) do local row = guiGridListAddRow (GUIEditor.gridlist[1] ) guiGridListSetItemText (GUIEditor.gridlist[1], row, 1,i..'-', false, false) guiGridListSetItemText (GUIEditor.gridlist[1] , row,name,xmlNodeGetAttribute(v, "name"), false, false) guiGridListSetItemText (GUIEditor.gridlist[1] , row, x1,xmlNodeGetAttribute(v, "x"), false, false) guiGridListSetItemText (GUIEditor.gridlist[1] , row,y1,xmlNodeGetAttribute(v, "y"), false, false) guiGridListSetItemText (GUIEditor.gridlist[1] , row,z1,xmlNodeGetAttribute(v, "z"), false, false) guiGridListSetItemData (GUIEditor.gridlist[1] , row, x1,xmlNodeGetAttribute(v, "x"), false, false) guiGridListSetItemData (GUIEditor.gridlist[1] , row,y1,xmlNodeGetAttribute(v, "y"), false, false) guiGridListSetItemData (GUIEditor.gridlist[1] , row,z1,xmlNodeGetAttribute(v, "z"), false, false) guiGridListSetItemColor(GUIEditor.gridlist[1] , row,x1,255,255,0) guiGridListSetItemColor(GUIEditor.gridlist[1] , row,y1,0,255,0) guiGridListSetItemColor(GUIEditor.gridlist[1] , row,z1,255,0,0) guiGridListSetItemColor(GUIEditor.gridlist[1] , row,name,0,0,255) end وتم التجربة وشغال موفق #[/quot] شكرا لك 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