diff --git a/itemwatch.lua b/itemwatch.lua index ef31133..cf58e97 100644 --- a/itemwatch.lua +++ b/itemwatch.lua @@ -141,21 +141,20 @@ local function save_settings() -- Obtain the configuration editor values.. local font_name = imgui.GetVarValue(variables['var_FontFamily'][1]); local font_size = imgui.GetVarValue(variables['var_FontSize'][1]); - local font_pos_x = imgui.GetVarValue(variables['var_FontPositionX'][1]); - local font_pos_y = imgui.GetVarValue(variables['var_FontPositionY'][1]); local font_color = imgui.GetVarValue(variables['var_FontColor'][1]); local font_bgcolor = imgui.GetVarValue(variables['var_FontBGColor'][1]); local font_bgvisible= imgui.GetVarValue(variables['var_FontBGVisible'][1]); local font_kicolor1 = imgui.GetVarValue(variables['var_KeyItemColor1'][1]); local font_kicolor2 = imgui.GetVarValue(variables['var_KeyItemColor2'][1]); local use_compact = imgui.GetVarValue(variables['var_UseCompactMode'][1]); - + + local f = AshitaCore:GetFontManager():Get('__itemwatch_display'); itemwatch_config.font.name = font_name; itemwatch_config.font.size = font_size; - itemwatch_config.font.position = { font_pos_x, font_pos_y }; itemwatch_config.font.color = colortable_to_int(font_color); itemwatch_config.font.bgcolor = colortable_to_int(font_bgcolor); itemwatch_config.font.bgvisible = font_bgvisible; + itemwatch_config.font.position = { f:GetPositionX(), f:GetPositionY() }; itemwatch_config.kicolor1 = colortable_to_int(font_kicolor1); itemwatch_config.kicolor2 = colortable_to_int(font_kicolor2); itemwatch_config.compact_mode = use_compact;