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

fix addon menu updating

parent 5f13ba69
No related branches found
No related tags found
No related merge requests found
......@@ -31,14 +31,16 @@ module(..., package.seeall, class.inherit(Dialog))
function _M:init()
Dialog.init(self, "Configure Addons", game.w * 0.8, game.h * 0.8)
local url1 = Textzone.new{text="You can get new addons at #LIGHT_BLUE##{underline}#http://te4.org/addons/tome#{normal}#", auto_height=true, auto_width=true, fct=function() util.browserOpenUrl("http://te4.org/addons/tome") end}
local webaddonload = function()
local method, d = util.browserOpenUrl("http://te4.org/addons/tome", {steam=true})
if method == "webview" and d then d.unload = function() self:regen() end end
end
local url1 = Textzone.new{text="You can get new addons at #LIGHT_BLUE##{underline}#http://te4.org/addons/tome#{normal}#", auto_height=true, auto_width=true, fct=webaddonload}
local url2 = Textzone.new{text=" ", auto_height=true, auto_width=true, fct=function()end}
if core.steam then
url1 = Textzone.new{text="You can get new addons at #LIGHT_BLUE##{underline}#Steam Workshop#{normal}#", auto_height=true, auto_width=true, fct=function() util.browserOpenUrl("http://steamcommunity.com/app/"..core.steam.appid().."/workshop/", {webview=true}) end}
url2 = Textzone.new{text=" or at #LIGHT_BLUE##{underline}#http://te4.org/addons/tome#{normal}#", auto_height=true, auto_width=true, fct=function()
local method, d = util.browserOpenUrl("http://te4.org/addons/tome", {steam=true})
if method == "webview" and d then d.unload = function() self:regen() end end
end}
url2 = Textzone.new{text=" or at #LIGHT_BLUE##{underline}#http://te4.org/addons/tome#{normal}#", auto_height=true, auto_width=true, fct=webaddonload}
end
self.c_compat = Checkbox.new{default=false, width=math.floor(self.iw / 3 - 40), title="Show incompatible", on_change=function() self:switch() 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