Repository navigation
Expand file tree
/
Copy pathenemy_location.lua
More file actions
148 lines (147 loc) · 3.35 KB
/
Copy pathenemy_location.lua
File metadata and controls
148 lines (147 loc) · 3.35 KB
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
function MP.UI.show_enemy_location()
local row_dollars_chips = G.HUD:get_UIE_by_ID("row_dollars_chips")
if row_dollars_chips then
row_dollars_chips.children[1]:remove()
row_dollars_chips.children[1] = nil
G.HUD:add_child({
n = G.UIT.C,
config = { align = "cm", padding = 0.1 },
nodes = {
{
n = G.UIT.C,
config = { align = "cm", minw = 1.3 },
nodes = {
{
n = G.UIT.R,
config = { align = "cm", padding = 0, maxw = 1.3 },
nodes = {
{
n = G.UIT.T,
config = {
text = localize("ml_enemy_loc")[1],
scale = 0.42,
colour = G.C.UI.TEXT_LIGHT,
shadow = true,
},
},
},
},
{
n = G.UIT.R,
config = { align = "cm", padding = 0, maxw = 1.3 },
nodes = {
{
n = G.UIT.T,
config = {
text = localize("ml_enemy_loc")[2],
scale = 0.42,
colour = G.C.UI.TEXT_LIGHT,
shadow = true,
},
},
},
},
},
},
{
n = G.UIT.C,
config = { align = "cm", minw = 3.3, minh = 0.7, r = 0.1, colour = G.C.DYN_UI.BOSS_DARK },
nodes = {
{
n = G.UIT.T,
config = {
ref_table = MP.GAME.enemy,
ref_value = "location",
scale = 0.35,
colour = G.C.WHITE,
id = "chip_UI_count",
shadow = true,
},
},
},
},
},
}, row_dollars_chips)
end
end
function MP.UI.hide_enemy_location()
local row_dollars_chips = G.HUD:get_UIE_by_ID("row_dollars_chips")
if row_dollars_chips then
row_dollars_chips.children[1]:remove()
row_dollars_chips.children[1] = nil
G.HUD:add_child({
n = G.UIT.C,
config = { align = "cm", padding = 0.1 },
nodes = {
{
n = G.UIT.C,
config = { align = "cm", minw = 1.3 },
nodes = {
{
n = G.UIT.R,
config = { align = "cm", padding = 0, maxw = 1.3 },
nodes = {
{
n = G.UIT.T,
config = {
text = G.SETTINGS.language == "vi" and localize("k_lower_score")
or localize("k_round"),
scale = 0.42,
colour = G.C.UI.TEXT_LIGHT,
shadow = true,
},
},
},
},
{
n = G.UIT.R,
config = { align = "cm", padding = 0, maxw = 1.3 },
nodes = {
{
n = G.UIT.T,
config = {
text = G.SETTINGS.language == "vi" and localize("k_round")
or localize("k_lower_score"),
scale = 0.42,
colour = G.C.UI.TEXT_LIGHT,
shadow = true,
},
},
},
},
},
},
{
n = G.UIT.C,
config = { align = "cm", minw = 3.3, minh = 0.7, r = 0.1, colour = G.C.DYN_UI.BOSS_DARK },
nodes = {
{
n = G.UIT.O,
config = {
w = 0.5,
h = 0.5,
object = get_stake_sprite(G.GAME.stake or 1, 0.5),
hover = true,
can_collide = false,
},
},
{ n = G.UIT.B, config = { w = 0.1, h = 0.1 } },
{
n = G.UIT.T,
config = {
ref_table = G.GAME,
ref_value = "chips_text",
lang = G.LANGUAGES["en-us"],
scale = 0.85,
colour = G.C.WHITE,
id = "chip_UI_count",
func = "chip_UI_set",
shadow = true,
},
},
},
},
},
}, row_dollars_chips)
end
end