summaryrefslogtreecommitdiff
path: root/meme/gui.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2015-03-14 11:42:52 (GMT)
committerWerner Almesberger <werner@almesberger.net>2015-03-14 11:42:52 (GMT)
commitbd8e92ef3dc4ab4991b8108084086a3022c898e4 (patch)
tree8ea3999a81ebf72b0eb0df25737bba44bc608ce7 /meme/gui.c
parentade67694d590b069603590c5f9bb73bd464634d7 (diff)
downloadmisc-bd8e92ef3dc4ab4991b8108084086a3022c898e4.zip
misc-bd8e92ef3dc4ab4991b8108084086a3022c898e4.tar.gz
misc-bd8e92ef3dc4ab4991b8108084086a3022c898e4.tar.bz2
meme/: M toggles mesh display (e.g., for make the overlay more visible)
Diffstat (limited to 'meme/gui.c')
-rw-r--r--meme/gui.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/meme/gui.c b/meme/gui.c
index b615364..758d649 100644
--- a/meme/gui.c
+++ b/meme/gui.c
@@ -59,6 +59,7 @@ static int zoom;
static bool show_grid = 0;
static bool show_profiles = 0;
static bool show_overlay = 0;
+static bool show_mesh = 1;
static const struct vertex *cursor;
@@ -424,7 +425,8 @@ static void edges_draw(SDL_Surface *s)
static void draw(SDL_Surface *s)
{
SDL_FillRect(s, NULL, SDL_MapRGB(s->format, 0xff, 0xff, 0xff));
- surface_draw(s);
+ if (show_mesh)
+ surface_draw(s);
if (show_grid)
edges_draw(s);
if (equal != INT_MAX)
@@ -1235,6 +1237,9 @@ static bool event_loop(SDL_Surface **surf, const char *logfile)
case SDLK_g:
show_grid = !show_grid;
return 0;
+ case SDLK_m:
+ show_mesh = !show_mesh;
+ return 0;
case SDLK_o:
show_overlay = !show_overlay;
return 0;