-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathluaclicker.lua
80 lines (70 loc) · 2.55 KB
/
luaclicker.lua
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
surface.CreateFont("Font", {
font = "Arial",
extended = true,
size = 50,
weight = 900,
})
local MANIFEST = {
id = "vee.clicker_test",
author = "Vee/VCSoldier",
name = "Clicker Test",
description = "Click The Button",
version = "1.0",
}
menup(MANIFEST)
include("vgui/DHorizontalDivider.lua") -- I FUCKING HATE YOU RUBAT, WHY ISNT THIS CALLED, YOU DUMB MOTHERFUCKER, YOU MAKE DPROGRESSBAR GET CALLED BUT NOT SOMETHING USEFUL LIKE THIS, EAT MY NUTS
local function popup()
local Color_BG = Color( 37, 44, 54, 255 )
local Color_Button = Color( 53, 59, 72, 255 )
local Color_Div = Color( 30, 40, 50, 255 )
local DermaFrame = vgui.Create( "DFrame" )
DermaFrame:SetTitle("LuaClicker!")
DermaFrame:SetSize( 600, 600 )
DermaFrame:Center()
DermaFrame:MakePopup()
DermaFrame.Count = 1
DermaFrame.Paint = function( self, w, h )
draw.RoundedBox( 0, 0, 0, w, h, Color_BG )
end
local DermaPanelLeft = vgui.Create( "DPanel", DermaFrame )
DermaPanelLeft.Paint = function( self, w, h )
draw.RoundedBox( 0, 0, 0, w, h, Color_BG )
end
local DermaPanelRight = vgui.Create( "DPanel", DermaFrame )
DermaPanelRight.Paint = function( self, w, h )
draw.RoundedBox( 0, 0, 0, w, h, Color_BG )
end
local DermaDiv = vgui.Create( "DHorizontalDivider", DermaFrame )
DermaDiv:Dock( FILL )
DermaDiv:SetLeft( DermaPanelLeft )
DermaDiv:SetRight( DermaPanelRight )
DermaDiv:SetRightMin( 200 )
DermaDiv:SetDividerWidth( 4 ) -- Set the divider width. Default is 8
DermaDiv:SetLeftMin( 400 ) -- Set the Minimum width of left side
DermaDiv:SetLeftWidth( 400 )
DermaDiv.Paint = function( self, w, h )
draw.RoundedBox( 5, 5, 5, w, h, Color_Div )
end
local DermaButton = vgui.Create( "DButton", DermaPanelLeft )
DermaButton:SetText( "Click" )
DermaButton:CenterHorizontal()
DermaButton:SetPos( 170 ,320 )
DermaButton:SetSize( 60, 60 )
DermaButton.Paint = function( self, w, h )
draw.RoundedBox( 0, 0, 0, w, h, Color_Button ) -- Draw a blue button
end
local DermaLabel = vgui.Create( "DLabel", DermaPanelLeft )
DermaLabel:SetText(tostring(DermaFrame.Count))
DermaLabel:SetFont( "Font" )
DermaButton.DoClick = function()
DermaFrame.Count = DermaFrame.Count + DermaFrame.Count
DermaLabel:SetText(tostring(DermaFrame.Count))
DermaLabel:SizeToContents()
DermaLabel:CenterHorizontal()
DermaLabel:CenterVertical()
end
end
menup.drawer.add(MANIFEST.id, "Clicker Test", popup, "icon16/cursor.png")
return function()
menup.drawer.del(MANIFEST.id)
end