From b84e1d0e748b4a02bc8752f8fc9eff7f074bff3b Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 20 Oct 2013 12:20:57 +0000 Subject: [PATCH] cmm libs: update git-svn-id: svn://kolibrios.org@4059 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/lib/copyf.h | 3 +++ programs/cmm/lib/list_box.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/programs/cmm/lib/copyf.h b/programs/cmm/lib/copyf.h index dfe971cc80..907fc21458 100644 --- a/programs/cmm/lib/copyf.h +++ b/programs/cmm/lib/copyf.h @@ -18,7 +18,10 @@ if (isdir(from1)) return CopyFolder(from1, in1); else + { + copyf_Draw_Progress(from1+strchr(from1, '/')); return CopyFile(from1, in1); + } } :int CopyFile(dword copy_from3, copy_in3) diff --git a/programs/cmm/lib/list_box.h b/programs/cmm/lib/list_box.h index 3826bac567..e3a43190b2 100644 --- a/programs/cmm/lib/list_box.h +++ b/programs/cmm/lib/list_box.h @@ -6,6 +6,8 @@ struct llist int count, visible, first, current; int current_temp; void ClearList(); + int KeyDown(); + int KeyUp(); void SetSizes(int xx, yy, ww, hh, min_hh, line_hh); int MouseScroll(dword scroll_state); }; @@ -43,4 +45,35 @@ int llist::MouseScroll(dword scroll_state) return 1; } return 0; +} + +int llist::KeyDown() +{ + if (current-first+1=count) return -1; + current++; + } + else + { + if (visible+first>=count) return -1; + first++; + current++; + } + return 1; +} + +int llist::KeyUp() +{ + if (current>first) + { + current--; + } + else + { + if (first==0) return -1; + first--; + current--; + } + return 1; } \ No newline at end of file