Allow for X and Y offsets in GUI
These can be used to center a lower resolution theme onto a higher resolution screen. May be useful for Nexus 9 unless or until we decide to do a 1536x2048 theme or on devices like the Moto 360 and LG G Watch R. The build flags will only affect the stock theme. If a custom theme wishes to apply an offset, it can be done by setting tw_x_offset and / or tw_y_offset in the variables section of the XML. Change-Id: I2390769ed861b96a4a3bb8a0f06d9021ec91b6b9
This commit is contained in:
+1
-1
@@ -106,7 +106,7 @@ static void curtainSet()
|
||||
{
|
||||
gr_color(0, 0, 0, 255);
|
||||
gr_fill(0, 0, gr_fb_width(), gr_fb_height());
|
||||
gr_blit(gCurtain, 0, 0, gr_get_width(gCurtain), gr_get_height(gCurtain), 0, 0);
|
||||
gr_blit(gCurtain, 0, 0, gr_get_width(gCurtain), gr_get_height(gCurtain), TW_X_OFFSET, TW_Y_OFFSET);
|
||||
gr_flip();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user