aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/AchievementScreen.h
diff options
context:
space:
mode:
authordaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
committerdaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
commitb691c43c44ff180d10e7d4a9afc83b98551ff586 (patch)
tree3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.Client/AchievementScreen.h
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.Client/AchievementScreen.h')
-rw-r--r--Minecraft.Client/AchievementScreen.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/Minecraft.Client/AchievementScreen.h b/Minecraft.Client/AchievementScreen.h
new file mode 100644
index 00000000..3c4412e3
--- /dev/null
+++ b/Minecraft.Client/AchievementScreen.h
@@ -0,0 +1,57 @@
+#pragma once
+#include "Screen.h"
+#include "..\Minecraft.World\net.minecraft.stats.h"
+class StatsCounter;
+
+class AchievementScreen : public Screen
+{
+private:
+ static const int BIGMAP_X = 16;
+ static const int BIGMAP_Y = 17;
+ static const int BIGMAP_WIDTH = 224;
+ static const int BIGMAP_HEIGHT = 155;
+
+ // number of pixels per achievement
+ static const int ACHIEVEMENT_COORD_SCALE = 24;
+ static const int EDGE_VALUE_X = Achievements::ACHIEVEMENT_WIDTH_POSITION * ACHIEVEMENT_COORD_SCALE;
+ static const int EDGE_VALUE_Y = Achievements::ACHIEVEMENT_HEIGHT_POSITION * ACHIEVEMENT_COORD_SCALE;
+
+ int xMin;
+ int yMin;
+ int xMax;
+ int yMax;
+
+ static const int MAX_BG_TILE_Y = (EDGE_VALUE_Y * 2 - 1) / 16;
+
+protected:
+ int imageWidth;
+ int imageHeight;
+ int xLastScroll;
+ int yLastScroll;
+
+protected:
+ double xScrollO, yScrollO;
+ double xScrollP, yScrollP;
+ double xScrollTarget, yScrollTarget;
+
+private:
+ int scrolling;
+ StatsCounter *statsCounter;
+
+public:
+ using Screen::keyPressed;
+
+ AchievementScreen(StatsCounter *statsCounter);
+ virtual void init();
+protected:
+ virtual void buttonClicked(Button *button);
+ virtual void keyPressed(char eventCharacter, int eventKey);
+public:
+ virtual void render(int mouseX, int mouseY, float a);
+ virtual void tick();
+protected:
+ virtual void renderLabels();
+ virtual void renderBg(int xm, int ym, float a);
+public:
+ virtual bool isPauseScreen();
+};