File tree Expand file tree Collapse file tree 3 files changed +2
-30
lines changed
common/src/main/kotlin/com/lambda
gui/impl/clickgui/module/setting/settings Expand file tree Collapse file tree 3 files changed +2
-30
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ import com.lambda.config.settings.comparable.EnumSetting.Companion.enumValues
2222import com.lambda.gui.component.core.UIBuilder
2323import com.lambda.gui.component.layout.Layout
2424import com.lambda.util.NamedEnum
25- import com.lambda.gui.impl.clickgui.module.settings.SettingSlider
2625import com.lambda.gui.impl.clickgui.module.setting.SettingSlider
2726import com.lambda.util.math.MathUtils.floorToInt
2827import com.lambda.util.math.transform
Original file line number Diff line number Diff line change 1818package com.lambda.module.hud
1919
2020import com.lambda.context.SafeContext
21- import com.lambda.graphics.renderer.gui.font.FontRenderer
22- import com.lambda.graphics.renderer.gui.font.FontRenderer.drawString
23- import com.lambda.gui.component.core.TextField.Companion.textField
21+ import com.lambda.graphics.renderer.gui.FontRenderer
2422import com.lambda.module.HudModule
2523import com.lambda.module.tag.ModuleTag
2624import com.lambda.threading.runSafe
@@ -39,19 +37,7 @@ object Coordinates : HudModule.Text(
3937 private val showDimension by setting(" Show Dimension" , true )
4038 private val decimals by setting(" Decimals" , 2 , 0 .. 4 , 1 )
4139
42- private val text: String
43- get() = runSafe { " XYZ ${if (showDimension) dimensionName else " " } ${positionForDimension()} " } ? : " "
44-
45- override val height: Double get() = FontRenderer .getHeight()
46- override val width: Double get() = FontRenderer .getWidth(text)
47-
48- init {
49- onRender {
50- runSafe {
51- drawString(text, position)
52- }
53- }
54- }
40+ override fun getText () = runSafe { " XYZ ${if (showDimension) dimensionName else " " } ${positionForDimension()} " } ? : " "
5541
5642 private fun SafeContext.positionForDimension () =
5743 when {
Original file line number Diff line number Diff line change 1717
1818package com.lambda.module.hud
1919
20- import com.lambda.graphics.renderer.gui.font.FontRenderer
21- import com.lambda.graphics.renderer.gui.font.FontRenderer.drawString
2220import com.lambda.module.HudModule
2321import com.lambda.module.tag.ModuleTag
2422import com.lambda.util.Formatting.string
@@ -35,17 +33,6 @@ object TPS : HudModule.Text(
3533 override fun getText () =
3634 " ${format.displayName} : ${format.output().string}${format.unit} "
3735
38- // TODO: Replace by LambdaAtlas height cache and actually build a proper text with highlighted parameters
39-
40- override val height: Double get() = FontRenderer .getHeight()
41- override val width: Double get() = FontRenderer .getWidth(text)
42-
43- init {
44- onRender {
45- drawString(text, position)
46- }
47- }
48-
4936 @Suppress(" unused" )
5037 private enum class TickFormat (
5138 val output : () -> Double ,
You can’t perform that action at this time.
0 commit comments