-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2128fdf
commit 904c14b
Showing
6 changed files
with
99 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
common/src/main/java/org/ayamemc/ayame/client/gui/screen/SettingsScreen.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Custom player model mod. Powered by GeckoLib. | ||
* Copyright (C) 2024 CrystalNeko, HappyRespawnanchor, pertaz(Icon Designer) | ||
* | ||
* This file is part of Ayame. | ||
* | ||
* Ayame is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Ayame is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with Ayame. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package org.ayamemc.ayame.client.gui.screen; | ||
|
||
import net.minecraft.client.gui.GuiGraphics; | ||
import net.minecraft.client.gui.screens.Screen; | ||
import net.minecraft.network.chat.Component; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public class SettingsScreen extends AbstractModelMenuScreen{ | ||
public SettingsScreen(@Nullable Screen lastScreen) { | ||
super(lastScreen); | ||
} | ||
@Override | ||
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float delta) { | ||
super.render(guiGraphics, mouseX, mouseY, delta); | ||
|
||
// 获取要渲染的文本 | ||
Component text = Component.translatable("ayame.screen.warningscreen.settingsscreen.title"); | ||
|
||
// 计算居中显示的 X 坐标 | ||
int centerX = getCenteredStringX(text); | ||
|
||
// 渲染文本 | ||
guiGraphics.drawString(this.font, text, centerX, font.lineHeight, 0xFFFFFFFF, true); | ||
} | ||
|
||
@Override | ||
public void onClose() { | ||
minecraft.setScreen(null); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+119 Bytes
(110%)
common/src/main/resources/assets/ayame/textures/gui/top_layer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.