pebble-dev / RebbleOS

open source operating system for low-power smartwatches
Other
365 stars 38 forks source link

WIP: Porting Pebble UI Examples to RebbleOS (UI ❤) #114

Closed tertty closed 3 years ago

tertty commented 4 years ago

The Then

The goal of this PR is to successfully port and (more importantly) adapt some elements from the pebble-examples GitHub repo, ui-patterns.

The Now (as of 5/18)

Currently, no UI elements are finished but some are in a testable state. All early UI elements have tests in the test app (though whether they're written correctly is yet to be determined...). Code is buggy, style is inconsistent, and comments are sparse.

Customization is a huge part of this goal, why must all checkbox windows be the same? Currently supported functions are listed next to the UI element.

Checkbox Window

image CheckboxWindow *checkbox_window_create(uint16_t max_items, CheckboxWindowCallbacks checkbox_window_callbacks); void checkbox_window_push(CheckboxWindow *checkmate, bool animated); void checkbox_window_pop(CheckboxWindow *checkmate, bool animated);

void checkbox_add_selection(CheckboxWindow *checkmate, char *selection_label); void checkbox_set_selection_colors(CheckboxWindow *checkmate, GColor background, GColor foreground);

Callback function added

Radio Button Window

image RadiobuttonWindow *radiobutton_window_create(uint16_t max_items, RadiobuttonWindowCallbacks radiobutton_window_callbacks); void radio_button_window_push(RadiobuttonWindow *radio_star, bool animated); void radio_button_window_pop(RadiobuttonWindow *radio_star, bool animated);

void radiobutton_add_selection(RadiobuttonWindow *radio_star, char *selection_label); void radiobutton_set_selection_colors(RadiobuttonWindow *radio_star, GColor background, GColor foreground);

Callback function added

Progress Bar Window (Using Progress Layer)

Screen-Recording-2020-03-30-at-1 (2) None yet :(

Dialog Window

Screen-Recording-2020-03-30-at-1 (3) dialogchoice_window_set_message()

Pin Window

image None yet :(

The Future

UI elements to be added:

PR will be updated as major improvements are made.

tertty commented 3 years ago

PR is super out of date/need to be completely reworked due to advancements in project. Closing out 👀