mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-13 09:26:11 -04:00
config: make hud scale a float
This commit is contained in:
parent
9905173e25
commit
b2f6e310a0
@ -13,8 +13,6 @@
|
||||
|
||||
package de.bixilon.minosoft.config.config.game
|
||||
|
||||
import de.bixilon.minosoft.gui.rendering.hud.HUDScale
|
||||
|
||||
data class HUDGameConfig(
|
||||
var scale: HUDScale = HUDScale.MEDIUM,
|
||||
var scale: Float = 2.0f,
|
||||
)
|
||||
|
@ -182,7 +182,7 @@ class HUDRenderer(val connection: PlayConnection, val renderWindow: RenderWindow
|
||||
|
||||
if (forcePrepare || needsUpdate) {
|
||||
for ((elementProperties, hudElement) in enabledHUDElement.values) {
|
||||
val realScaleFactor = elementProperties.scale * Minosoft.getConfig().config.game.hud.scale.scale
|
||||
val realScaleFactor = elementProperties.scale * Minosoft.getConfig().config.game.hud.scale
|
||||
val realSize = Vec2i(hudElement.layout.fakeX ?: hudElement.layout.size.x, hudElement.layout.fakeY ?: hudElement.layout.size.y) * realScaleFactor
|
||||
|
||||
val elementStart = getRealPosition(realSize, elementProperties, renderWindow.screenDimensions)
|
||||
|
@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program.If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.gui.rendering.hud
|
||||
|
||||
enum class HUDScale(val scale: Float) {
|
||||
TINY(1.0f),
|
||||
MEDIUM(2.0f),
|
||||
LARGE(3.0f),
|
||||
SENIOR(4.0f),
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user