Skip to content

Commit 2e1a498

Browse files
committed
v1.2.1
- fix current datapack text in datapack selection screen
1 parent c9f0852 commit 2e1a498

6 files changed

Lines changed: 18 additions & 18 deletions

File tree

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies {
3333
modImplementation("net.fabricmc.fabric-api:fabric-api:${property("fabric_api_version")}")
3434

3535
modCompileOnly("com.github.Tectato:BetterCommandBlockUI:1.20-SNAPSHOT")
36-
modImplementation(include("xyz.meowing:vexel-1.20.1-fabric:105")!!)
36+
modImplementation(include("xyz.meowing:vexel-1.20.1-fabric:121")!!)
3737
}
3838

3939
tasks {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ yarn_mappings=1.20.1+build.10
77
loader_version=0.16.9
88
fabric_kotlin_version=1.13.6+kotlin.2.2.20
99
fabric_api_version=0.90.0+1.20.1
10-
mod_version=1.2.0
10+
mod_version=1.2.1
1111

1212
org.gradle.jvmargs=-Xmx4000m

src/main/kotlin/com/pulse/datapacktools/client/screen/DatapackSelectionScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class DatapackSelectionScreen(val parent: Screen? = null) : Screen(Text.translat
6666
textRenderer,
6767
Text.translatable("gui.datapacktools.datapack_selection.current", current),
6868
width / 2,
69-
height / 2 - 60,
69+
height / 2 - 20,
7070
Colors.GRAY
7171
)
7272

src/main/kotlin/com/pulse/datapacktools/client/screen/vexel/CodeEditor.kt

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ class CodeEditor(
8686
private var lastClickTime = 0L
8787
private var clickCount = 0
8888
var isLoaded = false
89+
8990
var hasUnsavedChanges = false
90-
9191
var onUnsavedChanges: ((Boolean) -> Unit)? = null
9292

9393
private val lineNumberWidth: Float = 50f
@@ -182,7 +182,7 @@ class CodeEditor(
182182

183183
lastClickTime = currentTime
184184

185-
when (clickCount) {
185+
when (clickCount) {
186186
1 -> {
187187
cursorLine = clickedLine
188188
cursorCol = clickedCol
@@ -201,7 +201,7 @@ class CodeEditor(
201201
}
202202

203203
resetCaretBlink()
204-
commandSuggester.refresh(lines[cursorLine], cursorCol)
204+
commandSuggester.refresh(lines[cursorLine], cursorCol)
205205
return@onClick true
206206
} else {
207207
isFocused = false
@@ -450,62 +450,62 @@ class CodeEditor(
450450
return true
451451
}
452452

453-
when (keyCode) {
453+
when (keyCode) {
454454
KnitKeys.KEY_ESCAPE.code -> {
455455
isFocused = false
456456
return true
457457
}
458458
KnitKeys.KEY_ENTER.code -> {
459459
saveState()
460460
insertText("\n")
461-
commandSuggester.refresh(lines[cursorLine], cursorCol)
461+
commandSuggester.refresh(lines[cursorLine], cursorCol)
462462
return true
463463
}
464464
KnitKeys.KEY_TAB.code -> {
465465
saveState()
466466
insertText(" ")
467-
commandSuggester.refresh(lines[cursorLine], cursorCol)
467+
commandSuggester.refresh(lines[cursorLine], cursorCol)
468468
return true
469469
}
470470
KnitKeys.KEY_BACKSPACE.code -> {
471471
saveState()
472472
if (ctrlDown) deletePrevWord()
473473
else deleteChar()
474-
commandSuggester.refresh(lines[cursorLine], cursorCol)
474+
commandSuggester.refresh(lines[cursorLine], cursorCol)
475475
return true
476476
}
477477
KnitKeys.KEY_LEFT.code -> {
478478
if (ctrlDown) moveWord(-1, shiftDown)
479479
else moveCaret(-1, 0, shiftDown)
480-
commandSuggester.refresh(lines[cursorLine], cursorCol)
480+
commandSuggester.refresh(lines[cursorLine], cursorCol)
481481
return true
482482
}
483483
KnitKeys.KEY_RIGHT.code -> {
484484
if (ctrlDown) moveWord(1, shiftDown)
485485
else moveCaret(1, 0, shiftDown)
486-
commandSuggester.refresh(lines[cursorLine], cursorCol)
486+
commandSuggester.refresh(lines[cursorLine], cursorCol)
487487
return true
488488
}
489489
KnitKeys.KEY_UP.code -> {
490490
moveCaret(0, -1, shiftDown)
491-
commandSuggester.refresh(lines[cursorLine], cursorCol)
491+
commandSuggester.refresh(lines[cursorLine], cursorCol)
492492
return true
493493
}
494494
KnitKeys.KEY_DOWN.code -> {
495495
moveCaret(0, 1, shiftDown)
496-
commandSuggester.refresh(lines[cursorLine], cursorCol)
496+
commandSuggester.refresh(lines[cursorLine], cursorCol)
497497
return true
498498
}
499499
KnitKeys.KEY_HOME.code -> {
500500
if (ctrlDown) moveCaretTo(0, 0, shiftDown)
501501
else moveCaretTo(cursorLine, 0, shiftDown)
502-
commandSuggester.refresh(lines[cursorLine], cursorCol)
502+
commandSuggester.refresh(lines[cursorLine], cursorCol)
503503
return true
504504
}
505505
KnitKeys.KEY_END.code -> {
506506
if (ctrlDown) moveCaretTo(lines.size - 1, lines.last().length, shiftDown)
507507
else moveCaretTo(cursorLine, lines[cursorLine].length, shiftDown)
508-
commandSuggester.refresh(lines[cursorLine], cursorCol)
508+
commandSuggester.refresh(lines[cursorLine], cursorCol)
509509
return true
510510
}
511511
}
@@ -725,7 +725,6 @@ class CodeEditor(
725725
selectionAnchorCol = cursorCol
726726
}
727727
resetCaretBlink()
728-
729728
commandSuggester.refresh(lines[cursorLine], cursorCol)
730729
}
731730

@@ -967,5 +966,4 @@ class CodeEditor(
967966
onUnsavedChanges?.invoke(false)
968967
}
969968
}
970-
971969
}

src/main/resources/assets/datapacktools/lang/en_us.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"gui.datapacktools.datapack_selection.screen_title": "Select datapack for editing",
44
"gui.datapacktools.datapack_selection.subtitle": "Select datapack, that you will edit",
55
"gui.datapacktools.datapack_selection.empty": "Datapacks were not found",
6+
"gui.datapacktools.datapack_selection.current": "Currently selected: %s",
67
"gui.datapacktools.namespace_selection.screen_title": "Select datapack for editing",
78
"gui.datapacktools.namespace_selection.subtitle": "Choose namespace of datapack %s",
89
"gui.datapacktools.namespace_selection.empty": "Namespaces were not found",

src/main/resources/assets/datapacktools/lang/ru_ru.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"gui.datapacktools.datapack_selection.screen_title": "Установить редактируемый датапак",
44
"gui.datapacktools.datapack_selection.subtitle": "Выберите датапак, который вы будете редактировать",
55
"gui.datapacktools.datapack_selection.empty": "Датапаки были не найдены",
6+
"gui.datapacktools.datapack_selection.current": "Сейчас выбрано: %s",
67
"gui.datapacktools.namespace_selection.screen_title": "Установить редактируемый датапак",
78
"gui.datapacktools.namespace_selection.subtitle": "Выберите неймспейс в датапаке %s",
89
"gui.datapacktools.namespace_selection.empty": "Неймспейсы не найдены",

0 commit comments

Comments
 (0)