Skip to content
Snippets Groups Projects
Commit 736f21c1 authored by dg's avatar dg
Browse files

Added an option to control the number of log/chat lines to show

git-svn-id: http://svn.net-core.org/repos/t-engine4@3745 51575b47-30f0-44d4-a5cc-537603b46e54
parent 6edd00c5
No related branches found
No related tags found
No related merge requests found
......@@ -105,19 +105,21 @@ function _M:run()
self.player_display = PlayerDisplay.new(0, 200, 200, self.h - 200, {30,30,0}, font_mono, size_mono)
-- self.flash = LogFlasher.new(0, 0, self.w, 20, nil, font, size, {255,255,255}, {0,0,0})
self.map_h_stop = self.h - font_mono_h * 4
self.logdisplay = LogDisplay.new(216, self.map_h_stop - font_h * 5 -16, (self.w - 216) / 2, font_h * 5, nil, font, size, nil, nil)
self.logdisplay = LogDisplay.new(216, self.map_h_stop - font_h * config.settings.tome.log_lines -16, (self.w - 216) / 2, font_h * config.settings.tome.log_lines, nil, font, size, nil, nil)
self.logdisplay.resizeToLines = function() self.logdisplay:resize(216, self.map_h_stop - font_h * config.settings.tome.log_lines -16, (self.w - 216) / 2, font_h * config.settings.tome.log_lines) end
self.logdisplay:enableShadow(1)
self.logdisplay:enableFading(2)
profile.chat:resize(216 + (self.w - 216) / 2, self.map_h_stop - font_h * 5 -16, (self.w - 216) / 2, font_h * 5, font, size, nil, nil)
profile.chat:resize(216 + (self.w - 216) / 2, self.map_h_stop - font_h * config.settings.tome.log_lines -16, (self.w - 216) / 2, font_h * config.settings.tome.log_lines, font, size, nil, nil)
profile.chat.resizeToLines = function() profile.chat:resize(216 + (self.w - 216) / 2, self.map_h_stop - font_h * config.settings.tome.log_lines -16, (self.w - 216) / 2, font_h * config.settings.tome.log_lines) end
profile.chat:enableShadow(1)
profile.chat:enableFading(6)
profile.chat:enableDisplayChans(false)
self.hotkeys_display = HotkeysDisplay.new(nil, 216, self.h - font_mono_h * 4, self.w - 216, font_mono_h * 4, "/data/gfx/ui/talents-list.png", font_mono, size_mono)
self.hotkeys_display = HotkeysDisplay.new(nil, 216, self.h - font_mono_h * 4.2, self.w - 216, font_mono_h * 4.2, "/data/gfx/ui/talents-list.png", font_mono, size_mono)
self.hotkeys_display:enableShadow(0.6)
self.hotkeys_display:setColumns(3)
self.npcs_display = ActorsSeenDisplay.new(nil, 216, self.h - font_mono_h * 4, self.w - 216, font_mono_h * 4, "/data/gfx/ui/talents-list.png", font_mono, size_mono)
self.npcs_display = ActorsSeenDisplay.new(nil, 216, self.h - font_mono_h * 4.2, self.w - 216, font_mono_h * 4.2, "/data/gfx/ui/talents-list.png", font_mono, size_mono)
self.npcs_display:setColumns(3)
self.tooltip = Tooltip.new(font_mono, size, {255,255,255}, {30,30,30,230})
self.tooltip2 = Tooltip.new(font_mono, size, {255,255,255}, {30,30,30,230})
......
......@@ -182,5 +182,19 @@ function _M:generateList()
self.c_list:drawItem(item)
end,}
local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"How many log and chat lines to show at the screen's bottom."}
list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Log lines#WHITE##{normal}#", status=function(item)
return tostring(config.settings.tome.log_lines)
end, fct=function(item)
game:registerDialog(GetQuantity.new("Number of lines", "From 2 to 20", config.settings.tome.log_lines, 20, function(qty)
qty = util.bound(qty, 2, 20)
game:saveSettings("tome.log_lines", ("tome.log_lines = %d\n"):format(qty))
config.settings.tome.log_lines = qty
game.logdisplay.resizeToLines()
profile.chat.resizeToLines()
self.c_list:drawItem(item)
end, 2))
end,}
self.list = list
end
......@@ -62,6 +62,7 @@ if type(config.settings.tome.daynight) == "nil" then config.settings.tome.daynig
if type(config.settings.tome.chat_log) == "nil" then config.settings.tome.chat_log = true end
if not config.settings.tome.fonts then config.settings.tome.fonts = {type="fantasy", size="normal"} end
if not config.settings.tome.ui_theme then config.settings.tome.ui_theme = "stone" end
if not config.settings.tome.log_lines then config.settings.tome.log_lines = 5 end
Map.smooth_scroll = config.settings.tome.smooth_move
Map.faction_danger_check = function(self, e) return e.rank > 3 end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment