Commit b17f210
authored
Fix multiple, overlapping, instances HouseRules UI appearing. (#575)
Issue: When changing pages in the HR UI, multiple pages are overlapping
onto one another.
Root cause: The process that determines whether or not to load UIs (our
`OnSceneLoaded()` hook function) is triggering the HR UI be loaded
multiple times.
Solution: Our `OnSceneLoaded()` is re-written to be more explicit about
how to determine when to load in the UI. It follows the same approach as
#549: to be very explicit
about which scenes, and on which platforms, constitute being in the
"lobby" where we want to UI rendered.
---
Additional background: Some time back, RG added helpers as part of their
`MotherbrainGlobalVars` class, capturing the exact platform the game is
being run on. This didn't exist before, and so at the time we introduced
a helper (`Common.UI/Environments`) to help us determine that ourselves.
Our method has become a bit flaky as the game as been ported to
different platforms and seen changes in scene numbers. It is now uneeded
as RG has captured that info on their end, which we can piggyback on to
determine the platform and scene more precisely.
Hence the removal of some of the code in `Common.UI/Environments`.1 parent 7804637 commit b17f210
File tree
3 files changed
+50
-44
lines changed- Common.UI
- HouseRules.Configuration
3 files changed
+50
-44
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 5 | | |
13 | 6 | | |
14 | | - | |
15 | | - | |
| 7 | + | |
| 8 | + | |
16 | 9 | | |
17 | | - | |
| 10 | + | |
18 | 11 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 12 | + | |
25 | 13 | | |
26 | | - | |
| 14 | + | |
27 | 15 | | |
28 | 16 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 17 | + | |
| 18 | + | |
41 | 19 | | |
42 | 20 | | |
43 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
95 | | - | |
| 97 | + | |
96 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
97 | 105 | | |
98 | 106 | | |
99 | 107 | | |
100 | | - | |
| 108 | + | |
101 | 109 | | |
102 | | - | |
| 110 | + | |
103 | 111 | | |
104 | | - | |
| 112 | + | |
105 | 113 | | |
106 | 114 | | |
| 115 | + | |
| 116 | + | |
107 | 117 | | |
108 | | - | |
| 118 | + | |
| 119 | + | |
109 | 120 | | |
110 | 121 | | |
111 | 122 | | |
| 123 | + | |
112 | 124 | | |
113 | | - | |
| 125 | + | |
| 126 | + | |
114 | 127 | | |
115 | | - | |
116 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
117 | 135 | | |
118 | | - | |
| 136 | + | |
| 137 | + | |
119 | 138 | | |
120 | | - | |
| 139 | + | |
121 | 140 | | |
122 | | - | |
123 | | - | |
| 141 | + | |
| 142 | + | |
124 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
125 | 153 | | |
126 | 154 | | |
127 | 155 | | |
| |||
0 commit comments