Skip to content
Browse files

setup: Rearrange mouse config dialog.

This previously showed the fire/use/move forward controls, which are
the original controls provided by Doom's setup.exe.

However, the reality is that nowadays most people play with the WASD&mouse
arrangement (or something similar) and are unlikely to be using the mouse
to move forwards. So it makes more sense if we reserve the main mouse
dialog for "action" buttons (fire/use) and move the "move forward" button
into the more buttons dialog. This also makes the more buttons dialog match
the arrangements for keyboard and gamepad controls.

As part of this, also tweak the mouse button minimum width so that it has a
consistent size that can describe high-numbered mouse buttons (eg.
"BUTTON #10").
  • Loading branch information...
fragglet committed Mar 29, 2019
1 parent c714c41 commit a96f19fbc83f1b3d00af5a4b02e39e2830810d24
Showing with 10 additions and 10 deletions.
  1. +8 −9 src/setup/mouse.c
  2. +2 −1 src/setup/txt_mouseinput.c
@@ -90,23 +90,23 @@ static void ConfigExtraButtons(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(unused))
TXT_SetWindowHelpURL(window, WINDOW_HELP_URL);

buttons_table = TXT_NewTable(2),
buttons_table = TXT_NewTable(4),

TXT_SetColumnWidths(buttons_table, 24, 5);
TXT_SetColumnWidths(buttons_table, 16, 11, 14, 10);

AddMouseControl(buttons_table, "Move backward", &mousebbackward);
AddMouseControl(buttons_table, "Use", &mousebuse);
AddMouseControl(buttons_table, "Move forward", &mousebforward);
AddMouseControl(buttons_table, "Strafe left", &mousebstrafeleft);
AddMouseControl(buttons_table, "Move backward", &mousebbackward);
AddMouseControl(buttons_table, "Strafe right", &mousebstraferight);
AddMouseControl(buttons_table, "Previous weapon", &mousebprevweapon);
AddMouseControl(buttons_table, "Strafe on", &mousebstrafe);
AddMouseControl(buttons_table, "Next weapon", &mousebnextweapon);

if (gamemission == hexen || gamemission == strife)
AddMouseControl(buttons_table, "Jump", &mousebjump);

AddMouseControl(buttons_table, "Previous weapon", &mousebprevweapon);
AddMouseControl(buttons_table, "Next weapon", &mousebnextweapon);

void ConfigMouse(TXT_UNCAST_ARG(widget), void *user_data)
@@ -145,8 +145,7 @@ void ConfigMouse(TXT_UNCAST_ARG(widget), void *user_data)

AddMouseControl(window, "Fire/Attack", &mousebfire);
AddMouseControl(window, "Move forward", &mousebforward);
AddMouseControl(window, "Strafe on", &mousebstrafe);
AddMouseControl(window, "Use", &mousebuse);

TXT_NewButton2("More controls...", ConfigExtraButtons, NULL));
@@ -26,7 +26,8 @@
#include "txt_utf8.h"
#include "txt_window.h"

// eg. "BUTTON #10"

static int MousePressCallback(txt_window_t *window,
int x, int y, int b,

0 comments on commit a96f19f

Please sign in to comment.
You can’t perform that action at this time.