[YARDIM] Lip Güncel

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı The|Flora

  • Yeni Üye
  • *
    • İleti: 53
: 19 Şubat 2019, 16:08:25
Gercekten Konu Acmak İstemezdim Lip İcin Derslere de Baktım Fakat Annayamadım  Tek Butona  Yazısısına Renk Örnek Araclar Butonuna Renk Vercem Verioyorum Hepsi Aynı Renk Oluyor Şimdi Basit Geliyor Size Ama İnanın Her Akşam Ders Bölümünü İziliyorum Kızma Sakın Linki görebilmek için Kayıt olun yada Giriş yapın.   :) 


Kod
genelGuiTablo = {}

--guiCreateWindow
wtablo = {}
--guiCreateButton
btablo = {}
ltablo = {}


function resimOlustur(isim,a)
if fileExists(isim.."png") then return isim.."png" end
local texture = dxCreateTexture(1,1)
local pixels = dxGetTexturePixels(texture)
local r,g,b,a = 255,255,255,a or 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"
end

function renkVer(resim,hex)
guiSetProperty(resim,"ImageColours","tl:FF000000"..hex.." tr:FF"..hex.." bl:FF"..hex.." br:FF"..hex)
end

--font1 = guiCreateFont("dosyalar/font_adi.ttf",font_buyukluk)

-- label --



function label_olustur(x,y,g,u,yazi,relative,parent,hor,ver,buyukluk)
lsayi = #ltablo +1
if not ltablo[lsayi] then ltablo[lsayi] = {} end

if relative  then
px,pu = guiGetSize(parent,false)
x,y,g,u = x*px,y*pu,g*px,u*pu
relative = false
end
yazi_tipi = guiCreateFont("font/yazi_tipi.ttf",buyukluk)

ltablo[lsayi].labell = guiCreateLabel(x,y,g,u,yazi,relative,parent,hor,ver)
guiSetFont(ltablo[lsayi].labell,yazi_tipi)
guiLabelSetHorizontalAlign(ltablo[lsayi].labell,(hor or "left"))
guiLabelSetVerticalAlign(ltablo[lsayi].labell,(ver or "top"))
return ltablo[lsayi].labell
end


_guiCreateWindow = guiCreateWindow
function guiCreateWindow(x,y,g,u,yazi,relative,parent,renk1,renk2,renk3,renk4)
wsayi = #wtablo +1

if not renk1 or string.len(renk1) > 6 then
renk1 =  "1E1E1F" -- window renk üst taraf //  window top color
end
if not renk2 or string.len(renk2) > 6 then
renk2 = "1E1E1F" -- window renk alt taraf // window bottom color
end
if not renk3 or string.len(renk3) > 6 then
renk3 = "131314" -- baslik renk // window header back color
end
if not renk4 or string.len(renk4) > 6 then
renk4 = "1883D7"  -- window kenar çizgi // window outline color
end

if relative  then
px,pu = guiGetSize(parent,false)
x,y,g,u = x*px,y*pu,g*px,u*pu
relative = false
end

if not wtablo[wsayi] then wtablo[wsayi] = {} end
--arkaResim
wtablo[wsayi].resim = guiCreateStaticImage(x,y,g,u,resimOlustur("test"),relative,parent)
renkVer(wtablo[wsayi].resim,renk1)
guiSetProperty(wtablo[wsayi].resim,"ImageColours","tl:FF"..renk1.." tr:FF"..renk1.." bl:FF"..renk2.." br:FF"..renk2.."")
--baslıkArka
wtablo[wsayi].basarka = guiCreateStaticImage(0,0,g,20, resimOlustur("test"), false, wtablo[wsayi].resim)
renkVer(wtablo[wsayi].basarka,renk3)
--kenarlar
wtablo[wsayi].kenarlar = {
ordaUst = guiCreateStaticImage(0,0,g,1,resimOlustur("test"), false, wtablo[wsayi].resim),
ortaAlt = guiCreateStaticImage(0,u-1,g,1,resimOlustur("test"), false, wtablo[wsayi].resim),
sol = guiCreateStaticImage(0,0,1,u,resimOlustur("test"), false, wtablo[wsayi].resim),
sag = guiCreateStaticImage(g-1,0,1,u,resimOlustur("test"), false, wtablo[wsayi].resim)
}

for i,v in pairs(wtablo[wsayi].kenarlar) do
renkVer(v,renk4)
guiSetProperty(v, "AlwaysOnTop", "True")
guiSetAlpha(v, 0.4)
end
--baslıkLabel
wtablo[wsayi].label = label_olustur((g/2)-((string.len(yazi)*8)/2),0,(string.len(yazi)*8),20, yazi, false, wtablo[wsayi].basarka,"center","center",8)

--kapatArka
--wtablo[wsayi].kapatArka = guiCreateStaticImage(g-25,1,25,20,resimOlustur("test"),false,wtablo[wsayi].basarka)
renkVer(wtablo[wsayi].kapatArka,"E81123")
guiSetAlpha(wtablo[wsayi].kapatArka, 0.5)
kapatLabel
wtablo[wsayi].kapat = guiCreateLabel(0,-2,25,20, "X", false, wtablo[wsayi].kapatArka)
guiSetFont(wtablo[wsayi].kapat, "default-bold-small")
guiLabelSetHorizontalAlign(wtablo[wsayi].kapat, "center")
guiLabelSetVerticalAlign(wtablo[wsayi].kapat, "center")

return wtablo[wsayi].resim
end

_guiCreateButton = guiCreateButton
function guiCreateButton(x,y,g,u,yazi,relative,parent,renk1,renk2)
bsayi = #btablo +1
if not btablo[bsayi] then btablo[bsayi] = {} end

if not renk1 or string.len(renk1) > 6 then
--renk = math.random(999999)
renk1 = "131314" -- genel buton rengi
end
if not renk2 or string.len(renk2) > 6 then
renk2 = "FFFFFF" -- buton kenar rengi
end
--arkaResim
if relative  then
px,pu = guiGetSize(parent,false)
x,y,g,u = x*px,y*pu,g*px,u*pu
relative = false
end
btablo[bsayi].resim = guiCreateStaticImage(x,y,g,u,resimOlustur("test"),relative,parent)
renkVer(btablo[bsayi].resim,renk1)
--kenarlar
btablo[bsayi].kenarlar = {
ortaUst = guiCreateStaticImage(0,0,g,1,resimOlustur("test"), relative, btablo[bsayi].resim),
ortaAlt = guiCreateStaticImage(0,u-1,g,1,resimOlustur("test"), relative, btablo[bsayi].resim),
sol = guiCreateStaticImage(0,0,1,u,resimOlustur("test"), relative, btablo[bsayi].resim),
sag = guiCreateStaticImage(g-1,0,1,u,resimOlustur("test"), relative, btablo[bsayi].resim)
}

