Skip to content

Commit 3f5c4a0

Browse files
committed
Small changes
1 parent 7f5a9e6 commit 3f5c4a0

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/client/kotlin/com/github/fdh911/modules/ModuleList.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.github.fdh911.modules
22

3+
import com.github.fdh911.render.Unicodes
34
import com.github.fdh911.ui.UIWindow
45
import imgui.ImGui
56
import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext
@@ -24,8 +25,10 @@ object ModuleList {
2425
}
2526

2627
val window = UIWindow("Modules") {
27-
for(module in modules)
28-
if(ImGui.selectable(module.name))
28+
for(module in modules) {
29+
val title = "${if(module.toggled) Unicodes.CHECKBOX_1 else Unicodes.CHECKBOX_0} ${module.name}"
30+
if(ImGui.selectable(title))
2931
+ module.getWindow()
32+
}
3033
}
3134
}

src/client/kotlin/com/github/fdh911/render/Unicodes.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ enum class Unicodes(val s: String) {
44
REMOVE("\uf00d"),
55
DUPLICATE("\uf24d"),
66
ANGLE_UP("\uf106"),
7-
ANGLE_DOWN("\uf107");
7+
ANGLE_DOWN("\uf107"),
8+
CHECKBOX_0("\uf0c8"),
9+
CHECKBOX_1("\uf14a");
810

911
companion object {
1012
override fun toString() = entries.joinToString { it.s }

0 commit comments

Comments
 (0)