Skip to content

Commit

Permalink
gui collected column clr, move reversed chk
Browse files Browse the repository at this point in the history
  • Loading branch information
cryham committed Dec 30, 2024
1 parent e9fd540 commit 1655f94
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions data/gui/Game.layout
Original file line number Diff line number Diff line change
Expand Up @@ -2074,7 +2074,7 @@
<Widget type="ImageBox" skin="ImageBox" position="654 318 80 80" name="imgTrk7">
</Widget>

<Widget type="ImageBox" skin="ImageBox" position="604 228 168 168" name="imgTrkBig">
<Widget type="ImageBox" skin="ImageBox" position="604 238 168 168" name="imgTrkBig">
</Widget>
<Widget type="TextBox" skin="TextBox" position="24 308 140 92" name="txColDetail0">
</Widget>
Expand Down Expand Up @@ -2107,7 +2107,7 @@
<Property key="TextColour" value="0.7 0.85 1.0"/>
<Property key="FontName" value="font.big"/>
</Widget>
<Widget type="Button" skin="CheckBox" position="652 220 160 24" name="ChampRev">
<Widget type="Button" skin="CheckBox" position="652 210 160 24" name="ChampRev">
<Property key="Caption" value="#{Reverse}"/>
<Property key="Colour" value="0.8 1 0.6"/>
<Property key="TextColour" value="0.8 1 0.5"/>
Expand Down
11 changes: 9 additions & 2 deletions src/game/Collections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,15 @@ void CGui::FillCollectList(std::vector<int> vIds)
liCollect->setSubItemNameAt(3,l, gcom->clrsDiff[col.diff]+ TR("#{Diff"+toStr(col.diff)+"}"));
// liCollect->setSubItemNameAt(4,l, col.cars.GetStr(data->cars));

// collected cnt / all
liCollect->setSubItemNameAt(4,l, toStr(pc.gems.size()) +" #50A0F0/ #60A0D0"+ toStr(col.collects.size()) );
// collected cur / all
int cur = pc.gems.size(), all = col.collects.size();
if (cur > all)
liCollect->setSubItemNameAt(4,l, "#C0A0FF" + toStr(cur) +" / "+ toStr(all));
else if (cur >= all)
liCollect->setSubItemNameAt(4,l, "#80C0FF" + toStr(cur) );//? +" / "+ toStr(all));
else
liCollect->setSubItemNameAt(4,l, "#FFFF60" + toStr(cur) +" #50A0F0/ #40F0FF"+ toStr(all) );

liCollect->setSubItemNameAt(5,l, pc.bestTime > 10000.f ? "-" :
gcom->clrsDiff[std::min(8,int(pc.bestTime/3.f/60.f))]+ StrTime2(pc.bestTime));

Expand Down

0 comments on commit 1655f94

Please sign in to comment.