forked from mtcontrib/digiterms
Use new font_api columns attribute
This commit is contained in:
parent
50ecf5be92
commit
06e1318419
|
@ -60,7 +60,7 @@ local function push_text(lines, text, maxlines, maxcolumns)
|
|||
|
||||
function digimons.push_text_on_screen(pos, text)
|
||||
local lines = get_lines(pos)
|
||||
push_text(lines, text, 6, 20)
|
||||
push_text(lines, text, 6, digimons.columns)
|
||||
set_lines(pos, lines)
|
||||
display_api.update_entities(pos)
|
||||
end
|
||||
|
|
1
init.lua
1
init.lua
|
@ -21,6 +21,7 @@
|
|||
digimons = {}
|
||||
digimons.name = minetest.get_current_modname()
|
||||
digimons.path = minetest.get_modpath(digimons.name)
|
||||
digimons.font = "mozart"
|
||||
|
||||
dofile(digimons.path.."/font_mozart.lua")
|
||||
dofile(digimons.path.."/functions.lua")
|
||||
|
|
|
@ -97,9 +97,9 @@ digimons.register_monitor('digimons:cathodic_amber_monitor', {
|
|||
on_display_update = font_api.on_display_update,
|
||||
depth = -7/16 - display_api.entity_spacing,
|
||||
top = -1/16,
|
||||
aspect_ratio = 0.5, maxlines = 6,
|
||||
size = { x = 23/32, y = 10/16 },
|
||||
color = "#FFA000", font_name = "mozart", halign="left", valing="top",
|
||||
columns = 30, maxlines = 6,
|
||||
color = "#FFA000", font_name = digimons.font, halign="left", valing="top",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
@ -130,9 +130,9 @@ digimons.register_monitor('digimons:cathodic_green_monitor', {
|
|||
on_display_update = font_api.on_display_update,
|
||||
depth = -7/16 - display_api.entity_spacing,
|
||||
top = -1/16,
|
||||
aspect_ratio = 0.5, maxlines = 6,
|
||||
size = { x = 23/32, y = 10/16 },
|
||||
color = "#00FF00", font_name = "mozart", halign="left", valing="top",
|
||||
columns = 30, lines = 6,
|
||||
color = "#00FF00", font_name = digimons.font, halign="left", valing="top",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user