Dateien

> > CS2D > Lua Scripts > VisualLua [v1.3]
DateiübersichtCS2D-ÜbersichtLua Scripts-Übersicht

Englisch VisualLua [v1.3] >

119 Kommentare7 kb, 1.473 Downloads

alt VisualLua [v1.3]

EngiN33R
Moderator Off Offline

Some of you have probably noticed that CS2D has few UI functions. It's not enough for me, so I decided to make UI functions myself. And therefore, behold - the VisualLua mod!

Sorry everyone, the window creating function was absent in the uploaded version! Thanks to user tom282f3 for pointing that out. Updated now.

Features:
√ Create UI elements - windows, buttons, text
√ Customize them any way you want - style sheet tables
√ Hover and click states for buttons
√ Assign ANY Lua functions to buttons - they will be executed on button click

Documentation about style sheet tables is INSIDE the archive in a txt file. Read it if you want to add your own styles.

Comments about usage of functions and their arguments are in the script before every function.

Write anything that's not clear to you in the comments - I'll gladly explain.

Video preview: http://www.youtube.com/watch?v=WKPjjVrtNog

Style tables documentation:
Mehr >


Examples of usage:
Mehr >


EDIT 1: If box versions of this are ever to be released, then they'll probably look like the third image

Download, rate and comment, but most importantly - have fun.
6× editiert, zuletzt 10.03.15 14:48:50
Zugelassen von Starkkz

Download Download

7 kb, 1.473 Downloads

Kommentare

119 Kommentare
Seite
Zum Anfang Vorherige 1 2 3 4 5 6 Nächste Zum Anfang

Logge dich ein!

Du musst dich einloggen, um selber Kommentare verfassen zu können!Einloggen

alt

Rygna
User Off Offline

something error when combine it with Serveraction
1
2
3
4
5
6
7
8
9
10
11
12
13
LUA ERROR: sys/lua/vl.lua:260: attempt to concatenate local 'b' (a nil value)
 -> sys/lua/vl.lua:260: in function 'colorcode'
 -> sys/lua/vl.lua:239: in function 'createButton'
 -> sys/lua/1.lua:8: in function <sys/lua/1.lua:3>
 -> in Lua hook 'serveraction', params: 1, 3
1
1

LUA ERROR: sys/lua/vl.lua:260: attempt to concatenate local 'b' (a nil value)
 -> sys/lua/vl.lua:260: in function 'colorcode'
 -> sys/lua/vl.lua:239: in function 'createButton'
 -> sys/lua/1.lua:8: in function <sys/lua/1.lua:3>
 -> in Lua hook 'serveraction', params: 1, 3

alt

ChasPeR
BANNED Off Offline

WOW its COOL im love this , i love robots too i love all robots and look like robots
i like it
Ich mag es!

alt

Waldin
User Off Offline

new menus? omg this is amazing
Ich mag es!
2× editiert, zuletzt 26.05.16 19:36:29

alt

Ajmin
User Off Offline

WoW.
extremely great.
Ich mag es!

alt

ImTihh
User Off Offline

Engin33R you're amazing man!!
Ich mag es!

alt

Avo
User Off Offline

@user Gajos: We've got a badass here. Go, learn Engin33r how he should script.

---

Edit (after user Gajos's edit):
Zitat
10 kB * 11 vars = 110 kb + 1,7 kB * 3 = 15,1 kB
110 kb or 11kB? Something is wrong here.

And I really think that your Internet connection speed is 7,2Mb/s, not 7,2MB/s.

Mehr >
Ich mag es!
1× editiert, zuletzt 23.08.13 23:08:36

alt

Gajos
BANNED Off Offline

Do you know why your visual lua lagging?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
addhook("clientdata","vl.read")
function vl.read(ply,type,a1,a2)
	if type==0 then
		for buttons=1,1024 do
			if (not player(ply,"bot")) then
				if (a1>=vl.buttonpos[buttons][1]-vl.buttonsize[buttons][1]/2 and a1<=vl.buttonpos[buttons][1]+vl.buttonsize[buttons][1]/2 and a2>=vl.buttonpos[buttons][2]-vl.buttonsize[buttons][2]/2 and a2<=vl.buttonpos[buttons][2]+vl.buttonsize[buttons][2]/2) then
					--if (vl.buttonply[buttons]==ply) then
						vl.hoverButton(buttons,ply)
					--end
				else
					--if (vl.buttonply[buttons]==ply) then
						vl.dehoverButton(buttons,ply)
					--end
				end
			end
		end
	end
end


addhook("ms100","vl.send")
function vl.send()
	for ply=1,32 do
		if (player(ply,"exists")) then
			reqcld(ply,0)
		end
	end
end

1024B = 1kB
so
If ten people use this then
10 * 1kB = 10kB

10 kB * 11 vars = 110 kb + 1,7 kB * 3 = 150,1 kB

My internet is 7,2MB / sec
idk why this lagging.
Ich mag es!
4× editiert, zuletzt 23.08.13 23:18:03

alt

G3tWr3ck3d
User Off Offline

The script is awesome, I appreciate engy for his scripts
and @Lubo you suck ! No offence
Ich mag es!

alt

Sneaky
BANNED Off Offline

Happy Halloween! xDDD
Ich mag es!

alt

EngiN33R
Moderator Off Offline

@user Noname12345 -GER-: What sort of USGN authorisation are you talking about? This is an interface library.

You can see the examples to get an answer to your other question.

alt

Noname12345 -GER-
User Off Offline

is there an usgn authorization?
how to put commands and names on the button?
thats too complex

alt

Divine
User Off Offline

Lol i love the box
Ich mag es!

alt

Suprise
BANNED Off Offline

Cool script
Ich mag es!

alt

EndDead
User Off Offline

Awes0me!
Thanks for it, gonna learn some new things in lua by it
Ich mag es!

alt

Viper97
User Off Offline

how to use visual lua?
I would even add these Welcome, but do not know how to do it ;/

alt

Lubo
User Off Offline

OMG I said LAU!
No way!
Now I have to cry that i am not a nerd.
I don't give a shit

alt

Jela331
User Off Offline

Lubo hat geschrieben
lau


Epic shit.
Ich mag es!

alt

Lubo
User Off Offline

well I don't know what is your proble...
puberty?
Zum Anfang Vorherige 1 2 3 4 5 6 Nächste Zum Anfang