-
Notifications
You must be signed in to change notification settings - Fork 50
Initial Snowy, Tintin, and Chalk(?) support for About window #82
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
Changes from 1 commit
6054e14
298b239
98f369c
2dc6324
6767af4
5115aae
ad22f7b
3261de7
ece5963
0669fec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,10 @@ static Window *s_about_window; | |
| static Layer *s_aboutCanvas_layer; | ||
| static ScrollLayer *s_about_scroll; | ||
| static void about_update_proc(Layer *layer, GContext *nGContext); | ||
| static GBitmap *logo_color; | ||
| static GBitmap *rocket_color; | ||
| static GBitmap *logo_bw; | ||
| static GBitmap *rocket_color; | ||
|
|
||
| StatusBarLayer *status_bar; | ||
|
|
||
|
|
@@ -184,6 +188,15 @@ static void about_window_load(Window *window) | |
|
|
||
| layer_add_child(window_layer, scroll_layer_get_layer(s_about_scroll)); | ||
| layer_add_child(window_layer, status_bar_layer_get_layer(status_bar)); | ||
|
|
||
| #ifdef PBL_BW | ||
| logo_bw = gbitmap_create_with_resource(RESOURCE_ID_REBBLE_LOGO_BW); | ||
| //TODO: rocket_bw = | ||
| #else | ||
| logo_color = gbitmap_create_with_resource(RESOURCE_ID_REBBLE_LOGO_DARK); | ||
| rocket_color = gbitmap_create_with_resource(RESOURCE_ID_TO_MOON); | ||
| #endif | ||
|
|
||
| } | ||
|
|
||
| static void about_update_proc(Layer *layer, GContext *nGContext) | ||
|
|
@@ -207,18 +220,20 @@ static void about_update_proc(Layer *layer, GContext *nGContext) | |
| GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, 0); | ||
|
|
||
| #ifdef PBL_BW | ||
| graphics_draw_bitmap_in_rect(nGContext, gbitmap_create_with_resource(RESOURCE_ID_REBBLE_LOGO_BW), GRect((bounds.size.w/2)-17, (bounds.size.h/2)-63, 34, 53)); | ||
| graphics_draw_bitmap_in_rect(nGContext, logo_bw, GRect((bounds.size.w/2)-17, (bounds.size.h/2)-63, 34, 53)); | ||
| //TODO: Get black and white rocket bitmap for Classic | ||
| //graphics_draw_bitmap_in_rect(nGContext, gbitmap_create_with_resource(RESOURCE_ID_TO_MOON_BW), GRect((bounds.size.w/2)-8, (bounds.size.h/2)+60, 19, 19)); | ||
| #else | ||
| graphics_draw_bitmap_in_rect(nGContext, gbitmap_create_with_resource(RESOURCE_ID_REBBLE_LOGO_DARK), GRect((bounds.size.w/2)-17, (bounds.size.h/2)-63, 34, 53)); | ||
| graphics_draw_bitmap_in_rect(nGContext, gbitmap_create_with_resource(RESOURCE_ID_TO_MOON), GRect((bounds.size.w/2)-8, (bounds.size.h/2)+60, 19, 19)); | ||
| graphics_draw_bitmap_in_rect(nGContext, logo_color, GRect((bounds.size.w/2)-17, (bounds.size.h/2)-63, 34, 53)); | ||
| graphics_draw_bitmap_in_rect(nGContext, rocket_color, GRect((bounds.size.w/2)-8, (bounds.size.h/2)+60, 19, 19)); | ||
| #endif | ||
| } | ||
|
|
||
| static void about_window_unload(Window *window) | ||
| { | ||
| scroll_layer_destroy(s_about_scroll); | ||
| gbitmap_destroy(logo_color); | ||
|
||
| gbitmap_destroy(rocket_color); | ||
| } | ||
|
|
||
| void systemapp_init(void) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.