cointop-sh / cointop

A fast and lightweight interactive terminal based UI application for tracking cryptocurrencies 🚀
https://cointop.sh
Apache License 2.0
3.98k stars 311 forks source link

Add basic mouse support - WIP #224

Closed lyricnz closed 2 years ago

lyricnz commented 2 years ago

WIP per #223

lyricnz commented 2 years ago

Demo of mouse-wheel scrolling, and click-to-sort

https://user-images.githubusercontent.com/122371/137238477-01d7ac32-c4c7-4a2f-922f-ce0657052d91.mov

lyricnz commented 2 years ago

Updated demo with status-bar clicks too

https://user-images.githubusercontent.com/122371/137257744-ca3720a3-099f-4207-ae1b-58a5e131ff23.mov

lyricnz commented 2 years ago

@miguelmota From what I understand, modifying vendor/github.com/miguelmota/gocui/gui.go is the wrong way (is overwritten by "go mod vendor"). Does the change need to be submitted in gocui (fork) project?

miguelmota commented 2 years ago

@lyricnz cointop currency uses my fork of gocui which has very minimal changes I think. I can move it over to the cointop org and we can make the changes there, or we can import the fork into pkg/. What do you think? I'm good with either option

simon-anz commented 2 years ago

@lyricnz cointop currency uses my fork of gocui which has very minimal changes I think. I can move it over to the cointop org and we can make the changes there, or we can import the fork into pkg/. What do you think? I'm good with either option

I'd like to port gocui from using termbox to tcell (for more maintained project, better 24-bit support, etc). Perhaps using the compatibility layer. If nobody else uses your fork, it might be easier to do this in /pkg. I've got an open PR #232 that starts this work (with a local hack to /vendor) and includes this (mouse) PR.

FWIW, gocui isn't maintained/updated since 2018, but seems to work OK.

lyricnz commented 2 years ago

I'm going to close this PR, and continue the work over in #232