aboutsummaryrefslogtreecommitdiff
path: root/var.lua
blob: ae9399e9a4ea42ac70a57c7bef15fb0cf6b4a922 (plain)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
function loadWin(id, w, h, title, ico, ico16)
  win[id] = {}
  win[id].x = math.random(10, 200)
  win[id].y = math.random(10, 200)
  win[id].w = w
  win[id].h = h
  win[id].px = win[id].x
  win[id].py = win[id].y
  win[id].ex = true
  win[id].cvs = love.graphics.newCanvas(win[id].w, win[id].h)
  win[id].fd = false
  win[id].s = 0
  win[id].min = false
  win[id].miny = 0
  win[id].title = title
  win[id].layer = 0
  win[id].panel = 0
  win[id].oldlayer = 0
  win[id].hov = false
  win[id].hover = false
  win[id].update = true
  win[id].icon32 = ico
  win[id].icon16 = ico16
  win[id].exit = true
  win[id].bar = "grey"
  win[id].pan = 0
end
function loadIcon(id, x, y)
  icon[id] = {}
  icon[id].x = x
  icon[id].y = y
  icon[id].ico = win[id].icon32
  icon[id].layer = id
  icon[id].hl = false
  icon[id].cl = false
end
function loadVar()
  sys = {}
  sys.width = love.graphics.getWidth()
  sys.height = love.graphics.getHeight()
  sys.mouse = {}
  sys.mouse.p = {}
  sys.mouse.x = love.mouse.getX
  sys.mouse.y = love.mouse.getY
  sys.mouse.p.x = 0
  sys.mouse.p.y = 0
  sys.mouse.p.p = false
  sys.mouse.drag = false
  sys.w = love.graphics.getWidth()
  sys.h = love.graphics.getHeight()
  panel = {}
  panel.thick = 30
  panel.x = 0
  panel.y = 600-panel.thick
  panel.width = sys.width
  panel.height = panel.thick
  panel.s = {}
  panel.s.x = panel.x + 5
  panel.s.y = panel.y + 5
  panel.s.width = 65
  panel.s.height = 20
  panel.s.activate = false
  panel.s.dis = 185
  panel.b = {}
  test = false
  win = {}
  loadWin(1, 250, 400, "Chat", icons[32].chat, icons[16].chat)
  loadWin(2, 650, 550, "Internet", icons[32].internet, icons[16].internet)
  loadWin(3, 450, 400, "Files", icons[32].files, icons[16].files)
  loadWin(4, 200, 150, "Antivirus", icons[32].antivirus, icons[16].antivirus)
  loadWin(5, 450, 400, "Help", icons[32].help, icons[16].help)
  loadWin(6, 400, 550, "Settings", icons[32].settings, icons[16].settings)
  icon = {}
  for i=1,6 do
    loadIcon(i, 10, 10+(90*i-90))
  end
  winOpen = true
  winHover = false
  minim = love.graphics.getHeight()+10
  start = {}
  start.cvs = love.graphics.newCanvas(250, 350)
  start.o = false
  start.p = false
  start.x = 0
  start.y = 600-30-350+2
  layer = {}
  layer.sentToFront = 0
  desktop.bg.current = 0
  fade = 0
  fadeOpacity = 0
  scene = 1
  loading = 0
  antivirus = {}
  antivirus.prog = 0
  antivirus.status = "Not Scanning"
  antivirus.scanning = false
  chat.status = 0
  chat.profilename = "Best Friend"
  colors = {}
  colors.win = {}
  colors.win.light = {220,220,220}
  colors.win.dark = {135,135,135}
  colors.win.normal = {192,192,192}
  colors.font = {}
  colors.font.dark = {50,50,50}
  colors.font.friend = {240,10,10}
  colors.font.you = {10,10,240}
  colors.font.light = {240,240,240}
  notify = {}
  notify.yes = false
  notify.title = ""
  notify.body = ""
  notify.op = 0
  notify.sound = false
  notify.x = sys.w-258
  notify.y = sys.h-135
  notify.timer = 0
  msg = {}
  msg.new = false
  msg.c = 1
  msg.msgs = {}
  msgs = {}
  internet.url = "www.homepage.com"
  internet.urlold = internet.url
  internet.urlc = internet.url
  v1.yes = false
  v1.timer = 0
  v1.shakemin = 0
  v1.shakemax = 0
  v1.introplay = false
  v1.explodeintro = false
  v1.explodeintrotimer = 0
  expl.deb[1].x = 0
  expl.deb[1].y = 0
  expl.deb[1].ym = 5
  expl.deb[1].xm = -13
  expl.deb[1].r = math.rad(0)
  expl.deb[1].rm = math.rad(-2)
  expl.deb[2].x = 0
  expl.deb[2].y = 0
  expl.deb[2].ym = 7
  expl.deb[2].xm = 23
  expl.deb[2].r = math.rad(0)
  expl.deb[2].rm = math.rad(3)
  expl.deb[3].x = 0
  expl.deb[3].y = 0
  expl.deb[3].ym = 2
  expl.deb[3].xm = 10
  expl.deb[3].r = math.rad(0)
  expl.deb[3].rm = math.rad(1)
  expl.deb.load = false
end