summaryrefslogtreecommitdiff
path: root/meme
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
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')
-rw-r--r--meme/README1
-rw-r--r--meme/gui.c7
2 files changed, 7 insertions, 1 deletions
diff --git a/meme/README b/meme/README
index 3e45022..453a550 100644
--- a/meme/README
+++ b/meme/README
@@ -28,6 +28,7 @@ Keyboard
- C: enter contrast enhancement mode, see below
- E: highlight equal height, see below
- G: toggle grid (edges) display
+- M: toggle mesh display
- O: toggle overlay; see below
- P: toggle profiles display, see below
- Q: quit
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;