@@ -20,8 +20,6 @@ local pionillium = ui.fonts.pionillium
20
20
local orbiteer = ui .fonts .orbiteer
21
21
local Vector2 = _G .Vector2
22
22
23
- local iconSize = ui .rescaleUI (Vector2 (28 , 28 ))
24
- local buttonSpaceSize = iconSize
25
23
-- FIXME: need to manually set itemSpacing to be able to properly size columns
26
24
-- Need a style-var query system for best effect
27
25
local itemSpacing = ui .rescaleUI (Vector2 (6 , 12 ), Vector2 (1600 , 900 ))
@@ -229,8 +227,9 @@ local function fuelTransferButton(drive, amt)
229
227
230
228
local color = driveEnabled and ui .theme .buttonColors .disabled or ui .theme .buttonColors .default
231
229
local icon = amt < 0 and icons .chevron_down or icons .chevron_up
230
+ local tooltip = amt < 0 and l .PUMP_DOWN_FROM_HYPERDRIVE_TOOLTIP or l .PUMP_DOWN_TO_HYPERDRIVE_TOOLTIP
232
231
233
- if ui .button (ui .get_icon_glyph (icon ) .. tostring (math.abs (amt )), Vector2 (100 , 0 ), color ) then
232
+ if ui .button (ui .get_icon_glyph (icon ) .. tostring (math.abs (amt )), Vector2 (100 , 0 ), color , string.format ( tooltip , math.abs ( amt )) ) then
234
233
if not driveEnabled then
235
234
if drive .fuel == Commodities .hydrogen then
236
235
transfer_hyperfuel_hydrogen (drive , amt )
@@ -286,7 +285,7 @@ local function drawPumpDialog()
286
285
ui .sameLine (width )
287
286
local options = {1 , 10 , 100 }
288
287
for _ , k in ipairs (options ) do
289
- if ui .button (tostring (k ) .. " ##fuel" , Vector2 (100 , 0 )) then
288
+ if ui .button (tostring (k ) .. " ##fuel" , Vector2 (100 , 0 ), nil , string.format ( l . PUMP_DOWN_FROM_CARGO_TOOLTIP , k ) ) then
290
289
-- Refuel k tonnes from cargo hold
291
290
Game .player :Refuel (Commodities .hydrogen , k )
292
291
end
@@ -301,7 +300,7 @@ local function drawPumpDialog()
301
300
ui .sameLine (width )
302
301
for _ , v in ipairs (options ) do
303
302
local fuel = - 1 * v
304
- if ui .button (fuel .. " ##pump" , Vector2 (100 , 0 )) then
303
+ if ui .button (fuel .. " ##pump" , Vector2 (100 , 0 ), nil , string.format ( l . PUMP_DOWN_TO_CARGO_TOOLTIP , v ) ) then
305
304
pumpDown (fuel )
306
305
end
307
306
ui .sameLine ()
0 commit comments