mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2025-01-04 23:37:47 +01:00
Add glowing effect on challenge level icons that are completed.
This commit is contained in:
parent
089f09dd45
commit
087ee07f45
@ -49,11 +49,11 @@ public class ChallengesGUI extends CommonGUI
|
|||||||
|
|
||||||
this.levelStatusList = this.challengesManager.getChallengeLevelStatus(this.user, this.world);
|
this.levelStatusList = this.challengesManager.getChallengeLevelStatus(this.user, this.world);
|
||||||
|
|
||||||
for (int i = 0; i < this.levelStatusList.size(); i++)
|
for (LevelStatus levelStatus : this.levelStatusList)
|
||||||
{
|
{
|
||||||
if (this.levelStatusList.get(i).isUnlocked())
|
if (levelStatus.isUnlocked())
|
||||||
{
|
{
|
||||||
this.lastSelectedLevel = this.levelStatusList.get(i);
|
this.lastSelectedLevel = levelStatus;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -491,6 +491,7 @@ public class ChallengesGUI extends CommonGUI
|
|||||||
ItemStack icon;
|
ItemStack icon;
|
||||||
List<String> description;
|
List<String> description;
|
||||||
PanelItem.ClickHandler clickHandler;
|
PanelItem.ClickHandler clickHandler;
|
||||||
|
boolean glow;
|
||||||
|
|
||||||
if (level.isUnlocked())
|
if (level.isUnlocked())
|
||||||
{
|
{
|
||||||
@ -507,6 +508,7 @@ public class ChallengesGUI extends CommonGUI
|
|||||||
this.build();
|
this.build();
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
glow = this.challengesManager.isLevelCompleted(this.user, level.getLevel());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -518,9 +520,10 @@ public class ChallengesGUI extends CommonGUI
|
|||||||
"[thisLevel]", level.getPreviousLevel().getFriendlyName()));
|
"[thisLevel]", level.getPreviousLevel().getFriendlyName()));
|
||||||
|
|
||||||
clickHandler = null;
|
clickHandler = null;
|
||||||
|
glow = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PanelItem(icon, name, description, false, clickHandler, false);
|
return new PanelItem(icon, name, description, glow, clickHandler, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user