Skip to content

Commit

Permalink
Fixed DVD speed setting
Browse files Browse the repository at this point in the history
  • Loading branch information
odtheking committed Nov 30, 2024
1 parent d80c201 commit 91c37d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ object GhostBlocks : Module(
)


private val toggleKeybind: Keybinding by KeybindSetting("Toggle Module", Keyboard.KEY_NONE, description = "Keybind to toggle the module on/ off.").onPress {
private val toggleKeybind: Keybinding by KeybindSetting("Toggle Module", Keyboard.KEY_NONE, description = "Keybind to toggle the module on/off.").onPress {
this.onKeybind()
}
}
11 changes: 8 additions & 3 deletions src/main/kotlin/me/odinmain/features/impl/render/DVD.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,14 @@ object DVD : Module(
super.onEnable()
}

private var dx = speed
private var dy = speed
init {
execute( { speed * -10L } ) {
updateDVD()
}
}

private var dx = 1
private var dy = 1

private var x = Display.getWidth() / 2
private var y = Display.getHeight() / 2
Expand All @@ -54,7 +60,6 @@ object DVD : Module(
@SubscribeEvent
fun onRenderOverlay(event: RenderGameOverlayEvent.Post) {
if (event.type != RenderGameOverlayEvent.ElementType.ALL) return
updateDVD()
roundedRectangle(x, y, boxWidth, boxHeight, color, if (roundedCorners) 12f else 0f)
mcText(text, x + boxWidth / 2, y + boxHeight / 2 - getMCTextHeight() * textScale / 2 , textScale, color, true)
Color.WHITE.bind()
Expand Down

0 comments on commit 91c37d2

Please sign in to comment.