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

New achievement frames, looks much nicer

parent 46dbcf5d
No related branches found
No related tags found
No related merge requests found
Showing
with 19 additions and 8 deletions
game/engines/default/data/gfx/achievement-ui/dialogframe_1.png

8.91 KiB

game/engines/default/data/gfx/achievement-ui/dialogframe_2.png

5.01 KiB

game/engines/default/data/gfx/achievement-ui/dialogframe_3.png

10.1 KiB

game/engines/default/data/gfx/achievement-ui/dialogframe_4.png

6.68 KiB

game/engines/default/data/gfx/achievement-ui/dialogframe_5.png

4.14 KiB

game/engines/default/data/gfx/achievement-ui/dialogframe_6.png

6.81 KiB

game/engines/default/data/gfx/achievement-ui/dialogframe_7.png

10.2 KiB

game/engines/default/data/gfx/achievement-ui/dialogframe_8.png

4.94 KiB

game/engines/default/data/gfx/achievement-ui/dialogframe_9.png

9.46 KiB

game/engines/default/data/gfx/achievement-ui/runes_inner.png

25.5 KiB

......@@ -53,6 +53,14 @@ parchment = {
frame_oy2 = 16,
}
achievement = {
frame_shadow = {x = 10, y = 10, a = 0.5},
frame_ox1 = -16,
frame_ox2 = 16,
frame_oy1 = -16,
frame_oy2 = 16,
}
tombstone = {
frame_shadow = {x = 10, y = 10, a = 0.5},
frame_ox1 = -16,
......
......@@ -26,16 +26,20 @@ local Textzone = require "engine.ui.Textzone"
module(..., package.seeall, class.inherit(Dialog))
function _M:init(title, a)
local c_image = Image.new{file=a.image or "trophy_gold.png", shadow=true, width=128, height=128}
local c_desc = Textzone.new{width=500, auto_height=true, text=a.desc, font={"/data/font/DroidSans-Bold.ttf", 26}}
local c_frame = Image.new{file="achievement-ui/runes_inner.png", width=154, height=154}
local c_image = Image.new{file=a.image or "trophy_gold.png", width=128, height=128}
local color = a.huge and "#GOLD#" or "#LIGHT_GREEN#"
local c_desc = Textzone.new{width=500, auto_height=true, text=color..a.name.."#LAST#\n"..a.desc, font={"/data/font/DroidSans-Bold.ttf", 26}}
c_desc:setTextShadow(1)
c_desc:setShadowShader(Shader.default.textoutline and Shader.default.textoutline.shad, 1.2)
self.ui = "achievement"
Dialog.init(self, title, 10, 10)
self:loadUI{
{left=4, vcenter=0, ui=c_image},
{left=c_image.w+14, vcenter=0, ui=c_desc},
{left=10, vcenter=0, ui=c_frame},
{left=10 + (154-128)/2, vcenter=0, ui=c_image},
{left=c_frame.w+20, vcenter=0, ui=c_desc},
}
self:setupUI(true, true, nil, nil, math.max(c_image.h, c_desc.h))
......
......@@ -79,7 +79,7 @@ function _M:init(title, player)
{left=self.c_self.w+self.c_main.w, top=0, ui=self.c_all},
{left=0, top=self.c_self.h, ui=self.c_list},
{left=self.c_list.w+sep.w, top=self.c_self.h, ui= self.c_image},
{left=self.c_list.w+sep.w+(self.c_desc.w-self.c_image.w)/2, top=self.c_self.h, ui= self.c_image},
{left=self.c_list.w+sep.w, top=self.c_image.h + self.c_self.h, ui=self.c_desc},
{left=self.iw * 0.6 - 5, top=self.c_self.h + 5, ui=sep},
}
......
......@@ -162,9 +162,8 @@ end
--- Show an achievement gain dialog
function _M:showAchievement(title, a)
if not config.settings.cheat or 1 then
local color = a.huge and "GOLD" or "LIGHT_GREEN"
game:registerDialog(Achievement.new("New Achievement: #"..color.."#"..a.name, a))
if not config.settings.cheat then
game:registerDialog(Achievement.new("New Achievement", a))
end
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