Skip to content

Commit d76c471

Browse files
committed
Settings font scaling
1 parent d1ba8a0 commit d76c471

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

common/src/main/kotlin/com/lambda/graphics/renderer/gui/font/FontRenderer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class FontRenderer(
1818
) {
1919
private val vao = VAO(VertexMode.TRIANGLES, VertexAttrib.Group.FONT)
2020

21-
private val scaleMultiplier = 1.0
21+
var scaleMultiplier = 1.0
2222

2323
/**
2424
* Builds the vertex array for rendering the text.

common/src/main/kotlin/com/lambda/gui/impl/clickgui/buttons/ModuleButton.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ class ModuleButton(
9696
is GuiEvent.Render -> {
9797
super.onEvent(e)
9898

99+
settingsRenderer.font.scaleMultiplier = ClickGui.settingsFontScale
100+
99101
// Shadow
100102
renderer.filled.apply {
101103
val rect = Rect(

common/src/main/kotlin/com/lambda/module/modules/client/ClickGui.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ object ClickGui : Module(
2121
val windowPadding by setting("Window Padding", 2.0, 0.0..10.0, 0.1)
2222
val buttonHeight by setting("Button Height", 11.0, 8.0..20.0, 0.1)
2323
val buttonStep by setting("Button Step", 0.0, 0.0..5.0, 0.1)
24+
val settingsFontScale by setting("Settings Font Scale", 0.92, 0.5..1.0, 0.01)
2425

2526
// Animation
2627
val openSpeed by setting("Open Speed", 0.5, 0.1..1.0, 0.01)

0 commit comments

Comments
 (0)