Giter Site home page Giter Site logo

Comments (7)

okbob avatar okbob commented on July 17, 2024

Maybe I understand. Currently ncurses-st-menu doesn't share any logic with application, and implementation of check boxes or options are implemented outside like in post_menu https://github.com/okbob/pspg/blob/master/src/menu.c. It is designed to be minimalistic.

Probably it should not be too hard to implement new option ST_MENU_OPTION_MARKED_REF and function st_menu_set_option_ref(menu, cmd_BoldLabelsToggle, ST_MENU_OPTION_MARKED_REF, int *ref);

I have little bit problem with triple state values - because for every state I have to know drawing style.

from ncurses-st-menu.

GitMensch avatar GitMensch commented on July 17, 2024

Probably it should not be too hard to implement new option ST_MENU_OPTION_MARKED_REF and function st_menu_set_option_ref(menu, cmd_BoldLabelsToggle, ST_MENU_OPTION_MARKED_REF, int *ref);

Sounds very nice!

I have little bit problem with triple state values - because for every state I have to know drawing style.

For option fields the triple state would just mean to draw no option as chosen (I suggest to always allow this initially and optionally provide a way to toggle to the third state by choosing the the chosen option again).

For checkboxes: yes, you'd need to know the drawing style, the default could be [x] for marked, [ ] for unchecked and something like[o] for triple state.

Thank you for considering this FR.

from ncurses-st-menu.

okbob avatar okbob commented on July 17, 2024

Currently checks or switch are printed with same style with "✔". Because it is a menu, I am not sure if some wider image is good idea. I try to keep st-menu be minimalistic with very small overhead. Used symbol like "✔" can be changed by style configuration, but I prefer one char only - it can be UNICODE wide char, but only one char.

from ncurses-st-menu.

okbob avatar okbob commented on July 17, 2024

Snímek z 2020-02-26 16-41-30
you can look on branch https://github.com/okbob/ncurses-st-menu/tree/external_states

Snímek z 2020-02-26 16-37-07

from ncurses-st-menu.

okbob avatar okbob commented on July 17, 2024

I changed default symbols in style file - the boxes are not well readable.

from ncurses-st-menu.

GitMensch avatar GitMensch commented on July 17, 2024

Looks nice; a little space between those options and its text would be good.
I guess the options can have a shortcut, too.

I suggest to add the new control types in the demo + screenshots (ideally also for the popup).

from ncurses-st-menu.

okbob avatar okbob commented on July 17, 2024

from ncurses-st-menu.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.