Main menu buttons no longer require scrolling

This commit is contained in:
Yair Morgenstern 2020-07-15 21:52:42 +03:00
parent a0daa6be4c
commit 6309bc2fba
5 changed files with 3 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 468 KiB

After

Width:  |  Height:  |  Size: 468 KiB

View file

@ -27,7 +27,7 @@ class MainMenuScreen: CameraStageBaseScreen() {
private val backgroundTable = Table().apply { background=ImageGetter.getBackground(Color.WHITE) } private val backgroundTable = Table().apply { background=ImageGetter.getBackground(Color.WHITE) }
private fun getTableBlock(text: String, icon: String, function: () -> Unit): Table { private fun getTableBlock(text: String, icon: String, function: () -> Unit): Table {
val table = Table().pad(30f) val table = Table().pad(15f, 30f, 15f, 30f)
table.background = ImageGetter.getRoundedEdgeTableBackground(ImageGetter.getBlue()) table.background = ImageGetter.getRoundedEdgeTableBackground(ImageGetter.getBlue())
table.add(ImageGetter.getImage(icon)).size(50f).padRight(30f) table.add(ImageGetter.getImage(icon)).size(50f).padRight(30f)
table.add(text.toLabel().setFontSize(30)).minWidth(200f) table.add(text.toLabel().setFontSize(30)).minWidth(200f)
@ -109,7 +109,7 @@ class MainMenuScreen: CameraStageBaseScreen() {
table.pack() table.pack()
val scroll = ScrollPane(table) val scroll = ScrollPane(table)
scroll.setSize(table.width, stage.height * 0.8f) scroll.setSize(table.width, stage.height * 0.9f)
scroll.center(stage) scroll.center(stage)
scroll.setOverscroll(false, false) scroll.setOverscroll(false, false)
stage.addActor(scroll) stage.addActor(scroll)