Fixed fields missing the readonly modifier
This commit is contained in:
@@ -34,12 +34,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
readonly World world;
|
||||
readonly ModData modData;
|
||||
|
||||
Widget panel;
|
||||
readonly Widget panel;
|
||||
|
||||
TextFieldWidget filenameInput;
|
||||
SliderWidget frameSlider;
|
||||
ScrollPanelWidget assetList;
|
||||
ScrollItemWidget template;
|
||||
readonly TextFieldWidget filenameInput;
|
||||
readonly SliderWidget frameSlider;
|
||||
readonly ScrollPanelWidget assetList;
|
||||
readonly ScrollItemWidget template;
|
||||
|
||||
IReadOnlyPackage assetSource = null;
|
||||
bool animateFrames = false;
|
||||
@@ -385,7 +385,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
currentFrame = currentSprites.Length - 1;
|
||||
}
|
||||
|
||||
Dictionary<string, bool> assetVisByName = new Dictionary<string, bool>();
|
||||
readonly Dictionary<string, bool> assetVisByName = new Dictionary<string, bool>();
|
||||
|
||||
bool FilterAsset(string filename)
|
||||
{
|
||||
|
||||
@@ -17,8 +17,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ConnectionLogic : ChromeLogic
|
||||
{
|
||||
Action onConnect, onAbort;
|
||||
Action<string> onRetry;
|
||||
readonly Action onConnect;
|
||||
readonly Action onAbort;
|
||||
readonly Action<string> onRetry;
|
||||
|
||||
void ConnectionStateChanged(OrderManager om, string password, NetworkConnection connection)
|
||||
{
|
||||
@@ -81,7 +82,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
public class ConnectionFailedLogic : ChromeLogic
|
||||
{
|
||||
PasswordFieldWidget passwordField;
|
||||
readonly PasswordFieldWidget passwordField;
|
||||
bool passwordOffsetAdjusted;
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
|
||||
@@ -22,8 +22,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
readonly ScrollPanelWidget scrollPanel;
|
||||
readonly LabelWidget template;
|
||||
|
||||
bool showModTab;
|
||||
bool showEngineTab;
|
||||
readonly bool showModTab;
|
||||
readonly bool showEngineTab;
|
||||
bool isShowingModTab;
|
||||
readonly IEnumerable<string> modLines;
|
||||
readonly IEnumerable<string> engineLines;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class NewMapLogic : ChromeLogic
|
||||
{
|
||||
Widget panel;
|
||||
readonly Widget panel;
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public NewMapLogic(Action onExit, Action<string> onSelect, Widget widget, World world, ModData modData)
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
readonly Action<bool> hideMenu;
|
||||
readonly IObjectivesPanel iop;
|
||||
IngameInfoPanel activePanel;
|
||||
bool hasError;
|
||||
readonly bool hasError;
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public GameInfoLogic(Widget widget, ModData modData, World world, IngameInfoPanel initialPanel, Action<bool> hideMenu)
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic.Ingame
|
||||
[ChromeLogicArgsHotkeys("CycleStatusBarsKey")]
|
||||
public class CycleStatusBarsHotkeyLogic : SingleHotkeyBaseLogic
|
||||
{
|
||||
StatusBarsType[] options = { StatusBarsType.Standard, StatusBarsType.DamageShow, StatusBarsType.AlwaysShow };
|
||||
readonly StatusBarsType[] options = { StatusBarsType.Standard, StatusBarsType.DamageShow, StatusBarsType.AlwaysShow };
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public CycleStatusBarsHotkeyLogic(Widget widget, ModData modData, Dictionary<string, MiniYaml> logicArgs)
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
readonly WorldRenderer worldRenderer;
|
||||
readonly MenuPaletteEffect mpe;
|
||||
readonly bool isSinglePlayer;
|
||||
bool hasError;
|
||||
readonly bool hasError;
|
||||
bool leaving;
|
||||
bool hideMenu;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
readonly World world;
|
||||
|
||||
CameraOption selected;
|
||||
LabelWidget shroudLabel;
|
||||
readonly LabelWidget shroudLabel;
|
||||
|
||||
class CameraOption
|
||||
{
|
||||
|
||||
@@ -25,9 +25,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
class SlotDropDownOption
|
||||
{
|
||||
public string Title;
|
||||
public string Order;
|
||||
public Func<bool> Selected;
|
||||
public readonly string Title;
|
||||
public readonly string Order;
|
||||
public readonly Func<bool> Selected;
|
||||
|
||||
public SlotDropDownOption(string title, string order, Func<bool> selected)
|
||||
{
|
||||
|
||||
@@ -24,13 +24,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
MapClassification currentTab;
|
||||
|
||||
Dictionary<MapClassification, ScrollPanelWidget> scrollpanels = new Dictionary<MapClassification, ScrollPanelWidget>();
|
||||
readonly Dictionary<MapClassification, ScrollPanelWidget> scrollpanels = new Dictionary<MapClassification, ScrollPanelWidget>();
|
||||
|
||||
Dictionary<MapClassification, MapPreview[]> tabMaps = new Dictionary<MapClassification, MapPreview[]>();
|
||||
readonly Dictionary<MapClassification, MapPreview[]> tabMaps = new Dictionary<MapClassification, MapPreview[]>();
|
||||
string[] visibleMaps;
|
||||
|
||||
string selectedUid;
|
||||
Action<string> onSelect;
|
||||
readonly Action<string> onSelect;
|
||||
|
||||
string category;
|
||||
string mapFilter;
|
||||
|
||||
Reference in New Issue
Block a user