X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Freader%2Ftui%2FTuiReaderMainWindow.java;h=b54d2cb695e45f87baf1ef70f9cf66aa01684a5b;hp=528ee3dc881540505a9c675379071a37e52fadac;hb=11758a0f1c8c84aaba28fea5b7d9baf4c8dc7cbd;hpb=bb6a7669c6c8ac1c2e98a58f0990808d03cb3238 diff --git a/src/be/nikiroo/fanfix/reader/tui/TuiReaderMainWindow.java b/src/be/nikiroo/fanfix/reader/tui/TuiReaderMainWindow.java index 528ee3d..b54d2cb 100644 --- a/src/be/nikiroo/fanfix/reader/tui/TuiReaderMainWindow.java +++ b/src/be/nikiroo/fanfix/reader/tui/TuiReaderMainWindow.java @@ -43,24 +43,28 @@ class TuiReaderMainWindow extends TWindow { this.reader = reader; - maximize(); - listKeys = new ArrayList(); listItems = new ArrayList(); // TODO size + onResize + + + addLabel("Search: ", 5, 3); + addField(15, 3, 5, true); + addLabel("Sort by: ", 5, 1); // -1 = no default index (0 means first,...) 1=height when visible, null // = action + List data = Arrays.asList("(show all)", "Source", "Name", "Author"); + // must be last so to be able to draw over the rest + // TODO: make it so we cannot add manual entries + // TODO: how to select the item via keyboard? why double-click via mouse? addComboBox(15, 1, 12, - Arrays.asList("(show all)", "Source", "Name", "Author"), 0, 1, + data, 0, Math.min(data.size()+1,getHeight()-1-1), null); - addLabel("Search: ", 5, 3); - addField(15, 3, 12, true); - - list = addList(listItems, 0, 5, getWidth(), getHeight(), new TAction() { + list = addList(listItems, 0, 7, getWidth(), getHeight(), new TAction() { @Override public void DO() { MetaData meta = getSelectedMeta();