mouse-wheel now scrolls through inventory (zoom is on shift+mouse-wheel)

Controls
David Dormagen 2013-05-23 22:46:23 +02:00
parent 20bfab48b6
commit c1d27bc3e9
4 changed files with 44 additions and 3 deletions

View File

@ -45,7 +45,7 @@ public func ObjectControl(int plr, int ctrl, int x, int y, int strength, bool re
return inherited(plr, ctrl, x, y, strength, repeat, release, ...);
// Quickswitch changes the active slot to the last selected one
if(ctrl == CON_QuickSwitch)
if (ctrl == CON_QuickSwitch)
{
// but ignore quickswitch if we have more than 1 hand-slot
if(this->HandObjects() > 1)
@ -56,6 +56,17 @@ public func ObjectControl(int plr, int ctrl, int x, int y, int strength, bool re
return true;
}
if (ctrl == CON_InventoryShiftForward)
{
ShiftContents();
return true;
}
if (ctrl == CON_InventoryShiftBackward)
{
ShiftContents(true);
return true;
}
// hotkeys (inventory, vehicle and structure control)
var hot = 0;
if (ctrl == CON_InteractionHotkey0) hot = 10;

View File

@ -130,6 +130,16 @@
GUIName=$CON_QuickSwitch$
GUIDesc=$CON_QuickSwitch_Desc$
[ControlDef]
Identifier=InventoryShiftForward
GUIName=$CON_InventoryShiftForward$
GUIDesc=$CON_InventoryShiftForward_Desc$
[ControlDef]
Identifier=InventoryShiftBackward
GUIName=$CON_InventoryShiftBackward$
GUIDesc=$CON_InventoryShiftBackward_Desc$
[ControlDef]
Identifier=Throw
GUIName=$CON_Throw$
@ -597,6 +607,8 @@
# Interact Space
#
# QuickSwitch Q
# InventoryShiftForward MouseWheelUp
# InventoryShiftBackward MouseWheelDown
# Contents E
# Collect A,D,W,S
#
@ -629,6 +641,16 @@
Control=QuickSwitch
GUIGroup=50
[Assignment]
Key=Mouse1Wheel1Up
GUIGroup=50
Control=InventoryShiftBackward
[Assignment]
Key=Mouse1Wheel1Down
GUIGroup=50
Control=InventoryShiftForward
# Menu
[Assignment]
@ -733,13 +755,13 @@
# Zoom
[Assignment]
Key=Mouse1Wheel1Up
Key=Shift+Mouse1Wheel1Up
GUIGroup=60
Priority=100
Control=WheelZoomIn
[Assignment]
Key=Mouse1Wheel1Down
Key=Shift+Mouse1Wheel1Down
GUIGroup=60
Priority=100
Control=WheelZoomOut

View File

@ -17,6 +17,10 @@ CON_ThrowAlt_Desc=Werfen des Gegenstandes in der anderen Hand in die anvisierte
CON_QuickSwitch=Schnellwechsel
CON_QuickSwitch_Desc=Das zuletzt angewählte Inventarobjekt auswählen.
CON_InventoryShiftForward=Nächstes Item
CON_InventoryShiftForward_Desc=Wählt das nächste Item im Inventar aus.
CON_InventoryShiftBackward=Letztes Item
CON_InventoryShiftBackward_Desc=Wählt das vorherige Item im Inventar aus.
CON_Drop=Ablegen
CON_Drop_Desc=Ablegen des Gegenstandes in der Hand.
CON_DropAlt=Ablegen (andere Hand)

View File

@ -17,6 +17,10 @@ CON_ThrowAlt_Desc=Throw the item in the other hand into the aimed direction.
CON_QuickSwitch=Quick Switch
CON_QuickSwitch_Desc=Change the selection to the last active item slot.
CON_InventoryShiftForward=Next item
CON_InventoryShiftForward_Desc=Selects the next item from the inventory.
CON_InventoryShiftBackward=Previous item
CON_InventoryShiftBackward_Desc=Selects the last item from the inventory.
CON_Drop=Drop
CON_Drop_Desc=Drop the item in the hand.
CON_DropAlt=Drop (other hand)