summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2016-04-02 21:10:03 +0200
committerPaweł Redman <pawel.redman@gmail.com>2016-04-02 21:10:03 +0200
commitf1e955e7e9719aa82d1b32dac2bce62f26f75df7 (patch)
treeeee5d1cd4a68c9cb065384bbd3f5584bd4445bd5 /src/ui.c
parente40ab41ae226e257d57a73c69d9bdd8d19f64cb5 (diff)
Auxiliary fields (WIP).
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ui.c b/src/ui.c
index fac56ce..f485cfe 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -258,6 +258,24 @@ void ui_event_window(SDL_Event *event, ui_window *uiw)
sv->xsection_flags &= ~XSECTION_E;
sv->xsection_flags |= XSECTION_H;
break;
+
+ case SDLK_z:
+ if (sv->select_valid)
+ {
+ phy_field_info *fi = &sv->sim->field_info;
+ size_t *coords;
+
+ coords = calloc(3, sizeof(size_t));
+ assert(coords);
+
+ coords[0] = sv->select[0] * fi->width;
+ coords[1] = sv->select[1] * fi->height;
+ coords[2] = sv->select[2] * fi->depth;
+
+ itc_chan_push(&sv->sim->ctl, PHY_CMD_DEBUG,
+ coords);
+ break;
+ }
}
}
}