Wysłany: 2018-05-03, 17:50
Xrent
-
Wiek: 21 Na forum: 3047 dni Posty: 230
Nick w MP: Pazdam
Piwa : 535
Siema od pewnego czasu korzystam z dgs i mia?em taki sam problem jak korzystalem z normalnego gui mta wtedy korzysta?em z onClicka i wystarczy?o doda?
Kod: do ifa isMouseInPosition i w funkcji (button, state) ale teraz nie wiem jak zrobi? takie co? z dgs
o to kodzik
addEventHandler ( "onDgsMouseClick" , root , function()
if source == login . loginButton then
local login , pass = DGS : dgsGetText ( login . loginEdit ), DGS : dgsGetText ( login . passEdit )
if string . len ( login ) < 2 or string . find ( login , " " ) or string . len ( pass ) < 2 or string . find ( pass , " " ) then outputChatBox ( "Posiadasz nie dozwolone znaki albo nie wype?ni?e?(/a?) wszystkich p?l." ) return end
triggerServerEvent ( "registerAccount" , localPlayer , login , pass )
elseif source == login . registerButton then
local login , pass = DGS : dgsGetText ( login . loginEdit ), DGS : dgsGetText ( login . passEdit )
if string . len ( login ) < 2 or string . find ( login , " " ) or string . len ( pass ) < 2 or string . find ( pass , " " ) then outputChatBox ( "Posiadasz nie dozwolone znaki albo nie wype?ni?e?(/a?) wszystkich p?l." ) return end
triggerServerEvent ( "checkAccount" , localPlayer , login , pass )
elseif source == login . selectSpawn1 then
showCursor ( false )
showChat ( true )
local selected = 1
triggerServerEvent ( "onAnPlayerSelectedSpawn" , localPlayer , selected , pos )
DGS : dgsSetVisible ( login . selectWindow , false )
end
end )
Wysłany: 2018-05-03, 18:50
TeeNekk
Cienzaruwka :v
Wiek: 23 Na forum: 3210 dni Posty: 264
Nick w MP: TeeNekk.
Piwa : 919
Przecie? ta funkcja ma w parametrach button, oraz state.
Cytat: Parameters
string button, string state, int absoluteX, int absoluteY
button: the name of the button which will be clicked , it can be left, right, middle
state: the state of the mouse button, will be down if the mouse button was pushed, or up if it was released. Please note currently both up and down state are supported, which is different from onClientGUIClick.
absoluteX: the X position of the mouse cursor, in pixels, measured from the left side of the screen.
absoluteY: the Y position of the mouse cursor, in pixels, measured from the top of the screen.
Podpis
Pomogłem Ci
[you]
? Może zostawiłbyś za to piwko, lub respekt? Dzięki!
Mój projekt:
?
Wysłany: 2018-05-04, 12:45
Xrent
-
Wiek: 21 Na forum: 3047 dni Posty: 230
Nick w MP: Pazdam
Piwa : 535
"TeeNekk" napisał/a :Przecie? ta funkcja ma w parametrach button, oraz state.
Cytat: Parameters
string button, string state, int absoluteX, int absoluteY
button: the name of the button which will be clicked , it can be left, right, middle
state: the state of the mouse button, will be down if the mouse button was pushed, or up if it was released. Please note currently both up and down state are supported, which is different from onClientGUIClick.
absoluteX: the X position of the mouse cursor, in pixels, measured from the left side of the screen.
absoluteY: the Y position of the mouse cursor, in pixels, measured from the top of the screen.
No tak m?j b??d, a jak to u?y? na dgs?
Wysłany: 2018-05-04, 13:15
TeeNekk
Cienzaruwka :v
Wiek: 23 Na forum: 3210 dni Posty: 264
Nick w MP: TeeNekk.
Piwa : 919
tak samo jak w GUI.
addEventHandler ( "onDgsMouseClick" , root , function( button , state )
if button == "klawisz" and state == "state" then
zmie? klawisz oraz state na swoje.
Podpis
Pomogłem Ci
[you]
? Może zostawiłbyś za to piwko, lub respekt? Dzięki!
Mój projekt:
?
Więcej szczegółów
Wystawiono 1 piw(a):Xrent
Wysłany: 2018-05-04, 15:01
Xrent
-
Wiek: 21 Na forum: 3047 dni Posty: 230
Nick w MP: Pazdam
Piwa : 535
"TeeNekk" napisał/a :tak samo jak w GUI.
addEventHandler ( "onDgsMouseClick" , root , function( button , state )
if button == "klawisz" and state == "state" then
zmie? klawisz oraz state na swoje.
Dzia?a ale troszke inaczej zrobi?em
addEventHandler ( "onDgsMouseClick" , root , function( button , state )
if source == login . loginButton and state == 'up' then
I masz piwko thx
Tagi: onclick :: dgs :: text :: chatbox
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: