From 0861d62ac01062a3cd20624cdd6a826df284695e Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Wed, 28 Jun 2017 20:57:08 +0200 Subject: [PATCH] Fix TUI << < > >> buttons mouse clicking --- libs/jexer-0.0.4-sources.patch.jar | Bin 23536 -> 30665 bytes .../fanfix/reader/TuiReaderStoryWindow.java | 27 +++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/libs/jexer-0.0.4-sources.patch.jar b/libs/jexer-0.0.4-sources.patch.jar index 0816729da0f14e142a188189690ed56bd3010058..0ad0d46779d857bc39057433844ec01f50e3b107 100644 GIT binary patch delta 10195 zcmZ{~Q*B_59@}hqqsz2>uNc$#;EYDJ@2bw0lL{W-WT(d$*J7oJe);1`VLx7TC@zi%>FMHs_ z2JI?ygy{((fByMesO2S3?B64AynwcERMMg>^4$J?`cF^MBr*^yR42;)j1}4@!=Vk= z{d>lo3X5b8f-BoMOiKbczsvi(UX9In*J2?FvM z6|6G2P_2en3qq+%6~exS$|Mb(X2r8Ch@!tC=;?Ub&UpbZsLb>Lj^k^$lR|OdbZpwl zgWp;LAl{NU5@b_Zb|x_WLlmBQ#(9yD9T-{~2aOd%LXQKlZCu(2iF|t5`(%Y~(*b}@VF|viwxwD%lUi<)M zS`(5uj9aKM0cUG-kZu9WtNMuGwX)J*w#z)^U!iNQ+pTD!YmrGJv9yb&F<=WGz8+#v zT6Y)zPJHDzl_I#qIg6yQQwFw_CjM ziU5k{g!D-nJKViNL(rIuTpsh;+X~mt{^b>V5a;yoi}ok*jiGvN9eGtP5x_+A(W-xj zWdiZ4B{(4=UOVq7kzW3MACBw8d>}d*E#5LDaFN8^$AWOQ>RC(JHx0c^^x?fXa>XMP zmS0K;J&Br0mJw3+XgnWgE$rG9QXb}lnFBh}K^xWWPW;SzMUyBgFCMj*AlQlA9si+# z7o@dmP&Fm^gXV%E8{AYZ5Z>{liDl{hz9IKeNX)49q8rXQ+rPjbuR>x#R)jL2L%7Hx zi6Z~S&0j+ylx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@|RYdqn;3|K=tCvPB0<~t$d~h>R=0$uVD20 zI2q^p?L~^eJS&jp8-e>N5SI6bi9a82?#-O^7L-oSy9MG)YtP$$;B}XZwe=kvwP+P= z*(uJOPG&9!!3oAOGYfV$EDbjPckvMyd&2FlAzahLegpmn-J?QO| ztzhXQe`Gtd|DwQ!&n4|c98=BH03SKVnp?~JDX`0?Vj&gsly6>&$33f8j|a|s4CJaR zf2mY`=G!gyE*<$o_+#JEn~v}HuE44*Lk}L%n^G28iB@?Usz+=z3iK6IBhxHH>l(=O z`Bx1%<3AHv2;)x}h5Zvr8fgI@NyePy(3`8we?k88*nHDskF=b`AeY$O72L`%s#|sE zNNoyJCqO#Hm7G8Wbc`$37L}Ht(n;jw3gx>n;x%GKYV%8;X%ecZJR~aPjCJHND=Fh+ zt{KCb^n%+!AtKYxHFI`(>=sOB=@UB_ok7U8GbkD*Z=MTdB-wG#E_DQ1W9#R zP;JPh{0AGeSSFDXYJZmqb}f|KQfQ#S7nF)3kAuGWx#)--`(P%hEuud zh)>7tsKc1OPt}wE7~%k?)p&^iXt1t|4r1l+M9OfErMULAjfLUG08JZCLD*Sv3feD3 zzZiY&Z`G=LnegG{v+`Y{7*kQ0+)DBuZfPP5003Pl000mGBme*a00000Ab_-iFE;=H zYGrt3axYX=Wq5QhYGHO^3IHGg000000RR{P0I>~LF!0g=0I>~LF!0g=0I>~LFq2Go aEdqZ+lY4hS4g~-O0IUH304`bp0000OD$Wi7 diff --git a/src/be/nikiroo/fanfix/reader/TuiReaderStoryWindow.java b/src/be/nikiroo/fanfix/reader/TuiReaderStoryWindow.java index 9613e632..c942624b 100644 --- a/src/be/nikiroo/fanfix/reader/TuiReaderStoryWindow.java +++ b/src/be/nikiroo/fanfix/reader/TuiReaderStoryWindow.java @@ -3,7 +3,14 @@ package be.nikiroo.fanfix.reader; import java.util.ArrayList; import java.util.List; -import jexer.*; +import jexer.TAction; +import jexer.TApplication; +import jexer.TButton; +import jexer.TCommand; +import jexer.TKeypress; +import jexer.TLabel; +import jexer.TText2; +import jexer.TWindow; import jexer.event.TResizeEvent; import be.nikiroo.fanfix.Instance; import be.nikiroo.fanfix.data.Chapter; @@ -14,7 +21,7 @@ import be.nikiroo.fanfix.data.Story; public class TuiReaderStoryWindow extends TWindow { private MetaData meta; private Story story; - private TText textField; + private TText2 textField; private int chapter = -2; private List navigationButtons; private TLabel chapterName; @@ -29,8 +36,7 @@ public class TuiReaderStoryWindow extends TWindow { // TODO: show all meta info before? - // -2 because 0-based, 2 for borders, -1 to hide the HScroll - textField = addText("", 0, 0, getWidth() - 2, getHeight() - 2); + textField = new TText2(this, "", 0, 0, getWidth() - 2, getHeight() - 2); statusBar = newStatusBar(desc(meta)); statusBar.addShortcutKeypress(TKeypress.kbF10, TCommand.cmExit, "Exit"); @@ -40,28 +46,29 @@ public class TuiReaderStoryWindow extends TWindow { // -3 because 0-based and 2 for borders int row = getHeight() - 3; - navigationButtons.add(addButton("<<", 0, row, new TAction() { + addButton(" ", 0, row, null); // for bg colour when << button is pressed + navigationButtons.add(addButton("<< ", 0, row, new TAction() { public void DO() { setChapter(0); } })); - navigationButtons.add(addButton("<", 3, row, new TAction() { + navigationButtons.add(addButton("< ", 4, row, new TAction() { public void DO() { setChapter(TuiReaderStoryWindow.this.chapter - 1); } })); - navigationButtons.add(addButton(">", 5, row, new TAction() { + navigationButtons.add(addButton("> ", 7, row, new TAction() { public void DO() { setChapter(TuiReaderStoryWindow.this.chapter + 1); } })); - navigationButtons.add(addButton(">>", 7, row, new TAction() { + navigationButtons.add(addButton(">> ", 10, row, new TAction() { public void DO() { setChapter(getStory().getChapters().size()); } })); - chapterName = addLabel("", 11, row); + chapterName = addLabel("", 14, row); chapterName.setWidth(getWidth() - 10); setChapter(chapter); } @@ -71,7 +78,7 @@ public class TuiReaderStoryWindow extends TWindow { super.onResize(resize); // Resize the text field - textField.setWidth(resize.getWidth()); + textField.setWidth(resize.getWidth() - 2); textField.setHeight(resize.getHeight() - 2); textField.reflow(); -- 2.27.0