Created
November 13, 2016 16:22
-
-
Save johnnymo87/f75c1983abad3b4bb42c63b18bc011ac to your computer and use it in GitHub Desktop.
Expose 'Auto Unit Cycle' option in the UI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 04157d2e3825baf4793e454076ffa0a12765bf6e Mon Sep 17 00:00:00 2001 | |
From: johnnymo87 <johnnymo87@gmail.com> | |
Date: Sun, 13 Nov 2016 16:14:16 +0000 | |
Subject: [PATCH] Expose 'Auto Unit Cycle' option in the UI | |
--- | |
Text/en_US/FrontEndText.xml | 3 +++ | |
UI/Options.lua | 5 +++++ | |
UI/Options.xml | 4 ++++ | |
3 files changed, 12 insertions(+) | |
diff --git a/Text/en_US/FrontEndText.xml b/Text/en_US/FrontEndText.xml | |
index 78b2de7..851ded8 100755 | |
--- a/Text/en_US/FrontEndText.xml | |
+++ b/Text/en_US/FrontEndText.xml | |
@@ -504,6 +504,9 @@ | |
<Row Tag="LOC_OPTIONS_QUICK_MOVEMENT"> | |
<Text>Quick Movement:</Text> | |
</Row> | |
+ <Row Tag="LOC_OPTIONS_AUTO_UNIT_CYCLE"> | |
+ <Text>Auto Unit Cycle:</Text> | |
+ </Row> | |
<Row Tag="LOC_OPTIONS_AUTO_END_TURN"> | |
<Text>Auto End Turn:</Text> | |
</Row> | |
diff --git a/UI/Options.lua b/UI/Options.lua | |
index 5719b6a..db7f444 100755 | |
--- a/UI/Options.lua | |
+++ b/UI/Options.lua | |
@@ -1092,6 +1092,11 @@ function TemporaryHardCodedGoodness() | |
end, | |
UserConfiguration.IsValueLocked("QuickMovement")); | |
+ PopulateComboBox(Controls.AutoUnitCyclePullDown, boolean_options, Options.GetUserOption("Gameplay", "AutoUnitCycle"), function(option) | |
+ Options.SetUserOption("Gameplay", "AutoUnitCycle", option); | |
+ end, | |
+ UserConfiguration.IsValueLocked("AutoUnitCycle")); | |
+ | |
PopulateComboBox(Controls.AutoEndTurnPullDown, boolean_options, Options.GetUserOption("Gameplay", "AutoEndTurn"), function(option) | |
Options.SetUserOption("Gameplay", "AutoEndTurn", option); | |
end, | |
diff --git a/UI/Options.xml b/UI/Options.xml | |
index f066ed4..713deaa 100755 | |
--- a/UI/Options.xml | |
+++ b/UI/Options.xml | |
@@ -42,6 +42,10 @@ | |
<Label Anchor="L,C" Style="ShellOptionText" String="LOC_OPTIONS_QUICK_MOVEMENT"/> | |
</Stack> | |
<Stack Anchor="R,T" StackGrowth="Left" Padding="5"> | |
+ <PullDown ID="AutoUnitCyclePullDown" Style="PullDownBlue" ScrollThreshold="400" Size="300,24" Offset="0,0" SpaceForScroll="0"/> | |
+ <Label Anchor="L,C" Style="ShellOptionText" String="LOC_OPTIONS_AUTO_UNIT_CYCLE"/> | |
+ </Stack> | |
+ <Stack Anchor="R,T" StackGrowth="Left" Padding="5"> | |
<PullDown ID="AutoEndTurnPullDown" Style="PullDownBlue" ScrollThreshold="400" Size="300,24" Offset="0,0" SpaceForScroll="0"/> | |
<Label Anchor="L,C" Style="ShellOptionText" String="LOC_OPTIONS_AUTO_END_TURN"/> | |
</Stack> | |
-- | |
2.9.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Directions
Let's start by committing the current state of the assets.
Now save
auto-unit-cycle.diff
as a file here and apply it.git am < auto-unit-cycle.diff
Restart the game. When you view your game options, you should see the following: