Commit Graph

62 Commits (bce903ee0434ffae24bf02c898ab456adee9ffdf)

Author SHA1 Message Date
Lukas Werling f3b2ff1295 Merge branch 'gamepad-controls' 2016-08-07 18:10:24 +02:00
Clonkonaut 89be1da072 Changed quick switch slot selection to Number + Q.
As suggested by Zapper in this posting: http://forum.openclonk.org/topic_show.pl?pid=31073#pid31073.
This way is probably the only way item usage will ever work on Q. For now, this reverses the previous changes. Q will again react on key down.
2016-08-02 17:49:34 +02:00
Clonkonaut faf3add7e7 Quick Switch slot is now selectable using Q + number key.
This makes a very fundamental change with quick switch: The switching action is now performed on the key release instead of the key press. Let's see if this performs badly for players.
2016-08-02 00:37:40 +02:00
Lukas Werling b30860112a Use regular Use instead of UseDelayed for gamepads 2016-03-21 18:45:42 +01:00
Lukas Werling f63f4b9ab3 Use regular Throw instead of ThrowDelayed for gamepads
There is no need to delay throwing as aiming is now possible at any time
using the analog stick.
2016-03-21 18:45:42 +01:00
Lukas Werling b8c8bf825c Crosshair: Use analog stick input properly
- Crosshair doesn't work with a dpad anymore. Supporting dpads adds
   unnecessary complexity, as a gamepad user with dpad will never be
   competitive with mouse users.

 - Crosshair isn't bound to item usage anymore, but will always show
   when the analog stick is outside of a deadzone.

Future planned feature: Also use the actual strength to allow
distance input in addition to direction. This is used heavily by
Knüppeln.c4s.
2016-03-21 18:45:42 +01:00
Lukas Werling 93dcb1d729 Improve gamepad assignments
- Add assignments for switching interaction and pickup targets (just
   like the keyboard control).

 - Remove double assignments of the sticks for walking and aiming. The
   left stick is now exclusively for walking and the right stick
   exclusively for aiming.
2016-03-21 18:45:42 +01:00
Lukas Werling aa42d1deb7 Make controller button strings nicer
This also removes the controller id from the control definitions,
instead defaulting to 0. This doesn't change anything for now as we only
had definitions for controller 0 anyways.
2016-02-21 18:27:01 +01:00
Lukas Werling 937ddaf722 Update key code strings for game controllers
With the SDL_GameController interface, buttons and axes have actual
names we can refer to. This also allows for advanced mappings using both
sticks (this probably needs script changes) as well as the triggers.
2016-02-13 23:28:00 +01:00
Julius Michaelis 711df05e1a Add button X to fade through half solidmasks.
Enabled on the elevator case for testing.
2016-01-20 18:58:11 +01:00
David Dormagen a3e4b620b9 reworked interactions (grabbing etc.)
The player interface is now similar to how picking up works. This should increase acceptance. Also it was pretty fucked up before. The action bar is gone.
The script logic is now outsourced into a new library similar to the other stuff.
Objects can overload the selector for the new interaction (see "call elevator case").

Additional issues hit and resolved when working on this:
Shifting a cursor did not cancel certain actions (and there was no callback for that). This is now solved by adding two new callbacks.

