added Coords, Hitbox and more Settings
This commit is contained in:
@@ -113,7 +113,7 @@ public class QuestsPanel {
|
||||
summaryRow.child(UIComponents.label(
|
||||
Component.literal("quests " + unlockedCount + "/" + quests.size())
|
||||
.withStyle(style -> style.withFont(new FontDescription.Resource(MyScreen.MC_FIVE))))
|
||||
.color(Color.ofRgb(0xa3a3ac)));
|
||||
.color(Color.ofRgb(0xFF5c5c66)));
|
||||
|
||||
content.child(summaryRow);
|
||||
|
||||
@@ -140,22 +140,12 @@ public class QuestsPanel {
|
||||
return handle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this once per client tick (e.g. from ClientTickEvents.END_CLIENT_TICK)
|
||||
* to keep the open panel's playtime/progress/quest state live.
|
||||
* Throttled to once every 20 ticks (~1x/sec) since playtime itself only
|
||||
* updates that often server-side.
|
||||
*/
|
||||
public static void tick() {
|
||||
if (activeHandle != null && tickCounter++ % 20 == 0) {
|
||||
activeHandle.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this from the screen's onClose() so a closed panel stops being
|
||||
* refreshed and can be garbage collected.
|
||||
*/
|
||||
public static void clearActiveHandle() {
|
||||
activeHandle = null;
|
||||
}
|
||||
@@ -216,7 +206,7 @@ public class QuestsPanel {
|
||||
textStack.child(titleLabel);
|
||||
|
||||
var descLabel = UIComponents.label(Component.literal(quest.description()))
|
||||
.color(Color.ofRgb(0xa3a3ac))
|
||||
.color(Color.ofRgb(0xFF5c5c66))
|
||||
.maxWidth(entryWidth - 24);
|
||||
textStack.child(descLabel);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user