Skip to content
Snippets Groups Projects
Commit cbac9873 authored by DarkGod's avatar DarkGod
Browse files

Added setTextFont and setAnswerFont functions to chats definition files to switch the fonts used.

parent 1f8fc6ba
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -47,6 +47,8 @@ function _M:init(name, npc, player, data)
cur_chat = self,
setDialogWidth = function(w) self.force_dialog_width = w end,
newChat = function(c) self:addChat(c) end,
setTextFont = function(font, size) self.dialog_text_font = {font, size} end,
setAnswerFont = function(font, size) self.dialog_answer_font = {font, size} end,
}, {__index=data}))
self.default_id = f()
......
......@@ -46,8 +46,8 @@ function _M:init(chat, id, width)
self:generateList()
self.c_desc = Textzone.new{width=self.iw - 10 - xoff, height=1, auto_height=true, text=self.text.."\n"}
self.c_list = VariableList.new{width=self.iw - 10 - xoff, max_height=game.h * 0.70 - self.c_desc.h, list=self.list, fct=function(item) self:use(item) end, select=function(item) self:select(item) end}
self.c_desc = Textzone.new{font=chat.dialog_text_font, width=self.iw - 10 - xoff, height=1, auto_height=true, text=self.text.."\n"}
self.c_list = VariableList.new{font=chat.dialog_answer_font, width=self.iw - 10 - xoff, max_height=game.h * 0.70 - self.c_desc.h, list=self.list, fct=function(item) self:use(item) end, select=function(item) self:select(item) end}
local uis = {
{left=0, top=0, ui=self.c_desc},
......
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