Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legacy: text-based interface #3

Open
CRImier opened this issue Apr 30, 2017 · 5 comments

Comments

Projects
None yet
1 participant
@CRImier
Copy link

commented Apr 30, 2017

As pyLCI was character display-based, it mainly operated with text. Right now, ZeroPhone uses a display which actually allows setting individual pixels, and there's much more screen real estate - but this fork of pyLCI still uses text in UI elements, using the display_data function which is limited to text. The goal of this issue is teaching UI elements to work with PIL canvas (used by luma.oled) and making simple canvas-based screen output functions for currently available UI elements.

As a bonus, it would be nice to be able to use a fallback to text-based interface in most used and least ZeroPhone-specific UI elements, for backwards compatibility.

  • UI elements' graphical representation is now controlled by the UI elements themselves
    • BaseListUIElement-based elements
    • DialogBox
    • CharArrowKeyInput
    • NumpadCharInput
    • IntegerAdjustInput
  • Refresher now can output images
  • Individual UI elements and UI element groups can be assigned different views, using a configuration system
    • BaseListUIElement-based elements
    • DialogBox
    • CharArrowKeyInput
    • NumpadCharInput
    • IntegerAdjustInput
  • Documenting views, making them more modifiable
  • Moving scrolling into a mixin (right now, it's still in the UI elementlogic&view code)
  • Developing a Printer-type UI element that would use a larger font and be user-friendly
@CRImier

This comment has been minimized.

Copy link
Author

commented May 14, 2017

Started work in prettier_ui branch, moving UI element views into UI elements themselves.

@CRImier

This comment has been minimized.

Copy link
Author

commented Aug 14, 2017

Work moved further, I split BaseListUIElement into logic and view objects and added a sample view for BaseListUIElement which has fonts and will likely get some more graphical elements. There now needs some kind of design decision - pick fonts, decide on what's going to be the default view and whether there'll be adjustability of menu views per each menu (and what level of adjustability there will be).

Also, the "scrolling" part might need to be split into another View object, to act as a mixin of sorts. Not to mention that the scrolling won't work that well with non-monospaced fonts, and there's no automatic character size determination yet, so font sizes are hardcoded for now - not that good for adjustability. I'm thinking about "pre-define some character size/screen line count combos and maybe let the user pick a font".

@CRImier

This comment has been minimized.

Copy link
Author

commented Nov 13, 2017

prettier_ui branch seems to be usable now, merged it into the master branch.

This was referenced Dec 25, 2017

@CRImier

This comment has been minimized.

Copy link
Author

commented Jan 6, 2018

#76 has brought us close to the goal, with BaseListUIElements (Menus, Checkboxes etc.) now sporting a new cursor, and DialogBox being more readable. Also, CharArrowKeysInput elements now have graphical rendering, too - it doesn't look any different from character-based rendering, but that's only until somebody figures out how to make it better.

@CRImier

This comment has been minimized.

Copy link
Author

commented Jan 6, 2019

Now there's BaseViewMixin and BaseView (#102 , currently in ofono_bridge) that help to easily port UI elements to use views and the view config file, with only a few additions to the code. We still need to add graphical views to UI elements, but we no longer need to copypaste code for that to happen - now it's easy to add new view and UI elements with view-driven representations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.