for i,v in pairs(btablo[bsayi].kenarlar) do
renkVer(v,renk2)
guiSetAlpha(v, 0.4)
end

--label
btablo[bsayi].label = label_olustur(0,0,g,u,yazi,relative,btablo[bsayi].resim,"center","center",8)


genelGuiTablo[btablo[bsayi].label] = btablo[bsayi].kenarlar
return btablo[bsayi].label
end

--edit,gridlst,buton,memo mouse
addEventHandler("onClientMouseEnter", resourceRoot, function()
for i,v in pairs(genelGuiTablo) do
if source == i then
for i,v in pairs(v) do
guiSetAlpha(v, 1)
end
end
end
end)

addEventHandler("onClientMouseLeave", resourceRoot, function()
for i,v in pairs(genelGuiTablo) do
if source == i then
for i,v in pairs(v) do
guiSetAlpha(v, 0.4)
end
end
end
end)

--pencere mouse
addEventHandler("onClientMouseEnter", resourceRoot, function()
for i,v in pairs(wtablo) do
if source == v.kapat then
guiSetAlpha(v.kapatArka, 1)
break
end
end
end)

addEventHandler("onClientMouseLeave", resourceRoot, function()
for i,v in pairs(wtablo) do
if source == v.kapat then
guiSetAlpha(v.kapatArka, 0.5)
break
end
end
end)

addEventHandler("onClientGUIClick", resourceRoot, function()
for i,v in pairs(wtablo) do
if source == v.kapat then
guiSetVisible(v.resim, false)
showCursor(false)
end
end
end)

function butonmu(label)
for i,v in pairs(btablo) do
if v.label == label then
return i
end
end
return false
end

function penceremi(resim)
for i,v in pairs(wtablo) do
if v.resim == resim then
return i
end
end
return false
end

function basliklabelmi(label)
for i,v in pairs(wtablo) do
if v.label == label then
return i
end
end
return false
end

function baslikmi(element)
for i,v in pairs(wtablo) do
if v.basarka == element or wtablo[basliklabelmi(element)] and  v.label == element then
return i
end
end
return false
end


--basinca olan ufalma
basili = {}
addEventHandler("onClientGUIMouseDown", resourceRoot, function()
if butonmu(source) then
if basili[source] then return end
basili[source] = true
local g,u = guiGetSize(source, false)
local x,y = guiGetPosition(source, false)
guiSetPosition(source, x+2,y+2, false)
guiSetSize(source, g-4,u-4, false)
end
end)

addEventHandler("onClientGUIMouseUp", resourceRoot, function()
if butonmu(source) then
if not basili[source] then 
for i,v in pairs(basili) do
if v == true then
source = i
break
end
end
end
if not basili[source] then return end
basili[source] = nil
local g,u = guiGetSize(source, false)
local x,y = guiGetPosition(source, false)
guiSetPosition(source, x-2,y-2, false)
guiSetSize(source, g+4,u+4, false)
else
for i,v in pairs(basili) do
if v == true then
source = i
break
end
end
if butonmu(source) then
basili[source] = nil
local g,u = guiGetSize(source, false)
local x,y = guiGetPosition(source, false)
guiSetPosition(source, x-2,y-2, false)
guiSetSize(source, g+4,u+4, false)
end
end
end)

function basiliBirak()
for i,v in pairs(basili) do
if v == true then
source = i
break
end
end
if butonmu(source) then
basili[source] = nil
local g,u = guiGetSize(source, false)
local x,y = guiGetPosition(source, false)
guiSetPosition(source, x-2,y-2, false)
guiSetSize(source, g+4,u+4, false)
end
end

addEventHandler("onClientClick", root, function(button, durum, _, _, _, _, _, tiklanan)
if durum == "up" then
if tiklanan then
local element = getElementType(tiklanan)
if not string.find(element, "gui-") then
basiliBirak()
end
else
basiliBirak()
end
end
end)

--panel taşıma
addEventHandler( "onClientGUIMouseDown", resourceRoot,function ( btn, x, y )
if btn == "left" and baslikmi(source) then
local source = wtablo[baslikmi(source)].resim
clickedElement = source
local elementPos = { guiGetPosition( source, false ) }
offsetPos = { x - elementPos[ 1 ], y - elementPos[ 2 ] };
end
end)

addEventHandler( "onClientGUIMouseUp", resourceRoot,function ( btn, x, y )
if btn == "left" and baslikmi(source) then
clickedElement = nil
end
end)

addEventHandler( "onClientCursorMove", getRootElement( ),function ( _, _, x, y )
if clickedElement then
guiSetPosition( clickedElement, x - offsetPos[ 1 ], y - offsetPos[ 2 ], false )
end
end)


--diğer funclar
_guiGetPosition = guiGetPosition
function guiGetPosition(element,relative)
if butonmu(element) then
local sira = butonmu(element)
local x,y = _guiGetPosition(btablo[sira].resim, relative)
return x,y
else
local x,y = _guiGetPosition(element, relative)
return x,y
end
end

_guiSetPosition = guiSetPosition
function guiSetPosition(element,x,y,relative)
if butonmu(element) then
local sira = butonmu(element)
_guiSetPosition(btablo[sira].resim, x,y, relative)
else
_guiSetPosition(element,x,y,relative)
end
end

_guiGetSize = guiGetSize
function guiGetSize(element,relative)
if butonmu(element) then
local sira = butonmu(element)
local g,u = _guiGetSize(btablo[sira].resim, relative)
return g,u
else
local g,u = _guiGetSize(element, relative)
return g,u
end
end

