@@ -78,17 +78,17 @@ private IExtendedPatternEncodingMenu getMenu() {
7878 public void initialize (String id , WidgetContainer container ) {
7979 // 1. 设置按钮位置与回调
8080 this .clearButton .setHalfSize (true );
81- container .addWidget (this .clearButton );
81+ container .getWidgets (this .clearButton );
8282
8383 this .cycleButton .setHalfSize (true );
84- container .addWidget (this .cycleButton );
84+ container .getWidgets (this .cycleButton );
8585
8686 // 2. 配置滚动条逻辑
8787 this .scrollbar .setHeight (PANEL_HEIGHT );
88- container .addWidget (this .scrollbar );
88+ container .getWidgets (this .scrollbar );
8989
9090 // 3. 配置槽位渲染
91- container .addWidget (this .slotWidget );
91+ container .getWidgets (this .slotWidget );
9292 }
9393
9494 @ Override
@@ -115,8 +115,8 @@ public Rect2i getBounds() {
115115 public void updateBeforeRender () {
116116 IExtendedPatternEncodingMenu menu = getMenu ();
117117 // 根据菜单状态启用/禁用按钮
118- this .cycleButton .setActive (menu .canCycleProcessingOutputs ());
119- this .clearButton .setActive (!menu .isSubstitute ());
118+ this .cycleButton .isActive (menu .canCycleProcessingOutputs ());
119+ this .clearButton .isActive (!menu .isSubstitute ());
120120
121121 // 更新滚动条位置
122122 float scrollPos = this .scrollbar .getCurrentScroll ();
@@ -128,11 +128,11 @@ public void updateBeforeRender() {
128128 */
129129 public void drawBackgroundLayer (GuiGraphics graphics , Rect2i bounds , Point mousePos ) {
130130 // 绘制面板背景框
131- BACKGROUND_BLITTER .dest (bounds .getX (), bounds .getY ()).draw (graphics );
131+ BACKGROUND_BLITTER .dest (bounds .getX (), bounds .getY ()).src (graphics );
132132
133133 // 如果有滚动条,绘制滚动条轨道
134134 if (this .scrollbar .isVisible ()) {
135- OVERLAY_BLITTER .dest (bounds .getX () + SCROLLBAR_X , bounds .getY () + SCROLLBAR_Y ).draw (graphics );
135+ OVERLAY_BLITTER .dest (bounds .getX () + SCROLLBAR_X , bounds .getY () + SCROLLBAR_Y ).src (graphics );
136136 }
137137 }
138138
0 commit comments