@@ -27,10 +27,10 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
2727 // ? if >= 1.20.2 {
2828 /* val ARROW_UP = UnityTranslate.id("arrow_up")
2929 val ARROW_DOWN = UnityTranslate.id("arrow_down")
30- */ // ? } else {
30+ */ // ?} else {
3131 val ARROW_UP = UnityTranslate .id(" textures/gui/sprites/arrow_up.png" )
3232 val ARROW_DOWN = UnityTranslate .id(" textures/gui/sprites/arrow_down.png" )
33- // ? }
33+ // ?}
3434 }
3535
3636 override fun init () {
@@ -65,8 +65,8 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
6565
6666 override fun render (guiGraphics : GuiGraphics , mouseX : Int , mouseY : Int , partialTick : Float ) {
6767 // ? if < 1.20.4 {
68- /* this.renderBackground(guiGraphics)
69- */ // ? }
68+ this .renderBackground(guiGraphics)
69+ // ? }
7070
7171 super .render(guiGraphics, mouseX, mouseY, partialTick)
7272
@@ -253,25 +253,25 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
253253
254254 // ? if >= 1.20.4 {
255255 /* addRenderableWidget(SpriteIconButton.builder(Component.empty(), {
256- */ // ? } else {
256+ */ // ?} else {
257257 addRenderableWidget(TextAndImageButton .builder(Component .empty(), ARROW_UP ) {
258- // ? }
258+ // ?}
259259 member.setter.call(instance, Mth .clamp(value + range.increment, min, max))
260260 this .rebuildWidgets()
261261 // ? if >= 1.20.4 {
262262 /* }, true)
263- */ // ? } else {
263+ */ // ?} else {
264264 }
265- // ? }
265+ // ?}
266266 // ? if >= 1.20.4 {
267267 /* .sprite(ARROW_UP, 8, 8)
268268 .size(12, 12)
269- */ // ? } else {
269+ */ // ?} else {
270270 .offset(0 , 2 )
271271 .texStart(0 , 0 )
272272 .textureSize(8 , 8 )
273273 .usedTextureSize(8 , 8 )
274- // ? }
274+ // ?}
275275 .build()
276276 .apply {
277277 this .x = this @UTConfigSubScreen.width - 18
@@ -288,25 +288,25 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
288288
289289 // ? if >= 1.20.4 {
290290 /* addRenderableWidget(SpriteIconButton.builder(Component.empty(), {
291- */ // ? } else {
291+ */ // ?} else {
292292 addRenderableWidget(TextAndImageButton .builder(Component .empty(), ARROW_DOWN ) {
293- // ? }
293+ // ?}
294294 member.setter.call(instance, Mth .clamp(value - range.increment, min, max))
295295 this .rebuildWidgets()
296296 // ? if >= 1.20.4 {
297297 /* }, true)
298- */ // ? } else {
298+ */ // ?} else {
299299 }
300- // ? }
300+ // ?}
301301 // ? if >= 1.20.4 {
302302 /* .sprite(ARROW_DOWN, 8, 8)
303303 .size(12, 12)
304- */ // ? } else {
304+ */ // ?} else {
305305 .offset(0 , 2 )
306306 .texStart(0 , 0 )
307307 .textureSize(8 , 8 )
308308 .usedTextureSize(8 , 8 )
309- // ? }
309+ // ?}
310310 .build()
311311 .apply {
312312 this .x = this @UTConfigSubScreen.width - 18
@@ -342,25 +342,25 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
342342
343343 // ? if >= 1.20.4 {
344344 /* addRenderableWidget(SpriteIconButton.builder(Component.empty(), {
345- */ // ? } else {
345+ */ // ?} else {
346346 addRenderableWidget(TextAndImageButton .builder(Component .empty(), ARROW_UP ) {
347- // ? }
347+ // ?}
348348 member.setter.call(instance, Mth .clamp(value + range.increment, min, max))
349349 this .rebuildWidgets()
350350 // ? if >= 1.20.4 {
351351 /* }, true)
352- */ // ? } else {
352+ */ // ?} else {
353353 }
354- // ? }
354+ // ?}
355355 // ? if >= 1.20.4 {
356356 /* .sprite(ARROW_UP, 8, 8)
357357 .size(12, 12)
358- */ // ? } else {
358+ */ // ?} else {
359359 .offset(0 , 2 )
360360 .texStart(0 , 0 )
361361 .textureSize(8 , 8 )
362362 .usedTextureSize(8 , 8 )
363- // ? }
363+ // ?}
364364 .build()
365365 .apply {
366366 this .x = this @UTConfigSubScreen.width - 18
@@ -377,25 +377,25 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
377377
378378 // ? if >= 1.20.4 {
379379 /* addRenderableWidget(SpriteIconButton.builder(Component.empty(), {
380- */ // ? } else {
380+ */ // ?} else {
381381 addRenderableWidget(TextAndImageButton .builder(Component .empty(), ARROW_DOWN ) {
382- // ? }
382+ // ?}
383383 member.setter.call(instance, Mth .clamp(value - range.increment, min, max))
384384 this .rebuildWidgets()
385385 // ? if >= 1.20.4 {
386386 /* }, true)
387- */ // ? } else {
387+ */ // ?} else {
388388 }
389- // ? }
389+ // ?}
390390 // ? if >= 1.20.4 {
391391 /* .sprite(ARROW_DOWN, 8, 8)
392392 .size(12, 12)
393- */ // ? } else {
393+ */ // ?} else {
394394 .offset(0 , 2 )
395395 .texStart(0 , 0 )
396396 .textureSize(8 , 8 )
397397 .usedTextureSize(8 , 8 )
398- // ? }
398+ // ?}
399399 .build()
400400 .apply {
401401 this .x = this @UTConfigSubScreen.width - 18
@@ -468,28 +468,28 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
468468 private fun <T > addArrows (x : Int , y : Int , index : Int , actualValue : MutableList <T >) {
469469 // ? if >= 1.20.4 {
470470 /* addRenderableWidget(SpriteIconButton.builder(Component.empty(), {
471- */ // ? } else {
471+ */ // ?} else {
472472 addRenderableWidget(TextAndImageButton .builder(Component .empty(), ARROW_UP ) {
473- // ? }
473+ // ?}
474474 val oldValue = actualValue[index]
475475 val oldPrevValue = actualValue[index - 1 ]
476476 actualValue[index - 1 ] = oldValue
477477 actualValue[index] = oldPrevValue
478478 this .rebuildWidgets()
479479 // ? if >= 1.20.4 {
480480 /* }, true)
481- */ // ? } else {
481+ */ // ?} else {
482482 }
483- // ? }
483+ // ?}
484484 // ? if >= 1.20.4 {
485485 /* .sprite(ARROW_UP, 8, 8)
486486 .size(12, 12)
487- */ // ? } else {
487+ */ // ?} else {
488488 .offset(0 , 2 )
489489 .texStart(0 , 0 )
490490 .textureSize(8 , 8 )
491491 .usedTextureSize(8 , 8 )
492- // ? }
492+ // ?}
493493 .build()
494494 .apply {
495495 this .x = x
@@ -503,28 +503,28 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
503503
504504 // ? if >= 1.20.4 {
505505 /* addRenderableWidget(SpriteIconButton.builder(Component.empty(), {
506- */ // ? } else {
506+ */ // ?} else {
507507 addRenderableWidget(TextAndImageButton .builder(Component .empty(), ARROW_DOWN ) {
508- // ? }
508+ // ?}
509509 val oldValue = actualValue[index]
510510 val oldPrevValue = actualValue[index + 1 ]
511511 actualValue[index + 1 ] = oldValue
512512 actualValue[index] = oldPrevValue
513513 this .rebuildWidgets()
514514 // ? if >= 1.20.4 {
515515 /* }, true)
516- */ // ? } else {
516+ */ // ?} else {
517517 }
518- // ? }
518+ // ?}
519519 // ? if >= 1.20.4 {
520520 /* .sprite(ARROW_DOWN, 8, 8)
521521 .size(12, 12)
522- */ // ? } else {
522+ */ // ?} else {
523523 .offset(0 , 2 )
524524 .texStart(0 , 0 )
525525 .textureSize(8 , 8 )
526526 .usedTextureSize(8 , 8 )
527- // ? }
527+ // ?}
528528 .build()
529529 .apply {
530530 this .x = x
@@ -544,9 +544,9 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
544544 override fun render (guiGraphics : GuiGraphics , mouseX : Int , mouseY : Int , partialTick : Float ) {
545545 // ? if >= 1.20.4 {
546546 /* this.renderBackground(guiGraphics, mouseX, mouseY, partialTick)
547- */ // ? } else {
547+ */ // ?} else {
548548 this .renderBackground(guiGraphics)
549- // ? }
549+ // ?}
550550
551551 guiGraphics.fill(0 , 50 , this .width, this .height - 50 , FastColor .ARGB32 .color(150 , 0 , 0 , 0 ))
552552 guiGraphics.drawCenteredString(this .font, this .title, this .width / 2 , 20 , 16777215 )
@@ -634,9 +634,9 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
634634 override fun mouseScrolled (mouseX : Double , mouseY : Double ,
635635 // ? if >= 1.20.4 {
636636 /* scrollX: Double, delta: Double
637- */ // ? } else {
637+ */ // ?} else {
638638 delta : Double
639- // ? }
639+ // ?}
640640 ): Boolean {
641641 this .scrollAmount = Mth .clamp(this .scrollAmount - delta * (this .maxPosition / 4.0 ), 0.0 , this .maxScroll.toDouble())
642642 updateScroll()
0 commit comments