home · contact · privacy
Added dummy inventory window.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 17 Sep 2013 03:26:21 +0000 (05:26 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 17 Sep 2013 03:26:21 +0000 (05:26 +0200)
config/commands
config/keybindings_global
config/windows/Win_l
config/windows/toggle_order_and_active
src/control.c
src/draw_wins.c
src/draw_wins.h
src/wincontrol.c

index 50da77c01683dfd2e9beab5bd21317d8aa0c6d06..cdd65b96ea2d296ff8e39ab7e2dafab8d471d477 100644 (file)
@@ -44,3 +44,4 @@
 44 map_r map right
 45 map_c map center player
 46 to_a_keywin toggle view of available keybindings
+46 to_inv toggle inventory window
index 17e75b3e5ff51d4e7d14403e3a07ec05d58359d3..7d825a62510ffb6deb93f1d20e9bb10fa05614bb 100644 (file)
@@ -2,10 +2,11 @@
 265 to_a_keywin
 266 to_mapwin
 267 to_infowin
-268 to_logwin
-269 to_g_keywin
-270 to_wg_keywin
-271 to_wk_keywin
+268 to_inv
+269 to_logwin
+270 to_g_keywin
+271 to_wg_keywin
+272 to_wk_keywin
 119 winconf
 62 cyc_win_f
 60 cyc_win_b
index c97f608ec31542975af8e9ebd89b8f3bb1bb6c55..e2fff522da35576a199c1ec4f018c9ab27d356f5 100644 (file)
@@ -1,4 +1,4 @@
 Log
 l
--4
+-10
 33
index 6053b2cb917c12b47a8d46357527040ae77f33d5..2ae7c2cbb1461101f9d09d26632e73070ebef7f8 100644 (file)
@@ -1,2 +1,2 @@
-kmil
-m
\ No newline at end of file
+kmicl
+m
index c1e295f2adfdbbf8f024c6067acd1f73ef65c964..8531b4c6b8be8059e7e60641c65ffd93dbc71db2 100644 (file)
@@ -233,6 +233,11 @@ extern uint8_t meta_control(int key, struct World * world)
     {
         exit_err(toggle_window(win_meta, win_info), world, err_toggle);
     }
+    else if (key == get_available_keycode_to_action(world, "to_inv"))
+    {
+        uint8_t test = toggle_window(win_meta, get_win_by_id(world, 'c'));
+        exit_err(test, world, err_toggle);
+    }
     else if (key == get_available_keycode_to_action(world, "to_logwin"))
     {
         exit_err(toggle_window(win_meta, win_log), world, err_toggle);
index 89a3c63443f1b11b75a9c77000af79f66729d27f..53ce68da0a4691846bc86e46b77251562c33f5c0 100644 (file)
@@ -374,6 +374,13 @@ extern void draw_win_info(struct Win * win)
 
 
 
+extern void draw_win_inventory(struct Win * win)
+{
+    mvwaddstr(win->frame.curses_win, 0, 0, "(empty)");
+}
+
+
+
 extern void draw_win_available_keybindings(struct Win * win)
 {
     struct World * world = (struct World *) win->data;
index c0a156ce625a36d63c37906f3ed1130307469b25..c86f367dc6dc5d16461751b1122cb7082c604bf3 100644 (file)
@@ -17,6 +17,7 @@ struct Win;
 extern void draw_win_log(struct Win * win);
 extern void draw_win_map(struct Win * win);
 extern void draw_win_info(struct Win * win);
+extern void draw_win_inventory(struct Win * win);
 extern void draw_win_available_keybindings(struct Win * win);
 extern void draw_win_keybindings_global(struct Win * win);
 extern void draw_win_keybindings_winconf_geometry(struct Win * win);
index 6682087862af0e1e010b2d1c7fdabfb7e1f95c80..529457c0dc866f19e7cec44a2544cdd1b589099d 100644 (file)
@@ -18,7 +18,7 @@
 #include "main.h" /* for World struct */
 #include "draw_wins.h" /* for draw_win_map(), draw_win_info(), draw_win_og(),
                         * draw_win_available_keybindings(),
-                        * draw_win_keybindings_global(),
+                        * draw_win_keybindings_global(), draw_win_inventory(),
                         * draw_win_keybindings_winconf_geometry(),
                         * draw_win_keybindings_winconf_keybindings(),
                         * draw_winconf_geometry(), draw_winconf_keybindings()
@@ -276,6 +276,10 @@ static struct WinConf * get_winconf_by_id(struct World * world, char id)
 
 static void * get_drawfunc_by_char(char c)
 {
+    if      ('c' == c)
+    {
+        return draw_win_inventory;
+    }
     if      ('i' == c)
     {
         return draw_win_info;
@@ -284,14 +288,14 @@ static void * get_drawfunc_by_char(char c)
     {
         return draw_win_log;
     }
-    else if ('m' == c)
-    {
-        return draw_win_map;
-    }
     else if ('k' == c)
     {
         return draw_win_available_keybindings;
     }
+    else if ('m' == c)
+    {
+        return draw_win_map;
+    }
     else if ('0' == c)
     {
         return draw_win_keybindings_global;