Add comments about sizing widgets and text
This commit is contained in:
@@ -52,12 +52,14 @@ class FirstScreen : KtxScreen {
|
||||
table.setFillParent(true)
|
||||
table.debug = true
|
||||
|
||||
label.setFontScale(5f)
|
||||
label.wrap = false
|
||||
label.setFontScale(5f) // Label text size must be done through setFontScale(f). Maybe we can do like this cell's width / 1080->? Or whatever would equal 1 on the dev machine
|
||||
table.add(label)
|
||||
table.getCell<Label>(label).width(1200f).height(400f) // Widget sizes are meant to be controlled through their parent like we do here
|
||||
|
||||
table.row()
|
||||
textButton.label.fontScaleX = 10f
|
||||
table.add(textButton)
|
||||
table.getCell<TextButton>(textButton).width(100f).height(600f)
|
||||
}
|
||||
|
||||
override fun render(delta: Float) {
|
||||
|
||||
Reference in New Issue
Block a user