Permalink
Browse files

[Achievements] added rewards-description to achievement list entries.…

… Idea: Gast2
  • Loading branch information...
GWRon committed Oct 24, 2017
1 parent 07ec536 commit ac01ffb3b7ba47c85088993014221fc137681782
Showing with 11 additions and 1 deletion.
  1. +11 −1 source/game.screen.achievements.bmx
@@ -343,7 +343,7 @@ Type TGUIAchievementListItem Extends TGUISelectListItem
Local parentPanel:TGUIScrollablePanel = TGUIScrollablePanel(Self.getParent("tguiscrollablepanel"))
Local maxWidth:Int = 400
If parentPanel Then maxWidth = parentPanel.getContentScreenWidth() '- GetScreenWidth()
print "maxWidth: " + maxWidth
Local maxHeight:Int = 2000 'more than 2000 pixel is a really long text
Local dimension:TVec2D = New TVec2D.Init(maxWidth, GetSpriteFromRegistry("gfx_datasheet_achievement_bg").GetHeight())
@@ -390,6 +390,16 @@ print "maxWidth: " + maxWidth
local title:string = achievement.GetTitle() ' + " [c:"+achievement.category+" > g:"+achievement.group+" > i:"+achievement.index+" "+achievement.GetGUID()+"]"
local text:string = achievement.GetText()
local rewardText:string
For local i:int = 0 until achievement.GetRewards().length
if rewardText <> "" then rewardText :+ "~n"
rewardText :+ chr(9654) + " " +achievement.GetRewards()[i].GetTitle()
Next
if rewardText
text :+ "~n|b|" + GetLocale("REWARD") + ":|/b|~n" + rewardText
endif
local skin:TDatasheetSkin = GetDatasheetSkin("achievement")
local titleOffsetX:int = 3, titleOffsetY:int = 3

0 comments on commit ac01ffb

Please sign in to comment.