Issues hit and not resolved:
Certain interactions (calling an elevator case, flipping a construction) are in some control library. They should be in the respective objects (and shown via callbacks etc.). Meh.
The internal interface (declaring interactions etc) has a few places where proplists are just translated because the properties are called differently. This is also a fuckup (i.e. a.interaction_object = b.Object) where the properties should just have been called the same in all places from the beginning.
The name "Action Bar" is pretty misleading now as it is no bar. But that's not something visible to the players. todo: cleanup.
2016-01-02 13:02:45 +01:00
David Dormagen 4964fb11ce shift+click support: used undocumented GetPlayerControlState instead of own memory for key state
One of Sven's private functions. I also renamed the control to CON_ModifierMenu1 (from CON_ModifierInventory1), because it's actually supposed to be the menu modifier in general - even if it's mapped on the inventory key.
2015-10-10 00:52:43 +02:00
David Dormagen b9420ce68c added shift+click support for menus
Or more generally: added support for any modifier key for any other command without the requirement to define a new command based on the old one plus the key. This can be helpful in situations where the player commands are decoupled from the script engine control handling (e.g. with menus).
Currently Shift+Click is only used by the inventory menu to transfer all items of a certain kind.
2015-10-09 13:14:27 +02:00
David Dormagen 745f452afb inventory: allow dropping the hand item on Shift+Throw 2015-09-21 14:21:57 +02:00
David Dormagen 0409f03a17 inventory control: allow picking up all items on shift+up 2015-09-20 18:27:19 +02:00
Sven Eberhardt aaf5693ecc Remove unnamed controls from control config dialogue. 2015-09-15 20:04:08 -04:00
David Dormagen fa40cfd64d put zooming on Ctrl+MouseWheel (from Shift+MouseWheel)
Shift is now the inventory key. Shift+MouseWheel sounds like it does have some potential, too. (F.e. scrolling through the ammunition in a bow?)
2015-09-05 11:36:27 +02:00
David Dormagen c3c243d31e collection: utilize new key combination functionality; also put collection on shift
Shift instead of Ctrl is more consistent with dropping items, which is on Shift+Number. Incidentally you can now also decide to drop an item to make space for a new one DURING the collection process. Really rather rad.
2015-09-02 23:21:06 +02:00
David Dormagen e9a69c4252 collect objects solely via CTRL now
The player can also choose which object to collect by holding CTRL and navigating left/right.
2015-08-30 20:39:50 +02:00
David Dormagen a27888a623 the Clonk now performs a roll when pressing [down] (even when walking)
People have complained that the implicit roll (if you don't know how it worked) could lead to death and severe injury. The roll is now explicit. Always and everywhere.
It doesn't have any other effect though; todo: reduce hit area and/or squash vertices of Clonk during roll
2015-08-07 16:12:41 +02:00
Maikel de Vries 91cd15c40c reimplement alt use on right mouse button
This replaces throwing then controlling or inside a vehicle, throwing items remains on RMB as is.
2015-06-28 09:44:50 +02:00
David Dormagen 379d189787 now always use on leftclick and throw on rightclick (drop if you click your Clonk or below); also removed some old references to the right mouse button (UseAlt) 2015-03-09 13:33:31 +01:00
David Dormagen 952f06b173 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
2014-09-29 11:47:09 +02:00
Sven Eberhardt b1db0c7918 (Re)implement text completion in dialogue text windows as an async control. Default to Space, i.e. MenuOK. 2014-08-10 20:58:26 +02:00
David Dormagen 7eaef70af1 Merge branch 'master' into Controls
Conflicts:
	planet/System.ocg/PlayerControls.txt
2013-05-26 18:19:51 +02:00
David Dormagen 0c23d1b9a6 reimplemented the action bar to use the custom GUIs
action bar now only shows shortly after hitting Interact
2013-05-26 14:59:19 +02:00
Tobias Zwick fe5a29b198 throw out DVORAK keyboard layout (controls are keyboard layout independent now) 2013-05-25 14:41:58 +02:00
David Dormagen 6681a2cd7d Throwing on right-click, alt-use (temporarily) on Shift+Left 2013-05-24 23:26:00 +02:00
David Dormagen 04c8ad1cac removed CON_Collect (now collects only into empty slots)
fixed inventory shifting
2013-05-24 20:09:19 +02:00
David Dormagen 6c861f9165 removed the hold-number-and-click-mouse controls 2013-05-24 00:00:18 +02:00
David Dormagen c1d27bc3e9 mouse-wheel now scrolls through inventory (zoom is on shift+mouse-wheel) 2013-05-23 22:46:23 +02:00
David Dormagen 34fc771911 merged master into Controls
Conflicts:
	planet/Objects.ocd/Libraries.ocd/Structure.ocd/Script.c
2013-01-30 21:37:31 +01:00
Tobias Zwick 28e2bdbb92 fix #724: revers the order in which GetCrew(plr,index) returns the crew 2013-01-13 15:45:51 +01:00
David Dormagen 80ac9a9503 more one-hand cleanups 2012-12-29 14:08:53 +01:00
David Dormagen bc4fd5f9ed merged master into Controls 2012-12-23 15:17:23 +01:00
Bernhard Bonigl 1011c858cc Introduce QuickSwitch on Q (or Apostrophe for Dvorak)
QuickSwitch changes the current selection of the Inventory to the last selected one.
2012-10-07 15:44:01 +02:00
Tobias Zwick 63fcec3e8c fix controls: interact + down = ungrab doesn't work as intended:
confusing situations can arise, e.g. while shoving a tree, one can use the foundry
2012-10-14 13:26:30 +02:00
Tobias Zwick 2a228b11ed remove non-existing control def 2012-10-14 01:20:52 +02:00
Tobias Zwick c51ffb5a26 fix descriptions in control dialog 2012-10-14 01:04:49 +02:00
Armin Burgmeier cf159068b3 Fix warning about undefined backspace key on Linux 2012-10-13 16:15:01 +02:00
Tobias Zwick 8c5005bef9 I hate Mercurial 2012-10-10 23:47:30 +02:00
Bernhard Bonigl 9a91a4dfca Reduce Collect-Priority by 1. This fixes collecting when jumping. 2012-10-10 16:38:33 +02:00
Sven Eberhardt 08b495e43d PlayerControls: When the user changes a key assignment in his local config, all derived key assignments (Key=CON_*) change as well (#807).
The "CON_" prefix is now mandatory when referencing other key assignments. Updated PlayerControls.txt to reflect that.
2012-10-08 20:45:04 +02:00
Bernhard Bonigl 0d53a16a21 Backed out changeset: b48412700d66 2012-04-14 15:38:18 +02:00
Bernhard Bonigl cc4b1ce763 Cleaned up controls. Controls-Dialogue should be more usable now. 2012-04-01 19:27:42 +02:00
Maikel de Vries 2da24e0ca3 MenuOK is now on Return
This was already in the comments and it makes much more sense, cause it interferes with interact (Space)
2012-03-31 14:19:39 +02:00
Bernhard Bonigl 25fec934d6 Removed all Hacks with Interaction. Enter/Exit also works now. 2012-03-22 20:26:06 +01:00
Bernhard Bonigl 03729bdbf1 Experimental: Added Interaction-Hotkeys on <> to . (the row below the home row).
Made the Keys <> on German Keyboards an \| and ;: on US Keyboards usable
2012-03-21 21:52:32 +01:00
Bernhard Bonigl 3a7bc44da8 Experimental: Added Alt+# for rigth hand 2012-03-21 18:13:34 +01:00
Bernhard Bonigl 4c01b585d9 Removed dropping on Down+Mouse 2012-03-20 00:48:29 +01:00