downsampling sorta works, ONLY WHEN (width or height % 4) is 0 or 1

This commit is contained in:
minjaesong
2017-07-05 16:03:50 +09:00
parent e54822a7e4
commit 2d5761d66c
16 changed files with 114 additions and 95 deletions

View File

@@ -98,13 +98,13 @@ interface UICanvas {
).roundInt()
Position.RIGHT -> handler!!.posX = Movement.fastPullOut(
handler.openCloseCounter / openCloseTime,
Gdx.graphics.width.toFloat(),
Gdx.graphics.width - handler.UI.width.toFloat()
TerrarumGDX.WIDTH.toFloat(),
TerrarumGDX.WIDTH - handler.UI.width.toFloat()
).roundInt()
Position.BOTTOM -> handler!!.posY = Movement.fastPullOut(
handler.openCloseCounter / openCloseTime,
Gdx.graphics.height.toFloat(),
Gdx.graphics.height - handler.UI.height.toFloat()
TerrarumGDX.HEIGHT.toFloat(),
TerrarumGDX.HEIGHT - handler.UI.height.toFloat()
).roundInt()
}
}
@@ -122,13 +122,13 @@ interface UICanvas {
).roundInt()
Position.RIGHT -> handler!!.posX = Movement.fastPullOut(
handler.openCloseCounter / openCloseTime,
Gdx.graphics.width - handler.UI.width.toFloat(),
Gdx.graphics.width.toFloat()
TerrarumGDX.WIDTH - handler.UI.width.toFloat(),
TerrarumGDX.WIDTH.toFloat()
).roundInt()
Position.BOTTOM -> handler!!.posY = Movement.fastPullOut(
handler.openCloseCounter / openCloseTime,
Gdx.graphics.height - handler.UI.height.toFloat(),
Gdx.graphics.height.toFloat()
TerrarumGDX.HEIGHT - handler.UI.height.toFloat(),
TerrarumGDX.HEIGHT.toFloat()
).roundInt()
}
}
@@ -136,16 +136,16 @@ interface UICanvas {
when (position) {
Position.LEFT -> handler!!.posX = 0
Position.TOP -> handler!!.posY = 0
Position.RIGHT -> handler!!.posX = Gdx.graphics.width - handler.UI.width
Position.BOTTOM -> handler!!.posY = Gdx.graphics.height - handler.UI.height
Position.RIGHT -> handler!!.posX = TerrarumGDX.WIDTH - handler.UI.width
Position.BOTTOM -> handler!!.posY = TerrarumGDX.HEIGHT - handler.UI.height
}
}
fun endClosingPopOut(handler: UIHandler?, position: Position) {
when (position) {
Position.LEFT -> handler!!.posX = -handler.UI.width
Position.TOP -> handler!!.posY = -handler.UI.height
Position.RIGHT -> handler!!.posX = Gdx.graphics.width
Position.BOTTOM -> handler!!.posY = Gdx.graphics.height
Position.RIGHT -> handler!!.posX = TerrarumGDX.WIDTH
Position.BOTTOM -> handler!!.posY = TerrarumGDX.HEIGHT
}
}