From 8578b8120d01492e164a07e09e66406accb52405 Mon Sep 17 00:00:00 2001 From: kdh8219 Date: Sun, 22 Nov 2026 12:06:52 +0900 Subject: [PATCH] [breaking] Implement mod name and version for watermark hud module. This version ignores the scale setting before. --- .../lambda/module/modules/hud/Watermark.kt | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/com/lambda/module/modules/hud/Watermark.kt b/src/main/kotlin/com/lambda/module/modules/hud/Watermark.kt index c932d1428..3882f7bda 100644 --- a/src/main/kotlin/com/lambda/module/modules/hud/Watermark.kt +++ b/src/main/kotlin/com/lambda/module/modules/hud/Watermark.kt @@ -17,6 +17,7 @@ package com.lambda.module.modules.hud +import com.lambda.Lambda import com.lambda.graphics.texture.TextureOwner.upload import com.lambda.gui.dsl.ImGuiBuilder import com.lambda.imgui.ImGui @@ -30,11 +31,22 @@ object Watermark : HudModule( enabledByDefault = true, ) { private val texture = upload("textures/lambda.png") - private val scale by setting("Scale", 0.15f, 0.01f..1f, 0.01f) + private val showModName by setting("Show name of the mod", true) + private val showVersion by setting("Show version of the client", false) override fun ImGuiBuilder.buildLayout() { - val width = texture.width * scale - val height = texture.height * scale - ImGui.image(texture.id.toLong(), width, height) + val height = ImGui.getTextLineHeight()1 + + val imageSizeX = texture.width * (height/texture.height) + ImGui.image(texture.id.toLong(), imageSizeX, height) + + if (showModName){ + sameLine() + text(Lambda.MOD_NAME) + } + if (showVersion){ + sameLine() + text(Lambda.VERSION) + } } }