From: Niki Roo Date: Fri, 30 Jun 2017 13:20:36 +0000 (+0200) Subject: TUI: start each chapter on top of text X-Git-Tag: fanfix-swing-0.0.1~12^2~454 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=f63c426775be9ab82d893c90993d46b375d115ff;p=fanfix-swing.git TUI: start each chapter on top of text --- diff --git a/libs/jexer-0.0.4-sources.patch.jar b/libs/jexer-0.0.4-sources.patch.jar index 05004dd1..5b1539cd 100644 Binary files a/libs/jexer-0.0.4-sources.patch.jar and b/libs/jexer-0.0.4-sources.patch.jar differ diff --git a/src/be/nikiroo/fanfix/reader/TuiReaderStoryWindow.java b/src/be/nikiroo/fanfix/reader/TuiReaderStoryWindow.java index ce4c58ab..7eb592fd 100644 --- a/src/be/nikiroo/fanfix/reader/TuiReaderStoryWindow.java +++ b/src/be/nikiroo/fanfix/reader/TuiReaderStoryWindow.java @@ -9,7 +9,7 @@ import jexer.TButton; import jexer.TCommand; import jexer.TKeypress; import jexer.TLabel; -import jexer.TText2; +import jexer.TText; import jexer.TWindow; import jexer.event.TResizeEvent; import be.nikiroo.fanfix.Instance; @@ -21,7 +21,7 @@ import be.nikiroo.fanfix.data.Story; public class TuiReaderStoryWindow extends TWindow { private MetaData meta; private Story story; - private TText2 textField; + private TText textField; private int chapter = -2; private List navigationButtons; private TLabel chapterName; @@ -36,7 +36,7 @@ public class TuiReaderStoryWindow extends TWindow { // TODO: show all meta info before? - textField = new TText2(this, "", 0, 0, getWidth() - 2, getHeight() - 2); + textField = new TText(this, "", 0, 0, getWidth() - 2, getHeight() - 2); statusBar = newStatusBar(desc(meta)); statusBar.addShortcutKeypress(TKeypress.kbF10, TCommand.cmExit, "Exit"); @@ -150,6 +150,7 @@ public class TuiReaderStoryWindow extends TWindow { } textField.setText(builder.toString()); textField.reflow(); + textField.toTop(); } }