This commit is contained in:
8
inc/system/system.print.lua
Normal file
8
inc/system/system.print.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
function Print.text(text, x, y, color, fixed, scale)
|
||||
local shadow_color = Config.colors.black
|
||||
if color == shadow_color then shadow_color = Config.colors.light_grey end
|
||||
scale = scale or 1
|
||||
print(text, x + 1, y + 1, shadow_color, fixed, scale)
|
||||
print(text, x, y, color, fixed, scale)
|
||||
end
|
||||
@@ -1,6 +1,6 @@
|
||||
function UI.draw_top_bar(title)
|
||||
rect(0, 0, Config.screen.width, 10, Config.colors.dark_grey)
|
||||
print(title, 3, 2, Config.colors.green)
|
||||
Print.text(title, 3, 2, Config.colors.green)
|
||||
end
|
||||
|
||||
function UI.draw_dialog()
|
||||
@@ -11,9 +11,9 @@ function UI.draw_menu(items, selected_item, x, y)
|
||||
for i, item in ipairs(items) do
|
||||
local current_y = y + (i-1)*10
|
||||
if i == selected_item then
|
||||
print(">", x - 8, current_y, Config.colors.green)
|
||||
Print.text(">", x - 8, current_y, Config.colors.green)
|
||||
end
|
||||
print(item.label, x, current_y, Config.colors.green)
|
||||
Print.text(item.label, x, current_y, Config.colors.green)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user