void CUI_PEVol::draw(Drawable *S) { int i; if (S->lock()==0) { int window_width = 40 * col(1); int window_height = 12 * row(1); int start_x = (RESOLUTION_X / 2) - (window_width / 2); for(;start_x % 8;start_x--); int start_y = (RESOLUTION_Y / 2) - (window_height / 2); for(;start_y % 8;start_y--); S->fillRect(start_x,start_y,start_x + window_width,start_y + window_height,COLORS.Background); printline(start_x,start_y + window_height - row(1) + 1,148,window_width / 8, COLORS.Lowlight,S); for (i = start_y / row(1); i < (start_y + window_height) / row(1);i++) { printchar(start_x,row(i),145,COLORS.Highlight,S); printchar(start_x + window_width - row(1) + 1,row(i),146,COLORS.Lowlight,S); } printline(start_x,start_y,143,window_width / 8,COLORS.Highlight,S); print(col(textcenter("Volume Set for Block")),start_y + row(2),"Volume Set for Block",COLORS.Text,S); print(start_x + col(1), start_y + window_height / 2," Percent:",COLORS.Text,S); UI->draw(S); S->unlock(); need_refresh = need_popup_refresh = 0; updated++; } }
void CUI_SongDuration::draw(Drawable *S) { int i; if (S->lock()==0) { S->fillRect(col(this->x),row(this->y),col(this->x+this->xsize)-1,row(this->y + this->ysize)-1,COLORS.Background); printline(col(this->x),row(this->y + this->ysize-1),148,this->xsize,COLORS.Lowlight,S); for (i=this->y;i<this->y+this->ysize;i++) { printchar(col(this->x),row(i),145,COLORS.Highlight,S); printchar(col(this->x+this->xsize-1),row(i),146,COLORS.Lowlight,S); } printline(col(this->x),row(this->y ),143,this->xsize,COLORS.Highlight,S); print(col(this->x),row(this->y + 1)," Song Duration",COLORS.Text,S); char str[50]; int m = seconds/60; int s = seconds%60; sprintf(str,"Total: %d:%.2d",m,s); print(col(textcenter(str)),row(this->y + 3),str,COLORS.Text,S); UI->draw(S); S->unlock(); need_refresh = 0; updated++; } }
void CUI_LoadMsg::draw(Drawable *S) { int i; char *str[] = { "Please wait, loading... |", "Please wait, loading... /", "Please wait, loading... -", "Please wait, loading... \\" }; if (S->lock()==0) { S->fillRect(col(15),row(20),640-col(15)-1,row(25)-1,COLORS.Background); printline(col(15),row(24),148,50,COLORS.Lowlight,S); for (i=20;i<25;i++) { printchar(col(15),row(i),145,COLORS.Highlight,S); printchar(col(64),row(i),146,COLORS.Lowlight,S); } printline(col(15),row(20),143,50,COLORS.Highlight,S); print(col(textcenter(str[strselect],40)),row(22),str[strselect],COLORS.Text,S); S->unlock(); need_refresh = 0; updated++; } }