English VisualLua [v1.3] icon

119 comments
16.05.11 08:21:49 pm
like 59 like it!
7 kb, 1,018 Downloads
EngiN33R
Moderator
Offline Off
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:
More >


Examples of usage:
More >


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.
imageimageimage
edited 6×, last 10.03.15 02:48:50 pm
ok This file has been reviewed and approved by Starkkz (29.11.15 02:44:45 pm)

Comments

119 comments
Goto Page
To the start Previous 1 2 3 4 5 6 Next To the start

Log in!

You need to log in to be able to write comments!Log in
11.05.16 07:36:13 am
Up
juanpronoobs
User
Offline Off
furty
10.05.16 11:41:58 pm
Up
-K
User
Offline Off
something error when combine it with Serveraction
Code:
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
06.05.16 02:05:42 pm
like I like it!
Up
ChasPeR
BANNED
Offline Off
WOW its COOL im love this , i love robots too i love all robots and look like robots
i like it
10.11.14 12:23:09 am
like I like it!
Up
Waldin
User
Offline Off
new menus? omg this is amazing
edited 2×, last 26.05.16 07:36:29 pm
14.10.14 07:02:24 pm
like I like it!
Up
ajm-sh
User
Offline Off
WoW.
extremely great.
13.10.14 08:36:45 pm
like I like it!
Up
VocaloidLily
User
Offline Off
lau ahahahahahahahahahahahahahahahahahahahah
08.09.13 07:47:08 am
like I like it!
Up
ImTihh
User
Offline Off
Engin33R you're amazing man!!
21.08.13 06:25:56 pm
like I like it!
Up
Avo
User
Offline Off
@user Gajos: We've got a badass here. Go, learn Engin33r how he should script.

---

Edit (after user Gajos's edit):
Quote:
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.

More >
edited 1×, last 23.08.13 11:08:36 pm
21.08.13 04:25:40 pm
like I like it!
Up
Gajos
BANNED
Offline Off
Do you know why your visual lua lagging?
Code:
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.
edited 4×, last 23.08.13 11:18:03 pm
01.11.12 08:18:46 pm
like I like it!
Up
G3tWr3ck3d
User
Offline Off
The script is awesome, I appreciate engy for his scripts
and @Lubo you suck ! No offence
01.11.12 06:28:09 pm
like I like it!
Up
Sneaky
User
Offline Off
Happy Halloween! xDDD
30.10.12 06:27:35 pm
Up
EngiN33R
Moderator
Offline Off
@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.
29.10.12 06:24:05 pm
Up
Noname12345 -GER-
User
Offline Off
is there an usgn authorization?
how to put commands and names on the button?
thats too complex
28.08.12 05:18:17 am
like I like it!
Up
Divine
User
Offline Off
Lol i love the box
24.08.12 09:25:20 pm
like I like it!
Up
Suprise
BANNED
Offline Off
Cool script
24.08.12 09:23:33 pm
like I like it!
Up
EndDead
User
Offline Off
Awes0me!
Thanks for it, gonna learn some new things in lua by it
24.08.12 07:21:14 pm
Up
Viper97
User
Offline Off
how to use visual lua?
I would even add these Welcome, but do not know how to do it ;/
22.07.12 11:55:41 am
Up
Lubo
User
Offline Off
OMG I said LAU!
No way!
Now I have to cry that i am not a nerd.
I don't give a shit
21.07.12 08:24:37 pm
like I like it!
Up
Jela331
User
Offline Off
Lubo has written:
lau


Epic shit.
21.07.12 08:12:14 pm
Up
Lubo
User
Offline Off
well I don't know what is your proble...
puberty?
To the start Previous 1 2 3 4 5 6 Next To the start