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

ui settinfs better respected

parent b2b38092
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,6 @@
-- darkgod@te4.org
require "engine.class"
local Dialog = require "engine.ui.Dialog"
local Savefile = require "engine.Savefile"
local UIBase = require "engine.ui.Base"
require "engine.PlayerProfile"
......@@ -725,6 +724,8 @@ function _M:instanciate(mod, name, new_game, no_reboot)
profile:loadModuleProfile(mod.short_name, mod)
profile:currentCharacter(mod.full_version_string, "game did not tell us")
UIBase:clearCache()
-- Init the module code
local M, W = mod.load("init")
class:runInherited()
......
......@@ -62,7 +62,7 @@ function _M:init(fontname, fontsize, color, bgcolor, max, lockstatus_icon)
end
function _M:generate()
self.frame = self:makeFrame("ui/tooltip/", self.w + 6, self.h + 6)
self.frame = Base:makeFrame("ui/tooltip/", self.w + 6, self.h + 6)
end
--- Set the tooltip text
......@@ -323,4 +323,4 @@ function _M:getTooltipAtMap(tmx, tmy, mx, my)
return tt
end
return nil
end
\ No newline at end of file
end
......@@ -90,6 +90,11 @@ function _M:init(t, no_gen)
if not no_gen then self:generate() end
end
function _M:clearCache()
cache = {}
tcache = {}
end
function _M:getImage(file, noerror)
if cache[file] then return unpack(cache[file]) end
local s = core.display.loadImage(gfx_prefix..file)
......
......@@ -63,7 +63,7 @@ function _M:init()
self.background, self.background_tw, self.background_th = self.background:glTexture()
end
self.tooltip = Tooltip.new(nil, 14, nil, colors.DARK_GREY, 400)
self.tooltip = Tooltip.new(nil, 14, nil, colors.DARK_GREY, 380)
-- self.refuse_threads = true
self.normal_key = self.key
......@@ -141,6 +141,7 @@ Now go and have some fun!]]
-- Setup FPS
core.game.setFPS(config.settings.display_fps)
self:triggerHook{"Boot:runEnd"}
end
function _M:newGame()
......
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