johnnovak / illwill

A curses inspired simple cross-platform console library for Nim
Do What The F*ck You Want To Public License
398 stars 27 forks source link

Added mouse support for posix and windows #9

Closed enthus1ast closed 4 years ago

enthus1ast commented 4 years ago

Added mouse support for posix and windows. Depending on the terminal all mouse moves; left, middle, right clicks, scroll events, shift and ctrl are reported. fixes #8

johnnovak commented 4 years ago

This is great work, thanks for doing it! 💯 Wunderbar! 😃

It will take me a while to properly review it, I'll finish it by the end of this week. We could refine the Nim style and the examples a little bit and maybe the doco too. But overall it looks very good!

Stay tuned 😎

johnnovak commented 4 years ago

@enthus1ast Just wondering, have you had a chance to look at my comments? No rush though, I'm not going anywhere 😀

enthus1ast commented 4 years ago

@johnnovak yep, will do the changes this weekend!

enthus1ast commented 4 years ago

had no chance yet to finally test the changes on every relevant os. When this is done; merge?

johnnovak commented 4 years ago

@enthus1ast Excellent work! There's just two comments that you haven't addressed yet, otherwise I'm fine to merge it. I'll also test it in the next few days.

johnnovak commented 4 years ago

@enthus1ast I've tested it on Windows and OS X, looks good. I've left two further minor comments on the drawing example. Could you also please get rid of the compiler warnings? Then we're really done & thanks again for the great work! :)

OS X

/Users/johnnovak/dev/jn/illwill-mouse/illwill.nim(253, 5) Hint: 'gLastMouseInfo' is declared but not used [XDeclaredButNotUsed]

Windows

D:\Work\Code\illwill-mouse\illwill.nim(343, 49) Warning: type pragmas follow the type name; this form of writing pragmas is deprecated [Deprecated]
D:\Work\Code\illwill-mouse\illwill.nim(347, 45) Warning: type pragmas follow the type name; this form of writing pragmas is deprecated [Deprecated]
Hint: encodings [Processing]
D:\Work\Code\illwill-mouse\illwill.nim(322, 5) Hint: 'FROM_LEFT_4TH_BUTTON_PRESSED' is declared but not used [XDeclaredButNotUsed]
D:\Work\Code\illwill-mouse\illwill.nim(321, 5) Hint: 'FROM_LEFT_3RD_BUTTON_PRESSED' is declared but not used [XDeclaredButNotUsed]
D:\Work\Code\illwill-mouse\illwill.nim(35, 39) Warning: imported and not used: 'strformat' [UnusedImport]
enthus1ast commented 4 years ago

D:\Work\Code\illwill-mouse\illwill.nim(343, 49) Warning: type pragmas follow the type name; this form of writing pragmas is deprecated [Deprecated]

~no idea how to fix this (or what the problem is)~ , this came straight out of c2nim *shrug*

enthus1ast commented 4 years ago

ok, also fixed the Deprecated warning.