open_ui imrovements, almost ready

This commit is contained in:
Simon Robertshaw
2010-10-30 12:33:33 +01:00
parent ba1b9f7584
commit b902572251

View File

@@ -2786,7 +2786,7 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date)
if(sdl_key==SDLK_RETURN && openable) { if(sdl_key==SDLK_RETURN && openable) {
queue_open = 1; queue_open = 1;
} }
if(mx > 50 && mx < 50+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && openable) { if(mx > 50 && mx < 50+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && openable && !queue_open) {
fillrect(vid_buf, 50, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40); fillrect(vid_buf, 50, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40);
if(b && !bq) { if(b && !bq) {
//Button Clicked //Button Clicked
@@ -2794,7 +2794,7 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date)
} }
} }
//Fav Button //Fav Button
if(mx > 100 && mx < 100+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && svf_login) { if(mx > 100 && mx < 100+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && svf_login && !queue_open) {
fillrect(vid_buf, 100, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40); fillrect(vid_buf, 100, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40);
if(b && !bq) { if(b && !bq) {
//Button Clicked //Button Clicked
@@ -2804,7 +2804,7 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date)
} }
} }
//Report Button //Report Button
if(mx > 150 && mx < 150+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && svf_login && info_ready) { if(mx > 150 && mx < 150+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && svf_login && info_ready && !queue_open) {
fillrect(vid_buf, 150, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40); fillrect(vid_buf, 150, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40);
if(b && !bq) { if(b && !bq) {
//Button Clicked //Button Clicked
@@ -2820,7 +2820,7 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date)
} }
} }
//Delete Button //Delete Button
if(mx > 200 && mx < 200+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && (authoritah || myown)) { if(mx > 200 && mx < 200+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && (authoritah || myown) && !queue_open) {
fillrect(vid_buf, 200, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40); fillrect(vid_buf, 200, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40);
if(b && !bq) { if(b && !bq) {
//Button Clicked //Button Clicked
@@ -2846,7 +2846,7 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date)
} }
} }
//Open in browser button //Open in browser button
if(mx > 250 && mx < 250+107 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50) { if(mx > 250 && mx < 250+107 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && !queue_open) {
fillrect(vid_buf, 250, YRES+MENUSIZE-68, 107, 18, 255, 255, 255, 40); fillrect(vid_buf, 250, YRES+MENUSIZE-68, 107, 18, 255, 255, 255, 40);
if(b && !bq) { if(b && !bq) {
//Button Clicked //Button Clicked
@@ -2859,7 +2859,7 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date)
} }
} }
//Submit Button //Submit Button
if(mx > XRES+BARSIZE-100 && mx < XRES+BARSIZE-100+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && svf_login && info_ready) { if(mx > XRES+BARSIZE-100 && mx < XRES+BARSIZE-100+50 && my > YRES+MENUSIZE-68 && my < YRES+MENUSIZE-50 && svf_login && info_ready && !queue_open) {
fillrect(vid_buf, XRES+BARSIZE-100, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40); fillrect(vid_buf, XRES+BARSIZE-100, YRES+MENUSIZE-68, 50, 18, 255, 255, 255, 40);
if(b && !bq) { if(b && !bq) {
//Button Clicked //Button Clicked
@@ -2869,6 +2869,10 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date)
} }
} }
if(!(mx>50 && my>50 && mx<XRES+BARSIZE-100 && my<XRES+MENUSIZE-100) && b && !queue_open){
break;
}
sdl_blit(0, 0, (XRES+BARSIZE), YRES+MENUSIZE, vid_buf, (XRES+BARSIZE)); sdl_blit(0, 0, (XRES+BARSIZE), YRES+MENUSIZE, vid_buf, (XRES+BARSIZE));
memcpy(vid_buf, old_vid, ((XRES+BARSIZE)*(YRES+MENUSIZE))*PIXELSIZE); memcpy(vid_buf, old_vid, ((XRES+BARSIZE)*(YRES+MENUSIZE))*PIXELSIZE);
if(info_ready && svf_login){ if(info_ready && svf_login){