ref: b9835e43a451fe492c9ace050b2cd068c4698e79
parent: 036df9796a134357506f19e4513f1a1f4c165476
author: Michael Day <[email protected]>
date: Tue Apr 26 17:06:46 EDT 2022
Add "use artifact" mouse button config items
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -1099,6 +1099,14 @@
CONFIG_VARIABLE_INT(mouseb_invright),
//!
+ // @game heretic hexen
+ //
+ // Mouse button to use artifact.
+ //
+
+ CONFIG_VARIABLE_INT(mouseb_useartifact),
+
+ //!
// If non-zero, double-clicking a mouse button acts like pressing
// the "use" key to use an object in-game, eg. a door or switch.
//
--- a/src/m_controls.c
+++ b/src/m_controls.c
@@ -122,6 +122,7 @@
int mousebnextweapon = -1;
int mousebinvleft = -1;
int mousebinvright = -1;
+int mousebuseartifact = -1;
int key_message_refresh = KEY_ENTER;
int key_pause = KEY_PAUSE;
@@ -275,6 +276,7 @@
M_BindIntVariable("mouseb_invleft", &mousebinvleft);
M_BindIntVariable("mouseb_invright", &mousebinvright);
+ M_BindIntVariable("mouseb_useartifact", &mousebuseartifact);
M_BindIntVariable("key_arti_quartz", &key_arti_quartz);
M_BindIntVariable("key_arti_urn", &key_arti_urn);
--- a/src/m_controls.h
+++ b/src/m_controls.h
@@ -151,6 +151,7 @@
extern int mousebnextweapon;
extern int mousebinvleft;
extern int mousebinvright;
+extern int mousebuseartifact;
extern int joybfire;
extern int joybstrafe;
--- a/src/setup/mouse.c
+++ b/src/setup/mouse.c
@@ -50,6 +50,7 @@
&mousebspeed,
&mousebinvleft,
&mousebinvright,
+ &mousebuseartifact,
&mousebturnleft,
&mousebturnright,
};
@@ -113,6 +114,7 @@
{
AddMouseControl(buttons_table, "Inventory left", &mousebinvleft);
AddMouseControl(buttons_table, "Inventory right", &mousebinvright);
+ AddMouseControl(buttons_table, "Use artifact", &mousebuseartifact);
}
if (gamemission == hexen || gamemission == strife)