Improve organization of NeatBarLayer struct

This commit is contained in:
2026-07-20 20:19:40 -04:00
parent 147a230c97
commit 70004c432d
2 changed files with 38 additions and 22 deletions
+11 -4
View File
@@ -6,24 +6,31 @@
#include <pebble.h>
typedef struct {
// layerage
struct Window *window;
GRect main_grect;
Layer *main_layer;
BitmapLayer *up_layer;
BitmapLayer *down_layer;
BitmapLayer *select_layer;
// stock cfg/plumbing
ClickConfigProvider click_config_provider;
GColor8 background_color;
uint16_t corner_radius;
uint16_t x_offset;
int8_t spread;
void *context;
// neat_bar exclusives :D
uint16_t bar_corner_radius;
uint16_t bar_x_offset;
int8_t icons_spread;
bool animations_move_on_y_axis;
int8_t animations_move_distance;
uint8_t animations_duration;
// state tracking
bool up_pressed;
bool select_pressed;
bool down_pressed;
void *context;
} NeatBarLayer;
void neat_bar_layer_add_to_window(NeatBarLayer *neat_bar, Window *window);