le181-mix_keys.patch
Code : Tout sélectionner
gamewin.c | 8 ++++++++
keys.c | 4 ++++
keys.h | 2 ++
3 files changed, 14 insertions(+)
diff --git a/gamewin.c b/gamewin.c
index a1a4cb8..605184e 100644
--- a/gamewin.c
+++ b/gamewin.c
@@ -2269,6 +2269,14 @@ int keypress_root_common (Uint32 key, Uint32 unikey)
{
toggle_sit_stand ();
}
+ else if (key == K_MIXONE)
+ {
+ mix_handler(1, mixbut_empty_str);
+ }
+ else if (key == K_MIXALL)
+ {
+ mix_handler(255, mixbut_empty_str);
+ }
else if (key == K_BROWSER)
{
open_last_seen_url();
diff --git a/keys.c b/keys.c
index beec8c2..fb8c343 100644
--- a/keys.c
+++ b/keys.c
@@ -92,6 +92,8 @@ Uint32 K_SCREENSHOT=CTRL|'p';
Uint32 K_VIEWTEXTASOVERTEXT=ALT|'o';
Uint32 K_AFK=CTRL|ALT|'a';
Uint32 K_SIT=ALT|'s';
+Uint32 K_MIXONE=ALT|SDLK_F5;
+Uint32 K_MIXALL=ALT|SDLK_F6;
#ifdef MISSILES
Uint32 K_RANGINGLOCK=ALT|'r';
#endif //MISSILES
@@ -215,6 +217,8 @@ static key_store_entry key_store[] =
{ "#K_VIEWTEXTASOVERTEXT", &K_VIEWTEXTASOVERTEXT },
{ "#K_AFK", &K_AFK },
{ "#K_SIT", &K_SIT },
+ { "#K_MIXONE", &K_MIXONE },
+ { "#K_MIXALL", &K_MIXALL },
#ifdef ENGLISH
{ "#K_RANGINGLOCK", &K_RANGINGLOCK },
#endif //ENGLISH
diff --git a/keys.h b/keys.h
index 8827a6a..4daea1c 100644
--- a/keys.h
+++ b/keys.h
@@ -70,6 +70,8 @@ extern Uint32 K_SCREENSHOT; /*!< key used to make a screenshot */
extern Uint32 K_VIEWTEXTASOVERTEXT; /*!< key used to toggle display of text bubbles (overtext) */
extern Uint32 K_AFK; /*!< key used to display AFK messages */
extern Uint32 K_SIT; /*!< key used to toggle sitting status, i.e. sit down/stand up */
+extern Uint32 K_MIXONE; /*!< key used to mix one item */
+extern Uint32 K_MIXALL; /*!< key used to mix all items */
#ifdef MISSILES
extern Uint32 K_RANGINGLOCK; /*!< key used to toggle ranging-lock status */
#endif //MISSILES