fullbright toggle key

This commit is contained in:
Bixilon 2022-11-08 19:42:51 +01:00
parent 797a293c27
commit 3ae19b2e1d
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 12 additions and 1 deletions

View File

@ -21,7 +21,7 @@ import de.bixilon.minosoft.gui.rendering.world.light.updater.FullbrightLightUpda
import de.bixilon.minosoft.gui.rendering.world.light.updater.LegacyLightmapUpdater
import de.bixilon.minosoft.gui.rendering.world.light.updater.LightmapUpdater
class Lightmap(private val light: RenderLight) {
class Lightmap(light: RenderLight) {
private val profile = light.renderWindow.connection.profiles.rendering
private val buffer = LightmapBuffer(light.renderWindow.renderSystem)
private var updater: LightmapUpdater = FullbrightLightUpdater

View File

@ -41,6 +41,17 @@ class RenderLight(val renderWindow: RenderWindow) {
connection.util.sendDebugMessage("Light recalculated and chunk cache cleared!")
}
}
renderWindow.inputHandler.registerKeyCallback(
"minosoft:toggle_fullbright".toResourceLocation(),
KeyBinding(
KeyActions.MODIFIER to setOf(KeyCodes.KEY_F4),
KeyActions.CHANGE to setOf(KeyCodes.KEY_C),
),
defaultPressed = connection.profiles.rendering.light.fullbright,
) {
connection.profiles.rendering.light.fullbright = it
connection.util.sendDebugMessage("Fullbright: $it")
}
}
fun updateAsync() {