0 Üye ve 1 Ziyaretçi konuyu incelemekte.
GUIEditor = { tab = {}, tabpanel = {}, edit = {}, button = {}, window = {}, gridlist = {}}GUIEditor.window[1] = guiCreateWindow(320, 145, 640, 431, "Stock Market by MrSolo 1.0v", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.window[1].visible = false GUIEditor.tabpanel[1] = guiCreateTabPanel(27, 37, 589, 336, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Buy Stock", GUIEditor.tabpanel[1]) GUIEditor.gridlist[1] = guiCreateGridList(6, 8, 433, 293, false, GUIEditor.tab[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Company", 0.4) guiGridListAddColumn(GUIEditor.gridlist[1], "PPS", 0.25) guiGridListAddColumn(GUIEditor.gridlist[1], "Value change", 0.25) GUIEditor.button[1] = guiCreateButton(456, 19, 113, 54, "Buy Stock", false, GUIEditor.tab[1]) GUIEditor.button[1].enabled = false guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.edit[1] = guiCreateEdit(456, 83, 113, 31, "", false, GUIEditor.tab[1]) GUIEditor.edit[1].enabled = false GUIEditor.tab[2] = guiCreateTab("Sell Stock", GUIEditor.tabpanel[1]) GUIEditor.gridlist[2] = guiCreateGridList(6, 8, 433, 293, false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.gridlist[2], "SortSettingEnabled", "False") guiGridListAddColumn(GUIEditor.gridlist[2], "Company", 0.4) guiGridListAddColumn(GUIEditor.gridlist[2], "Total Shares", 0.25) guiGridListAddColumn(GUIEditor.gridlist[2], "Total Value", 0.25) GUIEditor.button[2] = guiCreateButton(456, 19, 113, 54, "Sell Stock", false, GUIEditor.tab[2]) GUIEditor.button[2].enabled = false guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.button[3] = guiCreateButton(17, 384, 609, 37, "Close", false, GUIEditor.window[1])guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA")
-- full gui_guiCreateTabPanel = guiCreateTabPanel_guiCreateTab = guiCreateTab_guiSetSelectedTab = guiSetSelectedTab_guiGetSelectedTab = guiGetSelectedTab_guiDeleteTab = guiDeleteTabfunction resimOlustur(isim,a) if fileExists(isim.."png") then return isim.."png" end local texture = dxCreateTexture(1,1) local pixels = dxGetTexturePixels(texture) local a = a or 255 local r,g,b = 255,255,255 dxSetPixelColor(pixels,0,0,r,g,b,a) dxSetTexturePixels(texture, pixels) local pxl = dxConvertPixels(dxGetTexturePixels(texture),"png") local nImg = fileCreate(isim..".png") fileWrite(nImg,pxl) fileClose(nImg) return isim..".png" endfunction renkVer(resim,hex) guiSetProperty(resim,"ImageColours","tl:FF"..hex.." tr:FF"..hex.." bl:FF"..hex.." br:FF"..hex)endlocal tabs = {}function guiCreateTabPanel(x,y,g,u,relative,parent) local sira = #tabs+1 if not tabs[sira] then tabs[sira] = {} end local t = tabs[sira] local kenarrenk = "1883D7" if relative then px,pu = guiGetSize(parent,false) x,y,g,u = x*px,y*pu,g*px,u*pu relative = false end t.back = guiCreateLabel(x,y,g,u,"",relative,parent) t.x,t.y = guiGetPosition(t.back,false) t.g,t.u = guiGetSize(t.back,false) t.secili,t.tabciklar = nil,{} t.tabciklar[0] = {} t.tabciklar[0].arka = guiCreateLabel(0,0,0,0,"",false,t.back) t.kenarlar = { ordaUst = guiCreateStaticImage(0,20,t.g,1,resimOlustur("test"), false, t.back), ortaAlt = guiCreateStaticImage(0,t.u-4,t.g,1,resimOlustur("test"), false, t.back), sol = guiCreateStaticImage(0,20,1,t.u-20,resimOlustur("test"), false, t.back), sag = guiCreateStaticImage(t.g-1,20,1,t.u-20,resimOlustur("test"), false, t.back) } for i,v in pairs(t.kenarlar) do renkVer(v,kenarrenk) guiSetProperty(v, "AlwaysOnTop", "True") guiSetAlpha(v, 0.4) end return t.backendfunction guiCreateTab(yazi,parent) local t = getTabPanel(parent) local sira = #t.tabciklar+1 if not t.tabciklar[sira] then t.tabciklar[sira] = {} end local tab = t.tabciklar[sira] local ox,oy = guiGetPosition(t.tabciklar[sira-1].arka,false) local og,op = guiGetSize(t.tabciklar[sira-1].arka,false) tab.arka = guiCreateStaticImage((ox+og),0,string.len(yazi)*8,20,resimOlustur("test",150),false,parent) tab.kose = guiCreateStaticImage((string.len(yazi)*8)-1,0,1,20,resimOlustur("test",200),false,tab.arka) renkVer(tab.arka,"000000") tab.yazi = guiCreateLabel(0,0,string.len(yazi)*8,20,yazi,false,tab.arka) guiLabelSetHorizontalAlign(tab.yazi, "center") guiLabelSetVerticalAlign(tab.yazi, "center") tab.alan = guiCreateStaticImage(0,20,t.g,t.u,resimOlustur("test",255),false,parent) renkVer(tab.alan,"000000") guiSetVisible(tab.alan,false) guiSetAlpha(tab.arka,0.7) if sira == 1 then tab.secili = true guiSetVisible(tab.alan,true) guiSetSelectedTab(parent,tab.alan) guiSetAlpha(tab.arka,1) end return tab.alanendfunction guiSetSelectedTab(tabpanel,tab) local t = getTabPanel(tabpanel) local ttab = getTab(t,tab) if t.secili then -- eskisini deaktif local ttab = getTab(t,t.secili) guiSetVisible(t.secili,false) guiSetAlpha(ttab.arka,0.7) end -- yenisini aktif guiSetVisible(tab,true) guiSetAlpha(ttab.arka,1) ttab.secili = true t.secili = tabendfunction guiGetSelectedTab(tabpanel) local t = getTabPanel(tabpanel) return t.seciliendfunction guiDeleteTab(tab,tabpanel) local t = getTabPanel(tabpanel) local ttab,sira = getTab(t,tab) for i,v in pairs(ttab) do if isElement(v) then destroyElement(v) end end table.remove(t.tabciklar,sira) for i=1,#t.tabciklar do local ox,oy = guiGetPosition(t.tabciklar[i-1].arka,false) local og,op = guiGetSize(t.tabciklar[i-1].arka,false) guiSetPosition(t.tabciklar[i].arka,ox+og,0,false) endendaddEventHandler("onClientMouseEnter", resourceRoot, function() for i,v in pairs(tabs) do for i,t in pairs(v.tabciklar) do if source == t.yazi and not t.secili then guiSetAlpha(t.arka,0.6) end end endend)addEventHandler("onClientMouseLeave", resourceRoot, function() for i,v in pairs(tabs) do for i,t in pairs(v.tabciklar) do if source == t.yazi and not t.secili then guiSetAlpha(t.arka,0.7) end end endend)addEventHandler("onClientGUIClick", resourceRoot, function() for i,v in pairs(tabs) do for i,t in pairs(v.tabciklar) do if source == t.yazi then guiSetSelectedTab(v.back,t.alan) triggerEvent("onClientGUITabSwitched", t.alan, t.alan) end end endend)function getTabPanel(element) if type(element) ~= "table" then for i,v in pairs(tabs) do if v.back == element then return tabs[i] end end else return element end endfunction getTab(tabpanel,element) for i,v in pairs(tabpanel.tabciklar) do if v.alan == element then return v,i end end return falseend
Ben Annatamadım Galiba Size Beyler Üsteki Butonlar Lib Olmuyor KARE yani beyaz Cizgili Onu Diyorum Nasıl Yapabilirim
loadstring(exports["MahLib"].getFunctions("guiCreateWindow","guiCreateButton","guiCreateEdit","guiCreateGridList"))()
GUIEditor.tab[1] = guiCreateTab("Buy Stock", GUIEditor.tabpanel[1])