Changeset 1352 for trunk/core/gui_space.c
- Timestamp:
- 10/02/11 02:11:23 (20 months ago)
- File:
-
- 1 edited
-
trunk/core/gui_space.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/gui_space.c
r1299 r1352 98 98 99 99 space_color(); 100 101 #if CAM_USE_COLORED_ICONS 102 103 draw_get_icon_colors(); 104 105 color cl1 = icon_green[1]; 106 color cl2 = icon_green[0]; 107 if (((conf.space_warn_type == 0) && (perc <= conf.space_perc_warn)) || 108 ((conf.space_warn_type == 1) && (GetFreeCardSpaceKb() <= conf.space_mb_warn*1024))) 109 { 110 cl1 = icon_red[1]; 111 cl2 = icon_red[0]; 112 } 113 114 //icon 115 draw_hline(xx, yy, 30, icon_grey[2]); 116 draw_vline(xx, yy, 12, icon_grey[2]); 117 draw_vline(xx+31, yy, 18, icon_grey[0]); 118 draw_line(xx+1, yy+13, xx+5, yy+17, icon_grey[0]); 119 draw_hline(xx+6, yy+18, 24, icon_grey[0]); 120 121 draw_filled_rect(xx+1, yy+1, xx+30, yy+13, MAKE_COLOR(icon_grey[1], icon_grey[1])); 122 draw_filled_rect(xx+5, yy+14, xx+30, yy+17, MAKE_COLOR(icon_grey[1], icon_grey[1])); 123 draw_filled_rect(xx+3, yy+14, xx+6, yy+15, MAKE_COLOR(icon_grey[1], icon_grey[1])); 124 125 draw_filled_rect(xx+2, yy+2, xx+6, yy+4, MAKE_COLOR(icon_yellow[0], icon_yellow[0])); 126 draw_filled_rect(xx+2, yy+6, xx+6, yy+7, MAKE_COLOR(icon_yellow[0], icon_yellow[0])); 127 draw_filled_rect(xx+2, yy+9, xx+6, yy+10, MAKE_COLOR(icon_yellow[0], icon_yellow[0])); 128 draw_filled_rect(xx+2, yy+12, xx+6, yy+13, MAKE_COLOR(icon_yellow[0], icon_yellow[0])); 129 draw_filled_rect(xx+5, yy+15, xx+9, yy+16, MAKE_COLOR(icon_yellow[0], icon_yellow[0])); 130 131 draw_hline(xx+8, yy, 2, COLOR_TRANSPARENT); 132 draw_hline(xx+11, yy, 3, icon_grey[0]); 133 draw_hline(xx+11, yy+18, 2, COLOR_TRANSPARENT); 134 135 //fill icon 136 draw_rect(xx+9, yy+4, xx+28, yy+13, cl1); 137 draw_filled_rect(xx+27-(17*perc/100), yy+5, xx+27, yy+12, MAKE_COLOR(cl2, cl2)); 138 139 #else 100 140 101 141 #define LE 23 … … 103 143 104 144 draw_hline(xx+5, yy, LE-5, COLOR_BLACK); // outer top 105 draw_hline(xx+6, yy+1, LE-7, MAKE_COLOR(cl, cl));// inner top145 draw_hline(xx+6, yy+1, LE-7, cl); // inner top 106 146 draw_vline(xx, yy+5, WI-5, COLOR_BLACK); // outer left 107 draw_vline(xx+1, yy+6, WI-7, MAKE_COLOR(cl, cl));// inner left147 draw_vline(xx+1, yy+6, WI-7, cl); // inner left 108 148 draw_hline(xx, yy+WI, LE, COLOR_BLACK); // outer bottom 109 draw_hline(xx+1, yy+WI-1, LE-2, MAKE_COLOR(cl, cl));// inner bottom149 draw_hline(xx+1, yy+WI-1, LE-2, cl); // inner bottom 110 150 draw_vline(xx+LE, yy, WI, COLOR_BLACK); // outer right 111 draw_vline(xx+LE-1, yy+1, WI-2, MAKE_COLOR(cl, cl));// inner right112 draw_line(xx+5, yy, xx, yy+5, COLOR_BLACK);// edge113 draw_line(xx+5, yy+1, xx+1, yy+5, MAKE_COLOR(cl, cl));// edge114 draw_line(xx+6, yy+1, xx+1, yy+6, MAKE_COLOR(cl, cl));// edge151 draw_vline(xx+LE-1, yy+1, WI-2, cl); // inner right 152 draw_line(xx+5, yy, xx, yy+5, COLOR_BLACK); // edge 153 draw_line(xx+5, yy+1, xx+1, yy+5, cl); // edge 154 draw_line(xx+6, yy+1, xx+1, yy+6, cl); // edge 115 155 116 156 // memory fill 117 157 x = LE - (perc*(LE-3)/100) - 2; 118 158 if (x>5) draw_hline(xx+6, yy+2, x-6, COLOR_BLACK); 119 if (x>2) draw_hline(xx+x+1, yy+2, LE-x-3, MAKE_COLOR(cl, cl));120 else draw_hline(xx+4, yy+2, LE-6, MAKE_COLOR(cl, cl));121 for(i=3; i<7; i++) { // /--------------|122 if (x>7-i) draw_pixel(xx+8-i, yy+i, COLOR_BLACK); // / 1st for loop |123 if (x>7-i) draw_pixel(xx+x, yy+i, COLOR_BLACK); // /__________________|124 draw_hline(xx+x+1, yy+i, LE-x-3, MAKE_COLOR(cl, cl));// | |125 } // | 2nd for loop |126 for(i=7; i<WI-2; i++) { // | |127 if (x>1) draw_pixel(xx+2, yy+i,COLOR_BLACK); // |-------------------|128 if (x>1) draw_pixel(xx+x, yy+i,COLOR_BLACK);129 draw_hline(xx+x+1, yy+i, LE-x-3, MAKE_COLOR(cl, cl));159 if (x>2) draw_hline(xx+x+1, yy+2, LE-x-3, cl); 160 else draw_hline(xx+4, yy+2, LE-6, cl); 161 for(i=3; i<7; i++) { // /--------------| 162 if (x>7-i) draw_pixel(xx+8-i, yy+i, COLOR_BLACK); // / 1st for loop | 163 if (x>7-i) draw_pixel(xx+x, yy+i, COLOR_BLACK); // /__________________| 164 draw_hline(xx+x+1, yy+i, LE-x-3, cl); // | | 165 } // | 2nd for loop | 166 for(i=7; i<WI-2; i++) { // | | 167 if (x>1) draw_pixel(xx+2, yy+i, COLOR_BLACK); // |-------------------| 168 if (x>1) draw_pixel(xx+x, yy+i, COLOR_BLACK); 169 draw_hline(xx+x+1, yy+i, LE-x-3, cl); 130 170 } 131 171 if (x>1) draw_hline(xx+2, yy+WI-2, x-2, COLOR_BLACK); 132 draw_hline(xx+x+1, yy+WI-2, LE-x-3, MAKE_COLOR(cl, cl)); 172 draw_hline(xx+x+1, yy+WI-2, LE-x-3, cl); 173 174 #endif 133 175 } 134 176
Note: See TracChangeset
for help on using the changeset viewer.