summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-09-30 17:00:32 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-09-30 17:00:32 (GMT)
commit18990e97468e9ac088b8a1448e7fcfc2895516f0 (patch)
tree71e35332c0c0c982bb3c0412fb9c4a87dc815a53 /src/interface.c
parentb20e1c5e13f3fd188ae43381eb8a01b4cacb46f2 (diff)
downloadpowder-18990e97468e9ac088b8a1448e7fcfc2895516f0.zip
powder-18990e97468e9ac088b8a1448e7fcfc2895516f0.tar.gz
Logout is saved to prefs
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/interface.c b/src/interface.c
index aa87ff4..c1b5b4c 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -1311,8 +1311,10 @@ void login_ui(pixel *vid_buf)
drawrect(vid_buf, x0+8, y0+40, 176, 16, 192, 192, 192, 255);
ui_edit_draw(vid_buf, &ed1);
ui_edit_draw(vid_buf, &ed2);
- drawtext(vid_buf, x0+5, y0+69, "Sign in", 255, 255, 255, 255);
+ drawtext(vid_buf, x0+5, y0+69, "Sign out", 255, 255, 255, 255);
+ drawtext(vid_buf, x0+187-textwidth("Sign in"), y0+69, "Sign in", 255, 255, 55, 255);
drawrect(vid_buf, x0, y0+64, 192, 16, 192, 192, 192, 255);
+ drawrect(vid_buf, x0, y0+64, 96, 16, 192, 192, 192, 255);
sdl_blit(0, 0, (XRES+BARSIZE), YRES+MENUSIZE, vid_buf, (XRES+BARSIZE));
ui_edit_process(mx, my, b, &ed1);
@@ -1322,7 +1324,9 @@ void login_ui(pixel *vid_buf)
break;
if (b && !bq && mx>=x0+9 && mx<x0+23 && my>=y0+42 && my<y0+46)
break;
- if (b && !bq && mx>=x0 && mx<x0+192 && my>=y0+64 && my<=y0+80)
+ if (b && !bq && mx>=x0 && mx<x0+96 && my>=y0+64 && my<=y0+80)
+ goto fail;
+ if (b && !bq && mx>=x0+97 && mx<x0+192 && my>=y0+64 && my<=y0+80)
break;
if (sdl_key==SDLK_RETURN || sdl_key==SDLK_TAB)
@@ -1420,6 +1424,7 @@ fail:
svf_admin = 0;
svf_mod = 0;
svf_messages = 0;
+ save_presets(0);
}
int stamp_ui(pixel *vid_buf)