make stack start at top to prevent scrolling issue

This commit is contained in:
2018-11-25 23:26:23 -05:00
parent 1eefc31cfe
commit dd73965e39
3 changed files with 16 additions and 9 deletions

View File

@@ -23,10 +23,14 @@ class EditorView : View("Befide") {
} }
init { init {
codeView.src = """ 2>:3g" "-!v\ g30 < codeView.src = """v ;11101010;
|!`"O":+1_:.:03p>03g+:"O"`| >>>>>>>>>>>>>55+0g68*-90g68*-2*+80g68*-4*+70g68*-8*+v
@ ^ p3\" ":< @.+***288-*86g03+**88-*86g04+**84-*86g05+**44-*86g06<"""
2 234567890123456789012345678901234567890123456789012345678901234567890123456789"""
// codeView.src = """ 2>:3g" "-!v\ g30 <
// |!`"O":+1_:.:03p>03g+:"O"`|
// @ ^ p3\" ":<
//2 234567890123456789012345678901234567890123456789012345678901234567890123456789"""
// codeView.src = """"hello world",,,,,,,,,,,@""" // codeView.src = """"hello world",,,,,,,,,,,@"""
} }

View File

@@ -19,9 +19,11 @@ class StackView(val interp: Interpreter) : View() {
textarea(charOutProperty) { textarea(charOutProperty) {
maxWidth = 1.0 maxWidth = 1.0
paddingHorizontal = 1 paddingHorizontal = 1
prefRowCount = interp.funge.height
isEditable = false isEditable = false
} }
textarea(longOutProperty) { textarea(longOutProperty) {
prefRowCount = interp.funge.height
prefWidth = 90.0 prefWidth = 90.0
isEditable = false isEditable = false
} }
@@ -31,7 +33,7 @@ class StackView(val interp: Interpreter) : View() {
return interp.stack.takeLast(interp.funge.height) return interp.stack.takeLast(interp.funge.height)
.map(mapping) .map(mapping)
.padEnd(interp.funge.height, "") .padEnd(interp.funge.height, "")
.reversed() // .reversed()
.joinToString("\n") .joinToString("\n")
} }

View File

@@ -6,6 +6,7 @@
.code, .text-area { .code, .text-area {
-fx-font-family: Consolas, monospace; -fx-font-family: Consolas, monospace;
-fx-text-fill: black; -fx-text-fill: black;
-fx-font-size: 18;
} }
.code-view, .text-area { .code-view, .text-area {