Toggle-able teamchat on shift-enter
This commit is contained in:
committed by
Chris Forbes
parent
ad1af792e6
commit
a904047a16
@@ -66,6 +66,9 @@ namespace OpenRA.GameRules
|
|||||||
public string[] Mods = { "ra" };
|
public string[] Mods = { "ra" };
|
||||||
public bool MatchTimer = true;
|
public bool MatchTimer = true;
|
||||||
|
|
||||||
|
// Chat settings
|
||||||
|
public bool TeamChatToggle = false;
|
||||||
|
|
||||||
// Behaviour settings
|
// Behaviour settings
|
||||||
public bool ViewportEdgeScroll = true;
|
public bool ViewportEdgeScroll = true;
|
||||||
public bool InverseDragScroll = false;
|
public bool InverseDragScroll = false;
|
||||||
|
|||||||
9
OpenRA.Game/Widgets/ChatEntryWidget.cs
Normal file → Executable file
9
OpenRA.Game/Widgets/ChatEntryWidget.cs
Normal file → Executable file
@@ -81,7 +81,14 @@ namespace OpenRA.Widgets
|
|||||||
{
|
{
|
||||||
TakeFocus(new MouseInput());
|
TakeFocus(new MouseInput());
|
||||||
composing = true;
|
composing = true;
|
||||||
teamChat ^= e.Modifiers.HasModifier(Modifiers.Shift);
|
if (Game.Settings.Game.TeamChatToggle)
|
||||||
|
{
|
||||||
|
teamChat ^= e.Modifiers.HasModifier(Modifiers.Shift);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
teamChat = e.Modifiers.HasModifier(Modifiers.Shift);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
OpenRA.Game/Widgets/Delegates/SettingsMenuDelegate.cs
Normal file → Executable file
10
OpenRA.Game/Widgets/Delegates/SettingsMenuDelegate.cs
Normal file → Executable file
@@ -70,7 +70,15 @@ namespace OpenRA.Widgets.Delegates
|
|||||||
Game.Settings.Game.InverseDragScroll ^= true;
|
Game.Settings.Game.InverseDragScroll ^= true;
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var teamChatToggle = general.GetWidget<CheckboxWidget>("TEAMCHAT_TOGGLE");
|
||||||
|
teamChatToggle.Checked = () => Game.Settings.Game.TeamChatToggle;
|
||||||
|
teamChatToggle.OnMouseDown = mi =>
|
||||||
|
{
|
||||||
|
Game.Settings.Game.TeamChatToggle ^= true;
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
var audio = bg.GetWidget("AUDIO_PANE");
|
var audio = bg.GetWidget("AUDIO_PANE");
|
||||||
|
|
||||||
|
|||||||
@@ -106,10 +106,17 @@ Background@SETTINGS_MENU:
|
|||||||
Checkbox@INVERSE_SCROLL:
|
Checkbox@INVERSE_SCROLL:
|
||||||
Id:INVERSE_SCROLL
|
Id:INVERSE_SCROLL
|
||||||
X:0
|
X:0
|
||||||
Y:120
|
Y:90
|
||||||
Width:200
|
Width:200
|
||||||
Height:20
|
Height:20
|
||||||
Text: Invert Mouse Drag Scrolling
|
Text: Invert Mouse Drag Scrolling
|
||||||
|
Checkbox@TEAMCHAT_TOGGLE:
|
||||||
|
Id:TEAMCHAT_TOGGLE
|
||||||
|
X:0
|
||||||
|
Y:120
|
||||||
|
Width:200
|
||||||
|
Height:20
|
||||||
|
Text: Shift-Enter Toggles Team Chat
|
||||||
Container@AUDIO_PANE:
|
Container@AUDIO_PANE:
|
||||||
Id:AUDIO_PANE
|
Id:AUDIO_PANE
|
||||||
X:37
|
X:37
|
||||||
|
|||||||
@@ -107,10 +107,17 @@ Background@SETTINGS_MENU:
|
|||||||
Checkbox@INVERSE_SCROLL:
|
Checkbox@INVERSE_SCROLL:
|
||||||
Id:INVERSE_SCROLL
|
Id:INVERSE_SCROLL
|
||||||
X:0
|
X:0
|
||||||
Y:120
|
Y:90
|
||||||
Width:200
|
Width:200
|
||||||
Height:20
|
Height:20
|
||||||
Text: Invert Mouse Drag Scrolling
|
Text: Invert Mouse Drag Scrolling
|
||||||
|
Checkbox@TEAMCHAT_TOGGLE:
|
||||||
|
Id:TEAMCHAT_TOGGLE
|
||||||
|
X:0
|
||||||
|
Y:120
|
||||||
|
Width:200
|
||||||
|
Height:20
|
||||||
|
Text: Shift-Enter Toggles Team Chat
|
||||||
Container@AUDIO_PANE:
|
Container@AUDIO_PANE:
|
||||||
Id:AUDIO_PANE
|
Id:AUDIO_PANE
|
||||||
X:37
|
X:37
|
||||||
|
|||||||
Reference in New Issue
Block a user