Skip to content

Commit 26b28fb

Browse files
committed
Fix watermark
1 parent e9bb424 commit 26b28fb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/kotlin/com/lambda/module/hud/Watermark.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ import com.lambda.graphics.texture.TextureOwner.upload
2121
import com.lambda.gui.dsl.ImGuiBuilder
2222
import com.lambda.module.HudModule
2323
import com.lambda.module.tag.ModuleTag
24+
import imgui.ImGui
2425

2526
object Watermark : HudModule(
2627
name = "Watermark",
2728
tag = ModuleTag.HUD,
29+
enabledByDefault = true,
2830
) {
2931
private val texture = upload("textures/lambda.png")
32+
private val scale by setting("Scale", 0.15f, 0.01f..1f, 0.01f)
3033

3134
override fun ImGuiBuilder.buildLayout() {
32-
windowDrawList.addImage(
33-
texture.id.toLong(),
34-
texture.width.toFloat(),
35-
texture.height.toFloat(),
36-
1f, 0f, 0f, 1f
37-
)
35+
val width = texture.width * scale
36+
val height = texture.height * scale
37+
ImGui.image(texture.id.toLong(), width, height)
3838
}
3939
}

0 commit comments

Comments
 (0)