_guiSetSize = guiSetSize
function guiSetSize(element,g,u,relative)
if butonmu(element) then
local sira = butonmu(element)
_guiSetSize(btablo[sira].resim, g,u, false)
_guiSetSize(btablo[sira].label, g,u, false)
--sağ kenar çizgi
_guiSetPosition(btablo[sira].kenarlar.sag, g-1, 0, false)
_guiSetSize(btablo[sira].kenarlar.sag, 1,u, false)
--alt kenar çizgi
_guiSetPosition(btablo[sira].kenarlar.ortaAlt, 0, u-1, false)
_guiSetSize(btablo[sira].kenarlar.ortaAlt, g,1, false)
elseif penceremi(element) then
local sira = penceremi(element)
_guiSetSize(wtablo[sira].resim, g,u, false)
--sağ kenar çizgi
_guiSetPosition(wtablo[sira].kenarlar.sag, g-1, 0, false)
_guiSetSize(wtablo[sira].kenarlar.sag, 1,u, false)
--alt kenar çizgi
_guiSetPosition(wtablo[sira].kenarlar.ortaAlt, 0, u-1, false)
_guiSetSize(wtablo[sira].kenarlar.ortaAlt, g,1, false)
--baslik
_guiSetSize(wtablo[sira].basarka, g,20, false)
--kapat
--guiSetPosition(wtablo[sira].kapatArka, g-25,1, false)
--label
local yazi = guiGetText(wtablo[sira].label)
_guiSetPosition(wtablo[sira].label, (g/2)-((string.len(yazi)*8)/2),0, false)
_guiSetSize(wtablo[sira].label,(string.len(yazi)*8),20, false)
guiLabelSetHorizontalAlign(wtablo[sira].label, "center")
guiLabelSetVerticalAlign(wtablo[sira].label, "center")
end
end

_guiSetText = guiSetText
function guiSetText(element, yazi)
if penceremi(element) then
local sira = penceremi(element)
local g,u = guiGetSize(wtablo[sira].resim,false)
guiSetPosition(wtablo[sira].label,(g/2)-((string.len(yazi)*8)/2),0, false)
guiSetSize(wtablo[sira].label, (string.len(yazi)*8),20, false)
guiLabelSetHorizontalAlign(wtablo[sira].label, "center")
guiLabelSetVerticalAlign(wtablo[sira].label, "center")
_guiSetText(wtablo[sira].label, yazi)
else
_guiSetText(element, yazi)
end
end

_guiGetText = guiGetText
function guiGetText(element)
if penceremi(element) then
local sira = penceremi(element)
local yazi = _guiGetText(wtablo[sira].label)
return yazi
else
local yazi = _guiGetText(element)
return yazi
end
end

_guiSetEnabled = guiSetEnabled
function guiSetEnabled(element, bool)
if butonmu(element) then
if bool == false then
guiSetAlpha(btablo[butonmu(element)].resim,0.5)
_guiSetEnabled(element, bool)
else
guiSetAlpha(btablo[butonmu(element)].resim,1)
_guiSetEnabled(element, bool)
end
else
_guiSetEnabled(element, bool)
end
end

_guiSetVisible = guiSetVisible
function guiSetVisible(element, bool)
if butonmu(element) then
local sira = butonmu(element)
_guiSetVisible(btablo[sira].resim, bool)
else
_guiSetVisible(element, bool)
end
end

_destroyElement = destroyElement
function destroyElement(element)
if butonmu(element) then
local sira = butonmu(element)
_destroyElement(btablo[sira].resim)
btablo[sira] = nil
else
_destroyElement(element)
end
end

_guiWindowSetSizable = guiWindowSetSizable
function guiWindowSetSizable(element, bool)
if getElementType(element) ~= "gui-window" then
return false
else
_guiWindowSetSizable(element, bool)
end
end
« Son Düzenleme: 15 Mart 2019, 20:31:06 Gönderen: Narkoz »
 


MTASATURK

[YARDIM] Lip Güncel
« : 19 Şubat 2019, 16:08:25 »

Çevrimdışı Mahlukat

  • Uzman Üye
  • *
    • İleti: 637
Yanıtla #1 : 19 Şubat 2019, 16:34:04
Kod
buton = guiCreateButton(x,y,g,u,"buton",false,panel,"CC0000")
--sondaki buton rengi
Linki görebilmek için Kayıt olun yada Giriş yapın.
 


Çevrimdışı The|Flora

  • Yeni Üye
  • *
    • İleti: 53
Yanıtla #2 : 19 Şubat 2019, 17:05:31
lip icine böyle ekledim  Olmadı

buton = guiCreateButton(x,y,g,u,"Araclar",false,panel,"FF0000")

böylede Calışmadı
buton = guiCreateButton(x,y,g,u,"buton ",false,panel,"FF0000")
 


Çevrimdışı Mahlukat

  • Uzman Üye
  • *
    • İleti: 637
