VladimirMarkelov / clui

Command Line User Interface (Console UI inspired by TurboVision)
MIT License
670 stars 50 forks source link

Menu Implementation #137

Open khaf opened 4 years ago

khaf commented 4 years ago

Since menu is not implemented, how would you prefer to implement it?

Should it be implemented from the scratch, or can it be implemented via the primitives that already exist (like modal windows + frames + labels)?

VladimirMarkelov commented 4 years ago

I can think of two ways:

  1. I thought of adding a new attribute for controls: "floating" - this control is always skipped when calculating Window size and other controls postions and it always has absolute screen coordinates. Honestly, up to version 0.3 I had this kind of controls and there was a simple ComboBox implementation using it. But then I redesigned the library and removed this case - it made some things more complicated. Though this way needs another fix: allow a control to draw itself outside parent Window.
  2. Separate modal Window. It can be implemented as a Window with ListBox I think - in this case you get for free OnSelect by mouse and arrow keys processing. Another thing that maybe good to have: dismiss menu-window on mouse-click outside it. It may need some library changes.
khaf commented 4 years ago

I'll do a first try with the already available primitives. We'll solve problems as we go.

jlopezr commented 3 years ago

Hi! Any news on this?

VladimirMarkelov commented 3 years ago

Hi @jlopezr ,

I am sorry saying this, but nothing has changed. For months I have little free time, and there are no PRs as well.

khaf commented 3 years ago

Sorry I got busy and never followed up. Will update if I get to work on it later.