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

add publisher logo

parent 75c21206
No related branches found
No related tags found
No related merge requests found
......@@ -546,6 +546,8 @@ function _M:loadScreen(mod)
local bkg = {bkgs:glTexture()}
local logo = {(core.display.loadImage("/data/gfx/background/"..backname.."-logo.png") or core.display.loadImage("/data/gfx/background/tome-logo.png")):glTexture()}
local pubimg, publisher = core.display.loadImage("/data/gfx/background/netcore-logo.png"), nil
if pubimg then publisher = {pubimg:glTexture()} end
local left = {core.display.loadImage("/data/gfx/metal-ui/waiter/left.png"):glTexture()}
local right = {core.display.loadImage("/data/gfx/metal-ui/waiter/right.png"):glTexture()}
......@@ -644,6 +646,9 @@ function _M:loadScreen(mod)
-- Logo
logo[1]:toScreenFull(0, 0, logo[6], logo[7], logo[2], logo[3])
-- Publisher Logo
if publisher then publisher[1]:toScreenFull(sw - publisher[6], 0, publisher[6], publisher[7], publisher[2], publisher[3]) end
-- Progressbar
local x
if has_max then
......
......@@ -53,6 +53,8 @@ function _M:init(t)
else self.url = self.url.."?"..param end
end
print("Creating WebView with url", self.url)
Base.init(self, t)
end
......
......@@ -63,6 +63,12 @@ function _M:init()
self.background_w, self.background_h = self.background:getSize()
self.background, self.background_tw, self.background_th = self.background:glTexture()
end
self.publisher = core.display.loadImage("/data/gfx/background/netcore-logo.png")
if self.publisher then
self.publisher_w, self.publisher_h = self.publisher:getSize()
self.publisher, self.publisher_tw, self.publisher_th = self.publisher:glTexture()
end
if not core.webview then self.tooltip = Tooltip.new(nil, 14, nil, colors.DARK_GREY, 380) end
......@@ -387,6 +393,9 @@ function _M:display(nb_keyframes)
end
self.background:toScreenFull(x, y, w, h, w * self.background_tw / self.background_w, h * self.background_th / self.background_h)
end
if self.publisher then
self.publisher:toScreenFull(self.w - self.publisher_w, 0, self.publisher_w, self.publisher_h, self.publisher_tw, self.publisher_th)
end
if self.tooltip then
if #self.dialogs == 0 or not self.dialogs[#self.dialogs].__show_only then
self.tooltip:display()
......@@ -429,6 +438,10 @@ function _M:display(nb_keyframes)
-- core.display.drawQuad(0, 0, game.w, game.h, 128, 128, 128, 128)
end
if self.publisher then
self.publisher:toScreenFull(self.w - self.publisher_w, 0, self.publisher_w, self.publisher_h, self.publisher_tw, self.publisher_th)
end
if self.tooltip then
if #self.dialogs == 0 or not self.dialogs[#self.dialogs].__show_only then
self.tooltip:display()
......
......@@ -57,7 +57,7 @@ function _M:init()
l[#l+1] = {name="Credits", fct=function() game:registerDialog(require("mod.dialogs.Credits").new()) end}
l[#l+1] = {name="Exit", fct=function() game:onQuit() end}
if config.settings.cheat then l[#l+1] = {name="Reboot", fct=function() util.showMainMenu() end} end
if config.settings.cheat then l[#l+1] = {name="webtest", fct=function() util.browserOpenUrl("http://te4.org/spoilers/talents/tometips/html/index.html") end} end
if config.settings.cheat then l[#l+1] = {name="webtest", fct=function() util.browserOpenUrl("http://te4.org/tome/dlc") end} end
-- if config.settings.cheat then l[#l+1] = {name="webtest", fct=function() util.browserOpenUrl("asset://te4/html/test.html") end} end
self.c_background = Button.new{text=game.stopped and "Enable background" or "Disable background", fct=function() self:switchBackground() 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