User Tools

Site Tools


zh_cn:tutorial:screen

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
zh_cn:tutorial:screen [2023/04/24 08:33] – [滚动] solidblockzh_cn:tutorial:screen [2023/05/04 10:32] – [添加屏幕] solidblock
Line 1: Line 1:
 ====== 添加屏幕 ====== ====== 添加屏幕 ======
  
-**屏幕**是指的图形用户界面,其类继承了 ''Screen'',允许用户进行交互并实现一些功能。屏幕一个例子是你的模组的配置屏幕。屏幕仅在客户端存在,因此应注解为 ''@Environment(EnvType.CLIENT)''+**屏幕**是指的图形用户界面,其类继承了 ''Screen'',允许用户进行交互并实现一些功能。屏幕一个例子是你的模组的配置屏幕。屏幕仅在客户端存在,因此可将相的类注解为 ''@Environment(EnvType.CLIENT)''
  
 你可以使用 mixin 以在现有的屏幕中,加入你的屏幕的链接。但是很多情况下,我们可以实现 Mod Menu 模组中的 ''ModMenuApi'',这样就能够在模组菜单屏幕中,通过配置按钮来进入屏幕。本文章不会讲述如何实现 ''ModMenuApi'' 你可以使用 mixin 以在现有的屏幕中,加入你的屏幕的链接。但是很多情况下,我们可以实现 Mod Menu 模组中的 ''ModMenuApi'',这样就能够在模组菜单屏幕中,通过配置按钮来进入屏幕。本文章不会讲述如何实现 ''ModMenuApi''
Line 145: Line 145:
 ===== 完成之前需要检查的事情 ===== ===== 完成之前需要检查的事情 =====
  
-After finishing your screen, in order to avoid potential issues, please check: +在完成你的屏幕之后,为避免潜在的问题,请检查: 
-  * whether the screen returns to the last screen (parent screen) when you press "Esc" +  * 按下 Esc 时,屏幕是否能够返回上一级屏幕 
-  * whether these classes exist only on client (which means they will not be loaded in the dedicated server) +  * 这些类是否仅存在于客户端(也就是说在专用服务器上不会加载) 
-  * whether elements are focused in the correct order when you press "Tab" to select them +  * 按下 Tab 选择元素时,这些元素被选中的顺序是否正确 
-  * whether the behaviors are correct when you resize +  * 重新调整屏幕尺寸时的行为是否正确 
-  * whether the narrations are correct when you use "Tab" or mouse cursor to select element while narration enabled+  * 启用了复述功能时,按下 Tab 或使用鼠标指针选择元素时的复述是否正确
zh_cn/tutorial/screen.txt · Last modified: 2023/12/18 01:40 by solidblock