Szerző Téma: Dx  (Megtekintve 1227 alkalommal)

Dx
« Dátum: 2016. Augusztus 07. - 11:14:01 »
0 Show voters
Mivel én GUI-t használtam, de az már elavult, ezért áttértem Dx-re, de gombot hogy tudok létrehozni :question:
Köszönöm a válaszokat!

Nem elérhető Eduka

  • 214
    • Profil megtekintése
Dx
« Válasz #1 Dátum: 2016. Augusztus 07. - 11:22:22 »
0 Show voters
function dobozbaVan(dX, dY, dSZ, dM, eX, eY)
    if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
        return true
    else
        return false
    end
end
 
addEventHandler(\"onClientClick\", getRootElement(), function(gomb, statusz, absX, absY)
if statusz == \"down\" and gomb == \"left\" then
if dobozbaVan(x,y, w,h, absX, absY) then
                       outputChatBox(\"Itt egy gomb van\")
       end
end
end

Dx
« Válasz #2 Dátum: 2016. Augusztus 07. - 11:41:58 »
0 Show voters
dX, dY dSZ, dM, eX eY, absX, absY mit jelől?

Nem elérhető Eduka

  • 214
    • Profil megtekintése
Dx
« Válasz #3 Dátum: 2016. Augusztus 07. - 12:22:25 »
0 Show voters
X, Y, W, H, CursorX, CursorY

Dx
« Válasz #4 Dátum: 2016. Augusztus 07. - 12:30:53 »
0 Show voters
Köszi!

Dupla hozzászólás automatikusan összefûzve. ( [time]2016. augusztus 07. 14:15:35[/time] )

Írok egy példát:
 dxDrawRectangle(488, 302, 3, 0, tocolor(255, 255, 255, 255), false) 

 Ebből melyik rész a pozició?
« Utoljára szerkesztve: 2016. Augusztus 07. - 15:56:01 írta thegergo02 »

Nem elérhető Eduka

  • 214
    • Profil megtekintése
Dx
« Válasz #5 Dátum: 2016. Augusztus 07. - 15:59:14 »
0 Show voters
 dxDrawRectangle(X, Y, W, H, tocolor(255, 255, 255, 255), false) 

 
Amúgy a guiEditorban van egy lehetőség h relatívra rakd a felbontást, így mindenkinek ugyan ott lesz.:)

Dx
« Válasz #6 Dátum: 2016. Augusztus 07. - 16:31:26 »
0 Show voters
Oké köszi

Dupla hozzászólás automatikusan összefûzve. ( 2016. Augusztus 07. - 20:20:37 )

Nem tudom hogy most egyszerűen én vagyok rohadt béna, de nem értem. Kérlek, egy darab panel írj meg, majd abból a többit összedobom! Nagyon megköszönném!
Kód:
 local pagestate = 1
addEventHandler(\"onClientRender\", root,
    function home ()
showCursor(true)
        dxDrawText(\"\", 491, 255, 491, 255, tocolor(255, 255, 255, 255), 1.00, \"default\", \"left\", \"top\", false, false, false, false, false)
        dxDrawRectangle(488, 302, 3, 0, tocolor(255, 255, 255, 255), false)
        dxDrawLine(511 - 1, 174 - 1, 511 - 1, 959, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(1384, 174 - 1, 511 - 1, 174 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(511 - 1, 959, 1384, 959, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(1384, 959, 1384, 174 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawRectangle(511, 174, 873, 785, tocolor(18, 20, 21, 255), false)
        dxDrawLine(511 - 1, 174 - 1, 511 - 1, 277, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(802, 174 - 1, 511 - 1, 174 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(511 - 1, 277, 802, 277, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(802, 277, 802, 174 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawRectangle(511, 174, 291, 103, tocolor(70, 108, 193, 255), false)
        dxDrawLine(802 - 1, 174 - 1, 802 - 1, 277, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(1093, 174 - 1, 802 - 1, 174 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(802 - 1, 277, 1093, 277, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(1093, 277, 1093, 174 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawRectangle(802, 174, 291, 103, tocolor(255, 255, 255, 255), false)
        dxDrawLine(1093 - 1, 174 - 1, 1093 - 1, 277, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(1384, 174 - 1, 1093 - 1, 174 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(1093 - 1, 277, 1384, 277, tocolor(0, 0, 0, 255), 1, false)
        dxDrawLine(1384, 277, 1384, 174 - 1, tocolor(0, 0, 0, 255), 1, false)
        dxDrawRectangle(1093, 174, 291, 103, tocolor(70, 108, 193, 255), false)
        dxDrawText(\"Karakter Információk\", 534 - 1, 216 - 1, 782 - 1, 236 - 1, tocolor(0, 0, 0, 255), 0.70, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Karakter Információk\", 534 + 1, 216 - 1, 782 + 1, 236 - 1, tocolor(0, 0, 0, 255), 0.70, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Karakter Információk\", 534 - 1, 216 + 1, 782 - 1, 236 + 1, tocolor(0, 0, 0, 255), 0.70, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Karakter Információk\", 534 + 1, 216 + 1, 782 + 1, 236 + 1, tocolor(0, 0, 0, 255), 0.70, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Karakter Információk\", 534, 216, 782, 236, tocolor(255, 255, 255, 255), 0.70, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Frakció\", 902 - 1, 216 - 1, 986 - 1, 233 - 1, tocolor(0, 0, 0, 255), 0.70, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Frakció\", 902 + 1, 216 - 1, 986 + 1, 233 - 1, tocolor(0, 0, 0, 255), 0.70, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Frakció\", 902 - 1, 216 + 1, 986 - 1, 233 + 1, tocolor(0, 0, 0, 255), 0.70, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Frakció\", 902 + 1, 216 + 1, 986 + 1, 233 + 1, tocolor(0, 0, 0, 255), 0.70, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Frakció\", 902, 216, 986, 233, tocolor(70, 108, 193, 255), 0.70, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Tulajdonok\", 1176 - 1, 216 - 1, 1424 - 1, 236 - 1, tocolor(0, 0, 0, 255), 0.70, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Tulajdonok\", 1176 + 1, 216 - 1, 1424 + 1, 236 - 1, tocolor(0, 0, 0, 255), 0.70, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Tulajdonok\", 1176 - 1, 216 + 1, 1424 - 1, 236 + 1, tocolor(0, 0, 0, 255), 0.70, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Tulajdonok\", 1176 + 1, 216 + 1, 1424 + 1, 236 + 1, tocolor(0, 0, 0, 255), 0.70, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
        dxDrawText(\"Tulajdonok\", 1176, 216, 1424, 236, tocolor(255, 255, 255, 255), 0.70, \"bankgothic\", \"left\", \"top\", false, false, false, false, false)
    end
)
    function pagestatechanger1 ()
        pagestate = 1
    end
    function pagestatechanger2 ()
        pagestate = 2
    end
    function pagestatechanger3 ()
        pagestate = 3
    end
    function pagechanger ()
        if pagestate == 1 then -- inf.
        elseif pagestate == 2 then -- frak.
        elseif pagestate == 3 then -- ingat.
end
end
 
    function dobozbaVan(dX, dY, dSZ, dM, eX, eY)
        if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
            return true
        else
            return false
        end
    end
     
     
    addEventHandler(\"onClientClick\", getRootElement(), function(gomb, statusz, absX, absY)
            if statusz == \"down\" and gomb == \"left\" then
                    if dobozbaVan(488,302, 3,0, absX, absY) then
                           pagestate = 1
               outputChatBox(\"#00007f[bL] #ffffffKarakter Információs panel\" true )
                   end
            end
    end
 

 Tényleg, nagyon kérlek csinálj meg egy darab panelt! (UI: Ha megcsinálnád, akkor a Karakter Információs panel-t. Elöre is köszönöm.)
« Utoljára szerkesztve: 2016. Augusztus 07. - 20:20:37 írta thegergo02 »

Nem elérhető Eduka

  • 214
    • Profil megtekintése
Dx
« Válasz #7 Dátum: 2016. Augusztus 07. - 20:40:15 »
0 Show voters
Holnap írj nekem egy privát üzenetet és megírom neked!:)

Dx
« Válasz #8 Dátum: 2016. Augusztus 07. - 21:17:53 »
0 Show voters
Oké

Nem elérhető Eduka

  • 214
    • Profil megtekintése
Dx
« Válasz #9 Dátum: 2016. Augusztus 08. - 09:19:24 »
0 Show voters
local screenW, screenH = guiGetScreenSize()
local lap = \"info\"
addEventHandler(\"onClientRender\", root,
    function()
        dxDrawRectangle(screenW * 0.2656, screenH * 0.1602, screenW * 0.4568, screenH * 0.7315, tocolor(4, 4, 4, 120), true)
        dxDrawRectangle(screenW * 0.2651, screenH * 0.1611, screenW * 0.4573, screenH * 0.0954, tocolor(4, 4, 4, 189), true)
        dxDrawText(\"Karakter Információk\", screenW * 0.2656, screenH * 0.1602, screenW * 0.4172, screenH * 0.2565, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"Frakciók\", screenW * 0.4167, screenH * 0.1602, screenW * 0.5682, screenH * 0.2565, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"center\", \"center\", false, false, true, false, false)
        dxDrawText(\"Tulajdonok\", screenW * 0.5682, screenH * 0.1611, screenW * 0.7198, screenH * 0.2574, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"center\", \"center\", false, false, true, false, false)
    if lap == \"info\" then
        dxDrawText(\"Karakter Információk #2\", screenW * 0.4167, screenH * 0.3259, screenW * 0.5682, screenH * 0.4222, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"center\", \"center\", false, false, true, false, false)
    elseif lap == \"frakciok\" then
        dxDrawText(\"Frakciók #2\", screenW * 0.4167, screenH * 0.4222, screenW * 0.5682, screenH * 0.5185, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"center\", \"center\", false, false, true, false, false)
      elseif lap == \"tulajdonok\" then
        dxDrawText(\"Tulajdonok #2\", screenW * 0.4167, screenH * 0.5185, screenW * 0.5682, screenH * 0.6148, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"center\", \"center\", false, false, true, false, false)
    end
end
)
 
function dobozbaVan(dX, dY, dSZ, dM, eX, eY)
    if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
        return true
    else
        return false
    end
end
addEventHandler(\"onClientClick\", getRootElement(), function(gomb, allapot, absX, absY)
    if allapot == \"down\" and gomb == \"left\" then
       if dobozbaVan(screenW * 0.2646, screenH * 0.1602, screenW * 0.1604, screenH * 0.0963, absX, absY) and lap ~= \"info\" then -- karakter információk gomb
          lap = \"info\"
       elseif dobozbaVan(screenW * 0.4250, screenH * 0.1602, screenW * 0.1417, screenH * 0.0963, absX, absY) and lap ~= \"frakciok\" then -- frakciók információk gomb
          lap = \"frakciok\"
       elseif dobozbaVan(screenW * 0.5667, screenH * 0.1602, screenW * 0.1557, screenH * 0.0963, absX, absY) and lap ~= \"tulajdonok\" then -- tulajdonok információk gomb
          lap = \"tulajdonok\"
       end
    end
end
)

Dx
« Válasz #10 Dátum: 2016. Augusztus 08. - 09:27:31 »
0 Show voters
Köszönöm szépen! Nagyon sokat segítet!

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal