Skip to content

Commit

Permalink
Tooltips, MouseController and UI Fixes (OrderOfThePorcupine#81)
Browse files Browse the repository at this point in the history
* Fixes multiple UI issues from the settings menu, everything should scale much much better now :).
* Adds tooltips to settings menu, and changes the current tooltips to be more modular
* Adds tooltip option in developer (bit of a hack but since it is just for developers right now I'm letting it fly)
* Small other fixes.
  • Loading branch information
BraedonWooding authored Jun 17, 2018
1 parent 3b1fa24 commit 715a63f
Show file tree
Hide file tree
Showing 69 changed files with 2,461 additions and 1,287 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ StyleCopViolations.xml
# SpriteToXML Image folders
/Assets/Resources/Editor/SpriteToXML/*
/Assets/Resources/Editor/SpriteToXML.meta
/Assets/Resources/Editor.meta
/Assets/Resources/Editor.meta
2 changes: 1 addition & 1 deletion Assets/Editor/BuildGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static void Windows64()

public static void OSX()
{
BuildPipeline.BuildPlayer(GetScenes(), "Builds/" + BuildName + "_OSX", BuildTarget.StandaloneOSXUniversal, BuildOptions.None);
BuildPipeline.BuildPlayer(GetScenes(), "Builds/" + BuildName + "_OSX", BuildTarget.StandaloneOSX, BuildOptions.None);
}

public static void Linux()
Expand Down
6 changes: 3 additions & 3 deletions Assets/Editor/UnitTests/Models/Power/PowerGridTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

public class PowerGridTest
{
private Grid grid;
private UtilityGrid grid;
private HashSet<IPluggable> connections;

[SetUp]
public void Init()
{
grid = new Grid();
Type powerGridType = typeof(Grid);
grid = new UtilityGrid();
Type powerGridType = typeof(UtilityGrid);
FieldInfo field = powerGridType.GetField("connections", BindingFlags.NonPublic | BindingFlags.Instance);
Assert.IsNotNull(field);
connections = field.GetValue(grid) as HashSet<IPluggable>;
Expand Down
8 changes: 4 additions & 4 deletions Assets/Editor/UnitTests/Models/Power/PowerNetworkTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public class PowerNetworkTest
{
private PowerNetwork powerNetwork;
private HashSet<Grid> powerGrids;
private HashSet<UtilityGrid> powerGrids;

[SetUp]
public void Init()
Expand All @@ -24,7 +24,7 @@ public void Init()
Type livePowerSystemType = typeof(PowerNetwork);
FieldInfo field = livePowerSystemType.GetField("powerGrids", BindingFlags.NonPublic | BindingFlags.Instance);
Assert.IsNotNull(field);
powerGrids = field.GetValue(powerNetwork) as HashSet<Grid>;
powerGrids = field.GetValue(powerNetwork) as HashSet<UtilityGrid>;
Assert.IsNotNull(powerGrids);
Assert.AreEqual(0, powerGrids.Count);
}
Expand All @@ -48,7 +48,7 @@ public void IsPluggedInTest()
MockConnection connection = new MockConnection();
Assert.IsTrue(powerNetwork.PlugIn(connection));
Assert.AreEqual(1, powerGrids.Count);
Grid grid;
UtilityGrid grid;
Assert.IsTrue(powerNetwork.IsPluggedIn(connection, out grid));
Assert.IsNotNull(grid);
}
Expand All @@ -57,7 +57,7 @@ public void IsPluggedInTest()
public void UnplugTest()
{
MockConnection connection = new MockConnection();
Grid grid = new Grid();
UtilityGrid grid = new UtilityGrid();
Assert.IsTrue(powerNetwork.PlugIn(connection, grid));
Assert.AreEqual(1, powerGrids.Count);
powerNetwork.Unplug(connection);
Expand Down
2 changes: 1 addition & 1 deletion Assets/Plugins/x86_64.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 22 additions & 18 deletions Assets/Resources/UI/SettingsMenu/Heading Section.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
serializedVersion: 5
m_Component:
- 224: {fileID: 224000010702637000}
- 114: {fileID: 114000011548357258}
- component: {fileID: 224000010702637000}
- component: {fileID: 114000011548357258}
m_Layer: 5
m_Name: Root Of Objects
m_TagString: Untagged
Expand All @@ -32,12 +32,12 @@ GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
serializedVersion: 5
m_Component:
- 224: {fileID: 224000010231090720}
- 222: {fileID: 222000014160087150}
- 114: {fileID: 114000013773110676}
- 114: {fileID: 114000010326162276}
- component: {fileID: 224000010231090720}
- component: {fileID: 222000014160087150}
- component: {fileID: 114000013773110676}
- component: {fileID: 114000010326162276}
m_Layer: 5
m_Name: Heading
m_TagString: Untagged
Expand All @@ -50,14 +50,14 @@ GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
serializedVersion: 5
m_Component:
- 224: {fileID: 224000012154001802}
- 222: {fileID: 222000012375702020}
- 114: {fileID: 114000010065151278}
- 114: {fileID: 114000012681863884}
- 114: {fileID: 114000012764975788}
- 114: {fileID: 114000010269573494}
- component: {fileID: 224000012154001802}
- component: {fileID: 222000012375702020}
- component: {fileID: 114000010065151278}
- component: {fileID: 114000012681863884}
- component: {fileID: 114000012764975788}
- component: {fileID: 114000010269573494}
m_Layer: 5
m_Name: Heading Section
m_TagString: Untagged
Expand Down Expand Up @@ -127,6 +127,8 @@ MonoBehaviour:
m_Spacing: 10
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 1
--- !u!114 &114000012681863884
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -165,6 +167,8 @@ MonoBehaviour:
m_Spacing: 10
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 1
--- !u!114 &114000013773110676
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -219,10 +223,10 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 224000012154001802}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
Expand All @@ -237,10 +241,10 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 224000012154001802}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
Expand All @@ -255,12 +259,12 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 224000010231090720}
- {fileID: 224000010702637000}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down
44 changes: 22 additions & 22 deletions Assets/Resources/UI/SettingsMenu/SettingsMenu.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ MonoBehaviour:
m_Left: 5
m_Right: 5
m_Top: 5
m_Bottom: 5
m_Bottom: 20
m_ChildAlignment: 1
m_Spacing: 20
m_ChildForceExpandWidth: 0
Expand Down Expand Up @@ -1227,7 +1227,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 114000012645010866}
m_HandleRect: {fileID: 224000012735617032}
m_Direction: 0
m_Value: 0
m_Value: 1
m_Size: 1
m_NumberOfSteps: 0
m_OnValueChanged:
Expand Down Expand Up @@ -2253,7 +2253,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.29165834, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0.9000015, y: 0.2050476}
m_AnchoredPosition: {x: 0.8999939, y: 0.2050476}
m_SizeDelta: {x: -1.699997, y: 0.4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224000010454107442
Expand Down Expand Up @@ -2289,7 +2289,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0.000015258789}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224000010509675462
Expand Down Expand Up @@ -2346,7 +2346,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.09958455, y: 0.86058897}
m_AnchorMax: {x: 0.9634155, y: 0.95956755}
m_AnchoredPosition: {x: -0.15788269, y: -0.17280269}
m_AnchoredPosition: {x: -0.15788269, y: -0.17280579}
m_SizeDelta: {x: -0.61302185, y: -0.341321}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224000010960409464
Expand Down Expand Up @@ -2499,10 +2499,10 @@ RectTransform:
m_Father: {fileID: 224000013598409594}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0.010502, y: 3}
m_SizeDelta: {x: 1000, y: 443}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0.010498047, y: 3}
m_SizeDelta: {x: 0, y: -7}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224000011215375926
RectTransform:
Expand Down Expand Up @@ -2575,7 +2575,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -17, y: -17}
m_SizeDelta: {x: -17, y: -17.044434}
m_Pivot: {x: 0, y: 1}
--- !u!224 &224000011741414480
RectTransform:
Expand Down Expand Up @@ -2631,7 +2631,7 @@ RectTransform:
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: -17}
m_SizeDelta: {x: 20, y: -17.044434}
m_Pivot: {x: 1, y: 1}
--- !u!224 &224000012124696542
RectTransform:
Expand Down Expand Up @@ -2689,7 +2689,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -19.241714, y: 0}
m_SizeDelta: {x: -19.220078, y: 0}
m_Pivot: {x: 0.49999997, y: 0.5}
--- !u!224 &224000012475216578
RectTransform:
Expand Down Expand Up @@ -2766,7 +2766,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -0.115}
m_AnchorMin: {x: 0.016779127, y: 0.85877854}
m_AnchorMax: {x: 0.9412966, y: 0.9578037}
m_AnchoredPosition: {x: -0.93803406, y: -0.1753664}
m_AnchoredPosition: {x: -0.93803406, y: -0.17536926}
m_SizeDelta: {x: -0.8130188, y: -0.23613262}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224000012735617032
Expand Down Expand Up @@ -2805,7 +2805,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.009723913, y: 0.18980376}
m_AnchorMax: {x: 0.94900006, y: 0.8461963}
m_AnchoredPosition: {x: 1, y: 1.5}
m_AnchoredPosition: {x: 1, y: 1.4999924}
m_SizeDelta: {x: 1, y: 3}
m_Pivot: {x: 0.5, y: 1}
--- !u!224 &224000013056668286
Expand Down Expand Up @@ -2896,9 +2896,9 @@ RectTransform:
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -17, y: 20}
m_SizeDelta: {x: -17, y: -274}
m_Pivot: {x: 0, y: 0}
--- !u!224 &224000013586943306
RectTransform:
Expand All @@ -2925,18 +2925,18 @@ RectTransform:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1000011176379986}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 224000011115446418}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0.5}
m_SizeDelta: {x: 1000, y: 450}
m_AnchorMin: {x: 0.008412546, y: 0.10943778}
m_AnchorMax: {x: 0.9855247, y: 0.8905408}
m_AnchoredPosition: {x: 0.5, y: -0.39999962}
m_SizeDelta: {x: 2.1000004, y: 1.800003}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224000013794509604
RectTransform:
Expand All @@ -2954,7 +2954,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -637.7317, y: -267.04443}
m_SizeDelta: {x: -512.73376, y: -196.72783}
m_Pivot: {x: 0.5, y: 1}
--- !u!224 &224000014024927718
RectTransform:
Expand Down
2 changes: 1 addition & 1 deletion Assets/Resources/UI/SettingsMenu/SettingsMenu.prefab.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 715a63f

Please sign in to comment.