Commit Graph

69 Commits

Author SHA1 Message Date
Steven 0d14920ba0 Credit Eric as co-author.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1261 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-12-01 10:35:51 +00:00
Eric Wasylishen 1b6abd0e04 in_sdl.c, key.c: Fixes agreed on with Sander:
1. Remove Key_IgnoreTextInput(), and simple always send a Char_Event when
we receive TEXTINPUT (SDL2) or the unicode field of a KEYDOWN event is
filled (SDL1.).
2. Remove handling of K_KP_* in the menu/console, since they cannot be
relied on to not also send text (see issue described above). The handling
of K_KP_ENTER can stay, since we do know that it never sends text.
3. Remove the interpretation hack for the numpad, since it will no longer
be needed (and doesn't currently work for SDL2 anyway); if a numpad key
generates text we will handle it (because of "1"), if not then it will
simply be if ignored (because of "2”).

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1110 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-14 03:30:44 +00:00
Sander van Dijk c23a0197d6 Rename some (recently added) functions.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1092 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-08 18:30:17 +00:00
Sander van Dijk 0c28e5a03e keys.c: Allow SetBinding() to really clear a key, instead of binding it to the empty string.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1087 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-05 20:48:27 +00:00
Sander van Dijk f605137b02 menu: Add M_Quit_InputtingText() for consistency.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1082 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-05 15:32:45 +00:00
Sander van Dijk 1ab2cbde9b input: Support for "plain" numpad keys in the menu/console (still todo: numpad translation).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1078 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-02 19:21:52 +00:00
Sander van Dijk 8d0cb0086a input: More text input restructuring.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1077 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-10-02 19:00:42 +00:00
Sander van Dijk 856f94fac8 input: Some text input restructuring in preparation of numpad translation support.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1075 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-30 19:29:58 +00:00
Sander van Dijk cebef615e5 input: Rework the text/non-text input mode handling.
Before, "gamekey" was the special case, now "textmode" is. We are now more precise about when we activate "textmode", e.g. we only do this when the console, messagemode, or a textfield in the menu are active. The trigger for doing this was this line on the "SDL_StartTextInput" page of the SDL2 wiki: "On some platforms using this function activates the screen keyboard.". Although we currenly support no such platform, it's good te be prepared, and what we do now is more correct anyway.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1066 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-23 19:10:02 +00:00
Sander van Dijk c8da3f1f61 Rename some functions for consistency.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1064 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-23 02:19:57 +00:00
Ozkan Sezer b9032b7815 copyright years, general tidy-up, remove unused d_ifacea.h.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1059 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-22 08:55:46 +00:00
Ozkan Sezer c80fbd9629 allow KP_ENTER to function as K_ENTER in menus, console, etc., after r1042.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1058 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-22 06:21:06 +00:00
Sander van Dijk cb0c84ac9d Revert r731 ("Make the key menu scrollable").
In hindsight this really was "shooting a cannon at a mosquito". Even at a resolution of 320x200 we don't actually draw any keybindings off-screen, we just draw the last one very close to the edge (similar to the version string in the bottom right of the console). Although that is not visually pleasing, it is not that likely to actually occur (not many people will use a resolution of 320x200 or set the 2D scaling to the maximum value), and is not worth always having one keybinding "missing" at any scale setting.

(If we even want/need to readd this, it should work dynamically, e.g. calculate a "virtual resolution" from the actual window resolution and the actual 2D scaling value.)


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1039 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-20 15:57:33 +00:00
Ozkan Sezer ad2905b5e4 bumped version to 0.90.0
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1033 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-16 09:05:36 +00:00
Sander van Dijk a21d18a4ec menu: Add Char_Event support for the textfields in the menu.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1030 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-13 16:13:16 +00:00
Sander van Dijk 64f3091f05 rename the modestate_t enum items
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@805 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-13 19:07:19 +00:00
Sander van Dijk 103f041614 remove "type" from "viddef_t", use "modestate" instead
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@804 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-13 19:01:26 +00:00
Sander van Dijk 1703e4b04a Some "slowkey" tuning.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@799 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-03 17:22:59 +00:00
Sander van Dijk a86fc9a175 Make the "speedkey" act as "slowkey" when "always run" is on.
A bit of a hack, this should really be controlled by a
separate "cl_alwaysrun" cvar, but lets stick to this for
backward compatibility for now.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@797 af15c1b1-3010-417e-b628-4374ebc0bcbd
2013-02-01 20:06:52 +00:00
Ozkan Sezer 1fef74e006 removed unused global host_time
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@769 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-12 07:50:45 +00:00
Sander van Dijk 95d20d835f revert (most of) r521, r756 and r759. Alter "gamekey" handling a bit to compensate.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@761 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-06 18:09:23 +00:00
Sander van Dijk c72ebc0049 menu.c: fix mouse release in fullscreen console
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@756 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-01 03:06:52 +00:00
Sander van Dijk 99bda4d65f menu.c: style fix
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@737 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-27 10:58:04 +00:00
Sander van Dijk 55b63c2f76 Finetuning of previous commit
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@732 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-25 23:30:55 +00:00
Sander van Dijk 2481e8aa28 Make the key menu scrollable (otherwise we draw allmost-offscreen at max scale)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@731 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-25 17:30:11 +00:00
Sander van Dijk b85eb79407 Some more scale slider tuning.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@713 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-08 10:48:15 +00:00
Sander van Dijk eab83a0f3d Minor readability tweak
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@710 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-05 06:07:06 +00:00
Sander van Dijk a6f48f01a0 Handle some cornercases better in the scale slider.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@707 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-04 18:24:40 +00:00
Sander van Dijk 64b53c510c Rework the scale menu option to be more intuitive.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@703 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-03 19:47:16 +00:00
Sander van Dijk 13b3ce9f25 Re-introduce KP_* syms, but only "in-game".
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@683 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-06-08 19:27:12 +00:00
Ozkan Sezer d9711fdfa2 Limited the struct qsocket_s details only to net_*.c sources :
For menu serverlist handling, added new procedures NET_SlistSort,
NET_SlistPrintServer and NET_SlistPrintServerName. Added new
procedure NET_QSocketGetTime for status and spawn commands' print
functionality in host_cmd.c. Added new NET_QSocketGetAddressString
procedure for status and connect commands' print functionality in
host_cmd.c and sv_main.c.  Patch ported over from uhexen2.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@657 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-04-18 20:33:12 +00:00
Sander van Dijk fa43564cf8 Make the "Reset config" message more informative.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@611 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-18 12:00:35 +00:00
Sander van Dijk 7926cc5bf3 - Rename the "Reset defaults" menu option to "Reset config".
- Make it reset only those cvar's that are saved to config.cfg.
- Make it as the user for confirmation.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@609 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-01-17 08:25:07 +00:00
Ozkan Sezer 19953bd399 silenced -Wsign-compare warnings.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@575 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 19:06:08 +00:00
Ozkan Sezer 8202704726 cleanup of Cvar_Set[Value] calls in menu.c
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@574 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 16:50:45 +00:00
Ozkan Sezer 983af887bf changed many sprintf() calls into q_snprintf().
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@557 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 10:50:42 +00:00
Ozkan Sezer 7504e175e9 menu.c (M_ToggleMenu_f): Set key_dest to key_game only if the client
is connected. Set it to key_console, otherwise. Patch from and thanks
to Sander van Dijk.
(M_Main_Key): Likewise.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@521 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-15 16:21:36 +00:00
Ozkan Sezer 4f95ba8ef8 fixed several gcc-4.6 -Wunused-but-set-variable warnings.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@442 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-04-12 12:36:04 +00:00
Ozkan Sezer 945262b863 min/max macros: renamed them to q_min and q_max, moved them common.h.
removed the inline versions which only handled integers.  moved CLAMP
macro to common.h.  Adjusted all places for the renamed macros.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@386 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-10 10:35:40 +00:00
Ozkan Sezer c443de78cc added -nomusic command line switch to turn off playing external music files.
added new cvar bgm_extmusic to enable/disable playing of external music files.
added a new menu entry to control bgm_extmusic.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@384 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-10 08:33:22 +00:00
Steven 7164ac8dc5 Author name change
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@382 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-06 20:19:37 +00:00
Ozkan Sezer d286c4d48f applied a modified version of heritage & quit message by Sander van Dijk
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@381 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-06 20:05:49 +00:00
Ozkan Sezer 25c2e2b3c8 menu.c: allow proper music volume adjustment for windows.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@378 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-05 21:30:37 +00:00
Ozkan Sezer db353f7a19 menu.c: restore the screen size menu item that was removed in rev. 125.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@345 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-10-29 13:03:04 +00:00
Ozkan Sezer 906df3f650 const correctness changes.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@300 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 02:22:55 +00:00
Ozkan Sezer 36d82d087d removed net_serial which was for dosquake only.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@296 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 09:55:43 +00:00
Ozkan Sezer 3a6e17e627 added q_stdinc.h, adapted from uhexen2, to tidy up several includes and
macros in one place.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@277 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-14 20:55:39 +00:00
Steven fbe9360365 Add a "prev weapon" menu item (from Sander)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@253 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-04 03:09:07 +00:00
Ozkan Sezer d5e85a5e6c host_cmd.c, menu.c: sanitize whitespace/formatting.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@252 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-02 19:45:16 +00:00
Ozkan Sezer 4a1e01a976 menu.c: Added an options enum for the options menu. Added an options menu
entry for mouse look toggling.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@251 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-02 18:28:23 +00:00