Yanıtla #3 : 19 Şubat 2019, 17:14:24
kodu örnek olarak attım :(( direk kopyala yapıştır yaparsan tabi çalışmaz
Linki görebilmek için Kayıt olun yada Giriş yapın.
 


Çevrimdışı The|Flora

  • Yeni Üye
  • *
    • İleti: 53
Yanıtla #4 : 19 Şubat 2019, 17:20:34
normal olarak butondaki isme renk ayalıcagım şekliyle atarmsın suan hic bir foksiyonu bilmiyorum :(
 


Çevrimdışı DogukanUCAN

  • Acemi Üye
  • *
    • İleti: 177
  • Lowide Freeroam
Yanıtla #5 : 19 Şubat 2019, 19:36:43
Hangi butonu renkli yapacaksın kodları atarsan yardımcı oluruz client.lua atman yeterli
 


MTASATURK

Ynt: [yardım]Lip
« Yanıtla #5 : 19 Şubat 2019, 19:36:43 »

Çevrimdışı The|Flora

  • Yeni Üye
  • *
    • İleti: 53
Yanıtla #6 : 19 Şubat 2019, 19:49:47
Linki görebilmek için Kayıt olun yada Giriş yapın. Ben Arac Yazan Yaznının  Rengini   Degiştirmek İstiyorum Lip Kullanıca Hepsi Aynı oluyor



fr client: Linki görebilmek için Kayıt olun yada Giriş yapın.
 


Çevrimdışı #Serius

  • Uzman Üye
  • *
    • İleti: 685
Yanıtla #7 : 19 Şubat 2019, 21:29:25
Buyur;

- Lib.lua

Kod
genelGuiTablo = {}

--guiCreateWindow
wtablo = {}
--guiCreateButton
btablo = {}
ltablo = {}


function resimOlustur(isim,a)
if fileExists(isim.."png") then return isim.."png" end
local texture = dxCreateTexture(1,1)
local pixels = dxGetTexturePixels(texture)
local r,g,b,a = 255,255,255,a or 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"
end

function renkVer(resim,hex)
guiSetProperty(resim,"ImageColours","tl:FF000000"..hex.." tr:FF"..hex.." bl:FF"..hex.." br:FF"..hex)
end

--font1 = guiCreateFont("dosyalar/font_adi.ttf",font_buyukluk)

-- label --



function label_olustur(x,y,g,u,yazi,relative,parent,hor,ver,buyukluk)
lsayi = #ltablo +1
if not ltablo[lsayi] then ltablo[lsayi] = {} end

if relative  then
px,pu = guiGetSize(parent,false)
x,y,g,u = x*px,y*pu,g*px,u*pu
relative = false
end
yazi_tipi = guiCreateFont("font/yazi_tipi.ttf",buyukluk)

ltablo[lsayi].labell = guiCreateLabel(x,y,g,u,yazi,relative,parent,hor,ver)
guiSetFont(ltablo[lsayi].labell,yazi_tipi)
guiLabelSetHorizontalAlign(ltablo[lsayi].labell,(hor or "left"))
guiLabelSetVerticalAlign(ltablo[lsayi].labell,(ver or "top"))
return ltablo[lsayi].labell
end


_guiCreateWindow = guiCreateWindow
function guiCreateWindow(x,y,g,u,yazi,relative,parent,renk1,renk2,renk3,renk4)
wsayi = #wtablo +1

if not renk1 or string.len(renk1) > 6 then
renk1 =  "1E1E1F" -- window renk üst taraf //  window top color
end
if not renk2 or string.len(renk2) > 6 then
renk2 = "1E1E1F" -- window renk alt taraf // window bottom color
end
if not renk3 or string.len(renk3) > 6 then
renk3 = "131314" -- baslik renk // window header back color
end
if not renk4 or string.len(renk4) > 6 then
renk4 = "1883D7"  -- window kenar çizgi // window outline color
end

if relative  then
px,pu = guiGetSize(parent,false)
x,y,g,u = x*px,y*pu,g*px,u*pu
relative = false
end

if not wtablo[wsayi] then wtablo[wsayi] = {} end
--arkaResim
wtablo[wsayi].resim = guiCreateStaticImage(x,y,g,u,resimOlustur("test"),relative,parent)
renkVer(wtablo[wsayi].resim,renk1)
guiSetProperty(wtablo[wsayi].resim,"ImageColours","tl:FF"..renk1.." tr:FF"..renk1.." bl:FF"..renk2.." br:FF"..renk2.."")
--baslıkArka
wtablo[wsayi].basarka = guiCreateStaticImage(0,0,g,20, resimOlustur("test"), false, wtablo[wsayi].resim)
renkVer(wtablo[wsayi].basarka,renk3)
--kenarlar
wtablo[wsayi].kenarlar = {
ordaUst = guiCreateStaticImage(0,0,g,1,resimOlustur("test"), false, wtablo[wsayi].resim),
ortaAlt = guiCreateStaticImage(0,u-1,g,1,resimOlustur("test"), false, wtablo[wsayi].resim),
sol = guiCreateStaticImage(0,0,1,u,resimOlustur("test"), false, wtablo[wsayi].resim),
sag = guiCreateStaticImage(g-1,0,1,u,resimOlustur("test"), false, wtablo[wsayi].resim)
}

for i,v in pairs(wtablo[wsayi].kenarlar) do
renkVer(v,renk4)
guiSetProperty(v, "AlwaysOnTop", "True")
guiSetAlpha(v, 0.4)
end
--baslıkLabel
wtablo[wsayi].label = label_olustur((g/2)-((string.len(yazi)*8)/2),0,(string.len(yazi)*8),20, yazi, false, wtablo[wsayi].basarka,"center","center",8)

--kapatArka
--wtablo[wsayi].kapatArka = guiCreateStaticImage(g-25,1,25,20,resimOlustur("test"),false,wtablo[wsayi].basarka)
renkVer(wtablo[wsayi].kapatArka,"E81123")
guiSetAlpha(wtablo[wsayi].kapatArka, 0.5)
kapatLabel
wtablo[wsayi].kapat = guiCreateLabel(0,-2,25,20, "X", false, wtablo[wsayi].kapatArka)
guiSetFont(wtablo[wsayi].kapat, "default-bold-small")
guiLabelSetHorizontalAlign(wtablo[wsayi].kapat, "center")
guiLabelSetVerticalAlign(wtablo[wsayi].kapat, "center")

return wtablo[wsayi].resim
end

_guiCreateButton = guiCreateButton
function guiCreateButton(x,y,g,u,yazi,relative,parent,renk1,renk2)
bsayi = #btablo +1
if not btablo[bsayi] then btablo[bsayi] = {} end

if not renk1 or string.len(renk1) > 6 then
--renk = math.random(999999)
renk1 = "131314" -- genel buton rengi
end
if not renk2 or string.len(renk2) > 6 then
renk2 = "FFFFFF" -- buton kenar rengi
end
--arkaResim
if relative  then
px,pu = guiGetSize(parent,false)
x,y,g,u = x*px,y*pu,g*px,u*pu
relative = false
end
btablo[bsayi].resim = guiCreateStaticImage(x,y,g,u,resimOlustur("test"),relative,parent)
renkVer(btablo[bsayi].resim,renk1)
--kenarlar
btablo[bsayi].kenarlar = {
ortaUst = guiCreateStaticImage(0,0,g,1,resimOlustur("test"), relative, btablo[bsayi].resim),
ortaAlt = guiCreateStaticImage(0,u-1,g,1,resimOlustur("test"), relative, btablo[bsayi].resim),
sol = guiCreateStaticImage(0,0,1,u,resimOlustur("test"), relative, btablo[bsayi].resim),
sag = guiCreateStaticImage(g-1,0,1,u,resimOlustur("test"), relative, btablo[bsayi].resim)
}

for i,v in pairs(btablo[bsayi].kenarlar) do
renkVer(v,renk2)
guiSetAlpha(v, 0.4)
end

--label
btablo[bsayi].label = label_olustur(0,0,g,u,yazi,relative,btablo[bsayi].resim,"center","center",8)


genelGuiTablo[btablo[bsayi].label] = btablo[bsayi].kenarlar
return btablo[bsayi].label
end

--edit,gridlst,buton,memo mouse
addEventHandler("onClientMouseEnter", resourceRoot, function()
for i,v in pairs(genelGuiTablo) do
if source == i then
for i,v in pairs(v) do
guiSetAlpha(v, 1)
end
end
end
end)

addEventHandler("onClientMouseLeave", resourceRoot, function()
for i,v in pairs(genelGuiTablo) do
if source == i then
for i,v in pairs(v) do
guiSetAlpha(v, 0.4)
end
end
end
end)

--pencere mouse
addEventHandler("onClientMouseEnter", resourceRoot, function()
for i,v in pairs(wtablo) do
if source == v.kapat then
guiSetAlpha(v.kapatArka, 1)
break
end
end
end)

addEventHandler("onClientMouseLeave", resourceRoot, function()
for i,v in pairs(wtablo) do
if source == v.kapat then
guiSetAlpha(v.kapatArka, 0.5)
break
end
end
end)

addEventHandler("onClientGUIClick", resourceRoot, function()
for i,v in pairs(wtablo) do
if source == v.kapat then
guiSetVisible(v.resim, false)
showCursor(false)
end
end
end)

function butonmu(label)
for i,v in pairs(btablo) do
if v.label == label then
return i
end
end
return false
end

function penceremi(resim)
for i,v in pairs(wtablo) do
if v.resim == resim then
return i
end
end
return false
end

function basliklabelmi(label)
for i,v in pairs(wtablo) do
if v.label == label then
return i
end
end
return false
end

function baslikmi(element)
for i,v in pairs(wtablo) do
if v.basarka == element or wtablo[basliklabelmi(element)] and  v.label == element then
return i
end
end
return false
end


--basinca olan ufalma
basili = {}
addEventHandler("onClientGUIMouseDown", resourceRoot, function()
if butonmu(source) then
if basili[source] then return end
basili[source] = true
local g,u = guiGetSize(source, false)
local x,y = guiGetPosition(source, false)
guiSetPosition(source, x+2,y+2, false)
guiSetSize(source, g-4,u-4, false)
end
end)

addEventHandler("onClientGUIMouseUp", resourceRoot, function()
if butonmu(source) then
if not basili[source] then 
for i,v in pairs(basili) do
if v == true then
source = i
break
end
end
end
if not basili[source] then return end
basili[source] = nil
local g,u = guiGetSize(source, false)
local x,y = guiGetPosition(source, false)
guiSetPosition(source, x-2,y-2, false)
guiSetSize(source, g+4,u+4, false)
else
for i,v in pairs(basili) do
if v == true then
source = i
break
end
end
if butonmu(source) then
basili[source] = nil
local g,u = guiGetSize(source, false)
local x,y = guiGetPosition(source, false)
guiSetPosition(source, x-2,y-2, false)
guiSetSize(source, g+4,u+4, false)
end
end
end)

function basiliBirak()
for i,v in pairs(basili) do
if v == true then
source = i
break
end
end
if butonmu(source) then
basili[source] = nil
local g,u = guiGetSize(source, false)
local x,y = guiGetPosition(source, false)
guiSetPosition(source, x-2,y-2, false)
guiSetSize(source, g+4,u+4, false)
end
end

addEventHandler("onClientClick", root, function(button, durum, _, _, _, _, _, tiklanan)
if durum == "up" then
if tiklanan then
local element = getElementType(tiklanan)
if not string.find(element, "gui-") then
basiliBirak()
end
else
basiliBirak()
end
end
end)

--panel taşıma
addEventHandler( "onClientGUIMouseDown", resourceRoot,function ( btn, x, y )
if btn == "left" and baslikmi(source) then
local source = wtablo[baslikmi(source)].resim
clickedElement = source
local elementPos = { guiGetPosition( source, false ) }
offsetPos = { x - elementPos[ 1 ], y - elementPos[ 2 ] };
end
end)

addEventHandler( "onClientGUIMouseUp", resourceRoot,function ( btn, x, y )
if btn == "left" and baslikmi(source) then
clickedElement = nil
end
end)

addEventHandler( "onClientCursorMove", getRootElement( ),function ( _, _, x, y )
if clickedElement then
guiSetPosition( clickedElement, x - offsetPos[ 1 ], y - offsetPos[ 2 ], false )
end
end)


--diğer funclar
_guiGetPosition = guiGetPosition
function guiGetPosition(element,relative)
if butonmu(element) then
local sira = butonmu(element)
local x,y = _guiGetPosition(btablo[sira].resim, relative)
return x,y
else
local x,y = _guiGetPosition(element, relative)
return x,y
end
end

_guiSetPosition = guiSetPosition
function guiSetPosition(element,x,y,relative)
if butonmu(element) then
local sira = butonmu(element)
_guiSetPosition(btablo[sira].resim, x,y, relative)
else
_guiSetPosition(element,x,y,relative)
end
end

_guiGetSize = guiGetSize
function guiGetSize(element,relative)
if butonmu(element) then
local sira = butonmu(element)
local g,u = _guiGetSize(btablo[sira].resim, relative)
return g,u
else
local g,u = _guiGetSize(element, relative)
return g,u
end
end

_guiSetSize = guiSetSize
function guiSetSize(element,g,u,relative)
if butonmu(element) then
local sira = butonmu(element)
_guiSetSize(btablo[sira].resim, g,u, false)
_guiSetSize(btablo[sira].label, g,u, false)
--sağ kenar çizgi
_guiSetPosition(btablo[sira].kenarlar.sag, g-1, 0, false)
_guiSetSize(btablo[sira].kenarlar.sag, 1,u, false)
--alt kenar çizgi
_guiSetPosition(btablo[sira].kenarlar.ortaAlt, 0, u-1, false)
_guiSetSize(btablo[sira].kenarlar.ortaAlt, g,1, false)
elseif penceremi(element) then
local sira = penceremi(element)
_guiSetSize(wtablo[sira].resim, g,u, false)
--sağ kenar çizgi
_guiSetPosition(wtablo[sira].kenarlar.sag, g-1, 0, false)
_guiSetSize(wtablo[sira].kenarlar.sag, 1,u, false)
--alt kenar çizgi
_guiSetPosition(wtablo[sira].kenarlar.ortaAlt, 0, u-1, false)
_guiSetSize(wtablo[sira].kenarlar.ortaAlt, g,1, false)
--baslik
_guiSetSize(wtablo[sira].basarka, g,20, false)
--kapat
--guiSetPosition(wtablo[sira].kapatArka, g-25,1, false)
--label
local yazi = guiGetText(wtablo[sira].label)
_guiSetPosition(wtablo[sira].label, (g/2)-((string.len(yazi)*8)/2),0, false)
_guiSetSize(wtablo[sira].label,(string.len(yazi)*8),20, false)
guiLabelSetHorizontalAlign(wtablo[sira].label, "center")
guiLabelSetVerticalAlign(wtablo[sira].label, "center")
end
end

_guiSetText = guiSetText
function guiSetText(element, yazi)
if penceremi(element) then
local sira = penceremi(element)
local g,u = guiGetSize(wtablo[sira].resim,false)
guiSetPosition(wtablo[sira].label,(g/2)-((string.len(yazi)*8)/2),0, false)
guiSetSize(wtablo[sira].label, (string.len(yazi)*8),20, false)
guiLabelSetHorizontalAlign(wtablo[sira].label, "center")
guiLabelSetVerticalAlign(wtablo[sira].label, "center")
_guiSetText(wtablo[sira].label, yazi)
else
_guiSetText(element, yazi)
end
end

_guiGetText = guiGetText
function guiGetText(element)
if penceremi(element) then
local sira = penceremi(element)
local yazi = _guiGetText(wtablo[sira].label)
return yazi
else
local yazi = _guiGetText(element)
return yazi
end
end

_guiSetEnabled = guiSetEnabled
function guiSetEnabled(element, bool)
if butonmu(element) then
if bool == false then
guiSetAlpha(btablo[butonmu(element)].resim,0.5)
_guiSetEnabled(element, bool)
else
guiSetAlpha(btablo[butonmu(element)].resim,1)
_guiSetEnabled(element, bool)
end
else
_guiSetEnabled(element, bool)
end
end

_guiSetVisible = guiSetVisible
function guiSetVisible(element, bool)
if butonmu(element) then
local sira = butonmu(element)
_guiSetVisible(btablo[sira].resim, bool)
else
_guiSetVisible(element, bool)
end
end

_destroyElement = destroyElement
function destroyElement(element)
if butonmu(element) then
local sira = butonmu(element)
_destroyElement(btablo[sira].resim)
btablo[sira] = nil
else
_destroyElement(element)
end
end

_guiWindowSetSizable = guiWindowSetSizable
function guiWindowSetSizable(element, bool)
if getElementType(element) ~= "gui-window" then
return false
else
_guiWindowSetSizable(element, bool)
end
end

function guiButtonSetColor(button,renk1)
if butonmu(button) then
local sira = butonmu(button)
for i,v in pairs(btablo[sira].renk1) do
renkVer(v,renk)
guiSetAlpha(v, 0.5)
end
end
end

-- Kullanım
guiButtonSetColor(getControl(wndMain, "Karakterler"),"ffcc00") -- Karakterler kısmına f1 deki button adını yazıcaksın f1de nasıl yazılmışsa ordada öyle yazılması zorunlu.

** Sakın bu kodu gidipte lib luanın içine koyma freeroam dosyasındaki fr_client.lua ya  üstlere biyere koy. fonksiyonun içinede koyma!

--** Kodu denemedim sıkıntı çıkarsa yazarsın.
« Son Düzenleme: 15 Mart 2019, 20:32:47 Gönderen: Narkoz »
 


Çevrimdışı The|Flora

  • Yeni Üye
  • *
    • İleti: 53
Yanıtla #8 : 19 Şubat 2019, 21:53:06
Linki görebilmek için Kayıt olun yada Giriş yapın. lip koydugumda bütün renkler orjınal freeroam dönuyor   

bunu koyuncada F1 acılmıyor 
Kod
guiButtonSetColor(getControl(wndMain, "karakterler"),"ffcc00") 


Mesaj Birleştirildi: 20 Şubat 2019, 15:05:41
Linki görebilmek için Kayıt olun yada Giriş yapın.  Sen Yardımcı Olsan 2 gündür Yapmaya Calısıyorum  :(
« Son Düzenleme: 20 Şubat 2019, 15:05:41 Gönderen: The|Flora »
 


Çevrimdışı Mahlukat

  • Uzman Üye
  • *
    • İleti: 637
Yanıtla #9 : 20 Şubat 2019, 15:18:27
gui.lua içinde _buildWindow fonksiyonunu ve  fr_client.lua içinde wndMain tablosunu kod olarak atar mısın

Lütfen dosyaları atma kodları at
Linki görebilmek için Kayıt olun yada Giriş yapın.
 


Çevrimdışı The|Flora

  • Yeni Üye
  • *
    • İleti: 53
Yanıtla #10 : 20 Şubat 2019, 15:30:57
Kod
function _buildWindow(wnd, baseWnd, parentWnd)
local wndClass = wnd[1]
if wndClass == 'br' then
return
end

local relX, relY, relWidth, relHeight
if parentWnd then
if wnd.x and wnd.y then
relX = wnd.x/parentWnd.width
relY = wnd.y/parentWnd.height
end
relWidth = wnd.width / parentWnd.width
relHeight = wnd.height / parentWnd.height
end

local elem
if wndClass == 'wnd' then
local screenWidth, screenHeight = guiGetScreenSize()
if not wnd.x then
wnd.x = screenWidth/2 - wnd.width/2
else
local i, f = math.modf(wnd.x)
if f ~= 0 then
wnd.x = screenWidth * wnd.x
end
if wnd.x < 0 then
wnd.x = screenWidth - math.abs(wnd.x) - wnd.width
end
end
if not wnd.y then
wnd.y = screenHeight/2 - wnd.height/2
else
local i, f = math.modf(wnd.y)
if f ~= 0 then
wnd.y = screenHeight * wnd.y
end
if wnd.y < 0 then
wnd.y = screenHeight - math.abs(wnd.y) - wnd.height
end
end
elem = guiCreateWindow(wnd.x, wnd.y, wnd.width, wnd.height, wnd.text, false)
guiWindowSetSizable(elem, false)
guiBringToFront(elem)
g_openedWindows[wnd] = true
elseif wndClass == 'chk' then
elem = guiCreateCheckBox(relX, relY, relWidth, relHeight, wnd.text or wnd.id or '', false, true, parentWnd.element)
elseif wndClass == 'tbp' then
elem = guiCreateTabPanel(relX, relY, relWidth, relHeight, true, parentWnd.element)
elseif wndClass == 'tab' then
elem = guiCreateTab(text, parentWnd.element)
elseif wndClass == 'lst' then
elem = guiCreateGridList(relX, relY, relWidth, relHeight, true, parentWnd.element)
if wnd.columns then
guiGridListSetSortingEnabled(elem, false)
for i, column in ipairs(wnd.columns) do
guiGridListAddColumn(elem, column.text or column.attr or '', column.width or 0.9)
end
end
elseif wndClass == 'img' then
elem = guiCreateStaticImage(relX, relY, relWidth, relHeight, wnd.src or '', true, parentWnd.element)
else
elem = _G['guiCreate' .. classInfo[wndClass].className](relX, relY, relWidth, relHeight, wnd.text or wnd.id or '', true, parentWnd.element)
if wnd.align and wndClass == 'lbl' then
guiLabelSetHorizontalAlign(elem, wnd.align, true)
end
end
wnd.element = elem

if wnd.controls then
for id, controlwnd in pairs(wnd.controls) do
_buildWindow(controlwnd, baseWnd or wnd, wnd)
end
end

if wnd.tabs then
for id, tab in pairs(wnd.tabs) do
_buildWindow(tab, baseWnd, wnd)
end
end

if wnd.rows then
if wnd.rows.xml then
-- get rows from xml
bindGridListToTable(wnd, not gridListHasCache(wnd) and xmlToTable(wnd.rows.xml, wnd.rows.attrs) or false,
wnd.expandlastlevel or wnd.expandlastlevel == nil)
else
-- rows hardcoded in window definition
bindGridListToTable(wnd, not gridListHasCache(wnd) and wnd.rows or false, false)
end
end

local clickhandler = nil
if wnd.onclick then
if wndClass == 'img' then
clickhandler = function(btn, state, x, y)
local imgX, imgY = getControlScreenPos(wnd)
wnd.onclick((x - imgX)/wnd.width, (y - imgY)/wnd.height, btn)
end
else
clickhandler = function() wnd.onclick() end
end
elseif wnd.window then
clickhandler = function() toggleWindow(wnd.window) end
elseif wnd.inputbox then
clickhandler = function()
wndInput = {
'wnd',
width = 170,
height = 60,
controls = {
{'txt', id='input', text='', width=60},
{'btn', id='ok', onclick=function() wnd.inputbox.callback(getControlText(wndInput, 'input')) closeWindow(wndInput) end},
{'btn', id='cancel', closeswindow=true}
}
}
for propname, propval in pairs(wnd.inputbox) do
wndInput[propname] = propval
end
createWindow(wndInput)
guiBringToFront(getControl(wndInput, 'input'))
end
elseif wnd.closeswindow then
clickhandler = function() closeWindow(baseWnd) end
end
if clickhandler then
if wnd.ClickSpamProtected then
g_protectedElements[elem] = clickhandler
addEventHandler('onClientGUIClick', elem, onProtectedClick, false)
else
addEventHandler('onClientGUIClick', elem, clickhandler, false)
end
end
if wnd.ondoubleclick then
local doubleclickhandler
if wndClass == 'img' then
doubleclickhandler = function(btn, state, x, y)
local imgX, imgY = getControlScreenPos(wnd)
wnd.ondoubleclick((x - imgX)/wnd.width, (y - imgY)/wnd.height)
end
else
doubleclickhandler = wnd.ondoubleclick
end
if wnd.DoubleClickSpamProtected then
g_protectedElements[elem] = doubleclickhandler
addEventHandler('onClientGUIDoubleClick', elem, onProtectedClick, false)
else
addEventHandler('onClientGUIDoubleClick', elem, doubleclickhandler, false)
end
end

if wnd.oncreate then
wnd.oncreate()
end
end

Kod
wndMain = {
'wnd',
text = 'Freeroam Panel | F1',
x = 10,
y = 180,
width = 280,
controls = {
{'lbl', id='xpos', text='x', width=0},
{'lbl', id='ypos', text='y', width=0},
{'lbl', id='zpos', text='z', width=0},
{'btn', id='Karakterler', window=wndSkin, width = 260},
{'btn', id='İntihar', onclick=killLocalPlayer, width = 120,x = 10,height  = 20},
{'btn', id='Animasyonlar', window=wndAnim, width = 120,x = 150,height  = 20},
{'btn', id='Temel Eşyalar', window=wndWeapon, width = 120,x = 10,height  = 20},
{'btn', id='CJ Kıyafet', window=wndClothes, width = 120,x = 150,height  = 20},
{'btn', text='Şans Oyunu', onclick=sanspaneli, width = 120,x = 10,height  = 20},
{'btn', id='Işınlan', window=wndWarp, width = 120,x = 150,height  = 20},
{'btn', id='setpos', text='Harita Paneli', window=wndSetPos, width = 260},
{'br'},
{'chk', id='falloff', text='Motordan Düşme', onclick=toggleFallOffBike, x = 10},
{'chk', id='jetpack', text="Jetpack", onclick=toggleJetPack, x = 150},
{'chk', id='disableknife', text='Bıçaklanma', onclick=toggleKnifing, x = 10},
{'chk', id='disablewarp', text='Işınlanma', onclick=toggleWarping, x = 150},
{'chk', id='antiram', text='Araç Hayalet Modu', onclick=toggleGhostmode, x = 10},
{"chk"; id = "Chat Gizle", onclick = chat, x = 150},
{'br'},
{'btn', id='createvehicle', window=wndCreateVehicle, text='Araç Oluştur', width = 260},
{'btn', id='Tamir', onclick=repairVehicle, width = 120,x = 10,height  = 20},
{'btn', id='Çevir', onclick=flipVehicle, width = 120,x = 150,height  = 20},
{'btn', id='Modifiye', window=wndUpgrades, width = 120,x = 10,height  = 20},
{'btn', id='Boya', onclick=openColorPicker, width = 120,x = 150,height  = 20},
{'btn', id='playergrav', text='Kamber Ayarı', window=wndGravity, width = 260},
          {'br'},
{'chk', id='lightson', text='Farı [Aç]', onclick=forceLightsOn, x = 10},
{'chk', id='lightsoff', text='Farı [Kapat]', onclick=forceLightsOff, x = 150}
},
oncreate = mainWndShow,
onclose = mainWndClose
}


Linki görebilmek için Kayıt olun yada Giriş yapın. tm attım
« Son Düzenleme: 20 Şubat 2019, 15:42:47 Gönderen: The|Flora »
 


Çevrimdışı Mahlukat

  • Uzman Üye
  • *
    • İleti: 637
Yanıtla #11 : 20 Şubat 2019, 15:49:12
_buildWindow fonksiyonu;
Kod
function _buildWindow(wnd, baseWnd, parentWnd)
local wndClass = wnd[1]
if wndClass == 'br' then
return
end

local relX, relY, relWidth, relHeight
if parentWnd then
if wnd.x and wnd.y then
relX = wnd.x/parentWnd.width
relY = wnd.y/parentWnd.height
end
relWidth = wnd.width / parentWnd.width
relHeight = wnd.height / parentWnd.height
end

local elem
if wndClass == 'wnd' then
local screenWidth, screenHeight = guiGetScreenSize()
if not wnd.x then
wnd.x = screenWidth/2 - wnd.width/2
else
local i, f = math.modf(wnd.x)
if f ~= 0 then
wnd.x = screenWidth * wnd.x
end
if wnd.x < 0 then
wnd.x = screenWidth - math.abs(wnd.x) - wnd.width
end
end
if not wnd.y then
wnd.y = screenHeight/2 - wnd.height/2
else
local i, f = math.modf(wnd.y)
if f ~= 0 then
wnd.y = screenHeight * wnd.y
end
if wnd.y < 0 then
wnd.y = screenHeight - math.abs(wnd.y) - wnd.height
end
end
elem = guiCreateWindow(wnd.x, wnd.y, wnd.width, wnd.height, wnd.text, false)
guiWindowSetSizable(elem, false)
guiBringToFront(elem)
g_openedWindows[wnd] = true
elseif wndClass == 'chk' then
elem = guiCreateCheckBox(relX, relY, relWidth, relHeight, wnd.text or wnd.id or '', false, true, parentWnd.element)
elseif wndClass == 'tbp' then
elem = guiCreateTabPanel(relX, relY, relWidth, relHeight, true, parentWnd.element)
elseif wndClass == 'tab' then
elem = guiCreateTab(text, parentWnd.element)
elseif wndClass == 'lst' then
elem = guiCreateGridList(relX, relY, relWidth, relHeight, true, parentWnd.element)
if wnd.columns then
guiGridListSetSortingEnabled(elem, false)
for i, column in ipairs(wnd.columns) do
guiGridListAddColumn(elem, column.text or column.attr or '', column.width or 0.9)
end
end
elseif wndClass == 'img' then
elem = guiCreateStaticImage(relX, relY, relWidth, relHeight, wnd.src or '', true, parentWnd.element)
elseif wndClass == 'btn' then
elem = guiCreateButton(relX, relY, relWidth, relHeight, wnd.text or wnd.id or '',true, parentWnd.element,wnd.renk)
else
elem = _G['guiCreate' .. classInfo[wndClass].className](relX, relY, relWidth, relHeight, wnd.text or wnd.id or '', true, parentWnd.element)
if wnd.align and wndClass == 'lbl' then
guiLabelSetHorizontalAlign(elem, wnd.align, true)
end
end
wnd.element = elem

if wnd.controls then
for id, controlwnd in pairs(wnd.controls) do
_buildWindow(controlwnd, baseWnd or wnd, wnd)
end
end

if wnd.tabs then
for id, tab in pairs(wnd.tabs) do
_buildWindow(tab, baseWnd, wnd)
end
end

if wnd.rows then
if wnd.rows.xml then
-- get rows from xml
bindGridListToTable(wnd, not gridListHasCache(wnd) and xmlToTable(wnd.rows.xml, wnd.rows.attrs) or false,
wnd.expandlastlevel or wnd.expandlastlevel == nil)
else
-- rows hardcoded in window definition
bindGridListToTable(wnd, not gridListHasCache(wnd) and wnd.rows or false, false)
end
end

local clickhandler = nil
if wnd.onclick then
if wndClass == 'img' then
clickhandler = function(btn, state, x, y)
local imgX, imgY = getControlScreenPos(wnd)
wnd.onclick((x - imgX)/wnd.width, (y - imgY)/wnd.height, btn)
end
else
clickhandler = function() wnd.onclick() end
end
elseif wnd.window then
clickhandler = function() toggleWindow(wnd.window) end
elseif wnd.inputbox then
clickhandler = function()
wndInput = {
'wnd',
width = 170,
height = 60,
controls = {
{'txt', id='input', text='', width=60},
{'btn', id='ok', onclick=function() wnd.inputbox.callback(getControlText(wndInput, 'input')) closeWindow(wndInput) end},
{'btn', id='cancel', closeswindow=true}
}
}
for propname, propval in pairs(wnd.inputbox) do
wndInput[propname] = propval
end
createWindow(wndInput)
guiBringToFront(getControl(wndInput, 'input'))
end
elseif wnd.closeswindow then
clickhandler = function() closeWindow(baseWnd) end
end
if clickhandler then
if wnd.ClickSpamProtected then
g_protectedElements[elem] = clickhandler
addEventHandler('onClientGUIClick', elem, onProtectedClick, false)
else
addEventHandler('onClientGUIClick', elem, clickhandler, false)
end
end
if wnd.ondoubleclick then
local doubleclickhandler
if wndClass == 'img' then
doubleclickhandler = function(btn, state, x, y)
local imgX, imgY = getControlScreenPos(wnd)
wnd.ondoubleclick((x - imgX)/wnd.width, (y - imgY)/wnd.height)
end
else
doubleclickhandler = wnd.ondoubleclick
end
if wnd.DoubleClickSpamProtected then
g_protectedElements[elem] = doubleclickhandler
addEventHandler('onClientGUIDoubleClick', elem, onProtectedClick, false)
else
addEventHandler('onClientGUIDoubleClick', elem, doubleclickhandler, false)
end
end

if wnd.oncreate then
wnd.oncreate()
end
end
renkli yapmak istediğin buton;
Kod
{'btn', id='createvehicle', window=wndCreateVehicle, text='Araç Oluştur', width = 260,renk="CC0000"},
Linki görebilmek için Kayıt olun yada Giriş yapın.
 


Çevrimdışı The|Flora

  • Yeni Üye
  • *
    • İleti: 53
Yanıtla #12 : 20 Şubat 2019, 15:57:05
Linki görebilmek için Kayıt olun yada Giriş yapın. Ben Butonun Rengini Degil  Yazının Rengini Degiştirmek İstemiştim  :(  :(  :(
 


Çevrimdışı Mahlukat

  • Uzman Üye
  • *
    • İleti: 637
Yanıtla #13 : 20 Şubat 2019, 16:01:28
;(( o zaman mainWndShow fonksionuna şu kodu girmen yeterli olucaktır;
Kod
guiLabelSetColor(getControl(wndMain,"createvehicle"),255,0,0)
Linki görebilmek için Kayıt olun yada Giriş yapın.
 


Çevrimdışı The|Flora

  • Yeni Üye
  • *
    • İleti: 53
Yanıtla #14 : 20 Şubat 2019, 16:04:17
Linki görebilmek için Kayıt olun yada Giriş yapın.
;(( o zaman mainWndShow fonksionuna şu kodu girmen yeterli olucaktır;
Kod
guiLabelSetColor(getControl(wndMain,"createvehicle"),255,0,0)
yenı eklediklerimi eski haline cevireyimmi