@@ -104,10 +104,6 @@ local function displayTargetScanner(min, max)
104
104
local height = (ui .gauge_height * 1.4 ) * 2 + textHeight * 3 + headingHeight + ui .gauge_height * 0.5
105
105
106
106
local pos , size = ui .rectcut (min , max , height , ui .sides .bottom )
107
- if ui .timeWindowSize and size .x > ui .timeWindowSize .x then
108
- pos .x = pos .x + (size .x - ui .timeWindowSize .x )
109
- size .x = ui .timeWindowSize .x
110
- end
111
107
112
108
ui .setNextWindowPos (pos , " Always" )
113
109
ui .setNextWindowSize (size , " Always" )
@@ -133,11 +129,6 @@ local function displayCloudScanner(min, max)
133
129
+ ui .getItemSpacing ().y
134
130
135
131
local pos , size = ui .rectcut (min , max , height , ui .sides .bottom )
136
- if ui .timeWindowSize and size .x > ui .timeWindowSize .x then
137
- pos .x = pos .x + (size .x - ui .timeWindowSize .x )
138
- size .x = ui .timeWindowSize .x
139
- end
140
-
141
132
142
133
ui .setNextWindowPos (pos , " Always" )
143
134
ui .setNextWindowSize (size , " Always" )
@@ -180,6 +171,10 @@ gameView.registerHudModule('target-scanner', {
180
171
colors = ui .theme .colors
181
172
icons = ui .theme .icons
182
173
player = gameView .player
174
+ -- restrict this HUD module to the width of the time window
175
+ if ui .timeWindowSize then
176
+ min .x = math.max (min .x , max .x - ui .timeWindowSize .x )
177
+ end
183
178
displayTargetScanner (min , max )
184
179
end
185
180
})
@@ -192,6 +187,10 @@ gameView.registerHudModule('hyperspacecloud-scanner', {
192
187
colors = ui .theme .colors
193
188
icons = ui .theme .icons
194
189
player = gameView .player
190
+ -- restrict this HUD module to the width of the time window
191
+ if ui .timeWindowSize then
192
+ min .x = math.max (min .x , max .x - ui .timeWindowSize .x )
193
+ end
195
194
displayCloudScanner (min , max )
196
195
end
197
196
})
0 commit comments