Wysłany: 2020-04-16, 15:21
ADISEQ
Uczeń Lua
Wiek: 21 Na forum: 2812 dni Posty: 130
Nick w MP: ADISEQ
Piwa : 18
Siema. Chc? zrobi? w gui prostok?t z zaokr?glonymi rogami. Wie kto? jak to zrobi?
czy trzeba grafik??
Wysłany: 2020-04-16, 15:26
_jvneczek
Wiek: 22 Na forum: 4326 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
Prosz?.
function roundedRectangle ( x , y , w , h , borderColor , bgColor , postGUI )
if ( x and y and w and h ) then
if ( not borderColor ) then
borderColor = tocolor ( 0 , 0 , 0 , 200 );
end
if ( not bgColor ) then
bgColor = borderColor ;
end
dxDrawRectangle ( x , y , w , h , bgColor , postGUI );
dxDrawRectangle ( x + 2 , y - 1 , w - 4 , 1 , borderColor , postGUI );
dxDrawRectangle ( x + 2 , y + h , w - 4 , 1 , borderColor , postGUI );
dxDrawRectangle ( x - 1 , y + 2 , 1 , h - 4 , borderColor , postGUI );
dxDrawRectangle ( x + w , y + 2 , 1 , h - 4 , borderColor , postGUI );
end
end
Wystarczy zamiast dxDrawRectangle da? roundedRectangle i ci stworzy prostok?t z zaokr?glonymi rogami.
Wysłany: 2020-04-16, 15:43
ADISEQ
Uczeń Lua
Wiek: 21 Na forum: 2812 dni Posty: 130
Nick w MP: ADISEQ
Piwa : 18
"SataN." napisał/a :Prosz?.
function roundedRectangle ( x , y , w , h , borderColor , bgColor , postGUI )
if ( x and y and w and h ) then
if ( not borderColor ) then
borderColor = tocolor ( 0 , 0 , 0 , 200 );
end
if ( not bgColor ) then
bgColor = borderColor ;
end
dxDrawRectangle ( x , y , w , h , bgColor , postGUI );
dxDrawRectangle ( x + 2 , y - 1 , w - 4 , 1 , borderColor , postGUI );
dxDrawRectangle ( x + 2 , y + h , w - 4 , 1 , borderColor , postGUI );
dxDrawRectangle ( x - 1 , y + 2 , 1 , h - 4 , borderColor , postGUI );
dxDrawRectangle ( x + w , y + 2 , 1 , h - 4 , borderColor , postGUI );
end
end
Wystarczy zamiast dxDrawRectangle da? roundedRectangle i ci stworzy prostok?t z zaokr?glonymi rogami.
czyli zamiast
dxDrawRectangle ( 515 , 300 , 797 , 286 , tocolor ( 0 , 0 , 0 , 255 ), false )
Mam zrobi? dxRoundedRectangle ( 515 , 300 , 797 , 286 , tocolor ( 0 , 0 , 0 , 255 ), false ) tak?
[ Dodano : 2020-04-16, 15:56 ]
A dobra ju? rozumiem a da si? zrobi? bardziej zaokr?glone te rogi?
[ Dodano : 2020-04-17, 12:25 ]
Kto? co???
Tagi: gui
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: