Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/snippets/features.7287.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Add an option to scale the economy overlay (#7287).
2 changes: 2 additions & 0 deletions loc/CN/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7559,6 +7559,8 @@ OPTIONS_0283="UI缩放"
OPTIONS_0284="更改所有UI控件的大小。(需要重启游戏)"
OPTIONS_0285="自动提取器选择"
OPTIONS_0286="选择工程师后,将鼠标悬停在质量提取资源点上即可自动预先选择用于建造的质量提取器."
OPTIONS_ECON_OVERLAY_SCALE_TITLE="经济界面缩放"
OPTIONS_ECON_OVERLAY_SCALE_DESCRIPTION="调整经济界面的大小。\n如果本次会话已启用经济界面,则需要重新启动游戏。"
SCORE_0042="没有目标"
SCORE_0048="这个目标只有在完成之后才会被显示"
SCORE_0062="没有得分数据"
Expand Down
2 changes: 2 additions & 0 deletions loc/CZ/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,8 @@ OPTIONS_0283="Měřítko uživatelského rozhraní"
OPTIONS_0284="Změní velikost všech prvků uživatelského prostředí. (Vyžaduje restart hry)"
OPTIONS_0285="Automatic Extractor Selection"
OPTIONS_0286="After selecting an engineer, hover the mouse over a mass extractor spot to autopreselect a mass extractor for building"
OPTIONS_ECON_OVERLAY_SCALE_TITLE="Měřítko ekonomického náhledu"
OPTIONS_ECON_OVERLAY_SCALE_DESCRIPTION="Upraví velikost ekonomického náhledu.\nPo zapnutí náhledu v této relaci je vyžadován restart hry."
Objective="Úkol"
Ops="Operační"
Ops_Choir_010_010="[{i Choir}]: Civilní budovy pod útokem!"
Expand Down
2 changes: 2 additions & 0 deletions loc/DE/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,8 @@ OPTIONS_0283="UI Scale"
OPTIONS_0284="Changes the size of all UI elements. (requires game restart)"
OPTIONS_0285="Automatische Extraktorauswahl"
OPTIONS_0286="Nachdem Sie einen Techniker ausgewählt haben, bewegen Sie die Maus über einen Massenextraktor-Punkt, um automatisch einen Massenextraktor zum Bauen auszuwählen"
OPTIONS_ECON_OVERLAY_SCALE_TITLE="Maßstab der Ökonomie-Einblendung"
OPTIONS_ECON_OVERLAY_SCALE_DESCRIPTION="Passt die Größe der Ökonomie-Einblendung an.\nErfordert einen Neustart, wenn die Einblendung in dieser Sitzung aktiviert war."
Objective="Ziel"
Ops="Ops"
Ops_Choir_010_010="[{i Choir}]: Zivile Gebäude werden angegriffen!"
Expand Down
2 changes: 2 additions & 0 deletions loc/ES/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1406,6 +1406,8 @@ OPTIONS_0283="UI Scale"
OPTIONS_0284="Changes the size of all UI elements. (requires game restart)"
OPTIONS_0285="Automatic Extractor Selection"
OPTIONS_0286="After selecting an engineer, hover the mouse over a mass extractor spot to autopreselect a mass extractor for building"
OPTIONS_ECON_OVERLAY_SCALE_TITLE="Escala de superposición económica"
OPTIONS_ECON_OVERLAY_SCALE_DESCRIPTION="Ajusta el tamaño de la superposición económica.\nRequiere reiniciar el juego si la superposición estaba activada en esta sesión."
Objective="Objetivo"
Ops="Ops"
Ops_Choir_010_010="[{i Choir}]: ¡Edificios civiles atacados!"
Expand Down
2 changes: 2 additions & 0 deletions loc/FR/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7698,6 +7698,8 @@ OPTIONS_0283="UI Scale"
OPTIONS_0284="Changes the size of all UI elements. (requires game restart)"
OPTIONS_0285="Sélection Automatique D'extracteur"
OPTIONS_0286="Après avoir sélectionné un ingénieur, positionnez la souris sur un emplacement d'extracteur de masse pour automatiquement pré-selectionner un extracteur de masse"
OPTIONS_ECON_OVERLAY_SCALE_TITLE="Échelle de la surimpression économique"
OPTIONS_ECON_OVERLAY_SCALE_DESCRIPTION="Ajuste la taille de la surimpression économique.\nNécessite un redémarrage du jeu si la surimpression a été activée pendant cette session."
lobui_0414 = "%d restrictions de construction"
lobui_0415 = "1 restriction de construction"
lobui_0416 = "Vérifiez la liste des unités"
Expand Down
2 changes: 2 additions & 0 deletions loc/IT/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7839,6 +7839,8 @@ OPTIONS_0283="UI Scale"
OPTIONS_0284="Changes the size of all UI elements. (requires game restart)"
OPTIONS_0285="Automatic Extractor Selection"
OPTIONS_0286="After selecting an engineer, hover the mouse over a mass extractor spot to autopreselect a mass extractor for building"
OPTIONS_ECON_OVERLAY_SCALE_TITLE="Scala del piano economico"
OPTIONS_ECON_OVERLAY_SCALE_DESCRIPTION="Regola la dimensione del piano economico.\nRichiede il riavvio del gioco se il piano economico era attivo in questa sessione."
lobui_0414 = "%d restrizioni alle costruzioni"
lobui_0415 = "1 restrizione alle costruzioni"
lobui_0416 = "controlla la gestione delle unità"
Expand Down
2 changes: 2 additions & 0 deletions loc/PL/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,8 @@ OPTIONS_0283="UI Scale"
OPTIONS_0284="Changes the size of all UI elements. (requires game restart)"
OPTIONS_0285="Automatic Extractor Selection"
OPTIONS_0286="After selecting an engineer, hover the mouse over a mass extractor spot to autopreselect a mass extractor for building"
OPTIONS_ECON_OVERLAY_SCALE_TITLE="Skala podglądu ekonomicznego"
OPTIONS_ECON_OVERLAY_SCALE_DESCRIPTION="Zmienia rozmiar podglądu ekonomicznego.\nWymaga ponownego uruchomienia gry, jeśli podgląd był włączony w tej sesji."
Objective="Cel"
Ops="Operacje"
Ops_Choir_010_010="[{i Choir}]: Budynki cywilne są atakowane!"
Expand Down
2 changes: 2 additions & 0 deletions loc/RU/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8678,6 +8678,8 @@ OPTIONS_0283="Масштаб пользовательского интерфей
OPTIONS_0284="Изменяет размер всех элементов пользовательского интерфейса. (Требуется перезагрузка игры)"
OPTIONS_0285="Автоматический выбор экстрактора"
OPTIONS_0286="После выбора инженера при наведии курсора мыши на экстрактор, будет автоматически выбран экстрактор для строительства"
OPTIONS_ECON_OVERLAY_SCALE_TITLE="Масштаб экономического слоя"
OPTIONS_ECON_OVERLAY_SCALE_DESCRIPTION="Изменяет размер экономического слоя.\nТребуется перезапуск игры, если слой был включён в этой сессии."

restricted_units_data_0016 = "Боевые единицы на воздушной подушке недоступны"
restricted_units_data_0030 = "Воздушные боевые единицы Т3 недоступны"
Expand Down
2 changes: 2 additions & 0 deletions loc/TW/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7546,6 +7546,8 @@ OPTIONS_0283="UI 縮放"
OPTIONS_0284="變更UI縮放比例(需要重啟遊戲)"
OPTIONS_0285="自動選擇質量萃取機"
OPTIONS_0286="當選擇一輛工程師時,游標如果位於質量礦床上將會自動出現建造模型"
OPTIONS_ECON_OVERLAY_SCALE_TITLE="經濟覆層縮放"
OPTIONS_ECON_OVERLAY_SCALE_DESCRIPTION="調整經濟覆層的大小。\n如果這次遊戲中已啟用經濟覆層,則需要重新啟動遊戲。"
OPTIONS_0287="工廠預設循環建造"
OPTIONS_0288="調整熱鍵縮放距離"
OPTIONS_0289="縮放開採標示"
Expand Down
2 changes: 2 additions & 0 deletions loc/TZM/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7823,6 +7823,8 @@ OPTIONS_0283="UI Scale"
OPTIONS_0284="Changes the size of all UI elements. (requires game restart)"
OPTIONS_0285="Automatic Extractor Selection"
OPTIONS_0286="After selecting an engineer, hover the mouse over a mass extractor spot to autopreselect a mass extractor for building"
OPTIONS_ECON_OVERLAY_SCALE_TITLE="Scale Economy Overlay"
OPTIONS_ECON_OVERLAY_SCALE_DESCRIPTION="Adjusts the size of the economy overlay.\nRequires a game restart if overlay was enabled this session."
lobui_0414 = "%d Build Restrictions"
lobui_0415 = "1 Build Restriction"
lobui_0416 = "Check Unit Manager"
Expand Down
2 changes: 2 additions & 0 deletions loc/US/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7633,6 +7633,8 @@ OPTIONS_0283="UI Scale"
OPTIONS_0284="Changes the size of all UI elements. (requires game restart)"
OPTIONS_0285="Automatic Extractor Selection"
OPTIONS_0286="After selecting an engineer, hover the mouse over a mass extractor spot to auto preselect a mass extractor for building"
OPTIONS_ECON_OVERLAY_SCALE_TITLE="Scale Economy Overlay"
OPTIONS_ECON_OVERLAY_SCALE_DESCRIPTION="Adjusts the size of the economy overlay.\nRequires a game restart if overlay was enabled this session."

lobui_0414 = "%d Build Restrictions"
lobui_0415 = "1 Build Restriction"
Expand Down
17 changes: 17 additions & 0 deletions lua/options/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,23 @@ options = {
},
},

{
title = "<LOC OPTIONS_ECON_OVERLAY_SCALE_TITLE>Scale Economy Overlay",
key = 'econ_overlay_scale',
type = 'toggle',
default = 1.0,
custom = {
Comment thread
lL1l1 marked this conversation as resolved.
states = {
{ text = "80%", key = 0.8, },
{ text = "100%", key = 1.0, },
{ text = "125%", key = 1.25, },
{ text = "150%", key = 1.5, },
{ text = "175%", key = 1.75, },
{ text = "200%", key = 2.0, },
},
},
},

{
title = "<LOC OPTIONS_RECLAIMBATCHING>Reclaim batching",
key = 'reclaim_overview_batching',
Expand Down
36 changes: 29 additions & 7 deletions lua/ui/game/econoverlayparams.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
local scale = import('/lua/user/prefs.lua').GetOption('econ_overlay_scale')
local scaleSuffix = {
[0.8] = '_0.8x',
[1] = '',
[1.25] = '_1.25x',
[1.5] = '_1.5x',
[1.75] = '_1.75x',
[2] = '_2.0x',
}
local suffix = scaleSuffix[scale or 1] or ''
---@param number number
---@return integer
local function ScaleNumber(number)
return math.floor(number * scale)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
end

EconOverlayParams = {
positiveColor = "FF00D000",
negativeColor = "red",
leftTexture = import("/lua/ui/uiutil.lua").UIFile("/game/economic-overlay/econ_bmp_l.dds"),
midTexture = import("/lua/ui/uiutil.lua").UIFile("/game/economic-overlay/econ_bmp_m.dds"),
rightTexture = import("/lua/ui/uiutil.lua").UIFile("/game/economic-overlay/econ_bmp_r.dds"),
leftTexture = import("/lua/ui/uiutil.lua").UIFile("/game/economic-overlay/econ_bmp_l" .. suffix .. ".dds"),
midTexture = import("/lua/ui/uiutil.lua").UIFile("/game/economic-overlay/econ_bmp_m" .. suffix .. ".dds"),
rightTexture = import("/lua/ui/uiutil.lua").UIFile("/game/economic-overlay/econ_bmp_r" .. suffix .. ".dds"),
fontName = "Ariel",
fontSize = 9,
energyTopOffset = 13.0,
massTopOffset = 1.0,
}
fontSize = ScaleNumber(9),
energyTopOffset = ScaleNumber(13.0),
massTopOffset = ScaleNumber(1.0),
}

local scaleOptionItem = import('/lua/options/optionslogic.lua').FindOptionItem('econ_overlay_scale')
if scaleOptionItem then
-- engine only imports this file once per application opening
-- which means once imported, it needs a restart to be updated
scaleOptionItem.restart = true
end
4 changes: 4 additions & 0 deletions lua/ui/help/tooltips.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,10 @@ Tooltips = {
title = '<LOC OPTIONS_0305>Show Player Cursor Locations for Observers',
description = '<LOC OPTIONS_0306>Shows the cursor locations of alive players and other observers as you observe a game.\r\nDoes not apply for replays, including live ones.',
},
options_econ_overlay_scale = {
title = '<LOC OPTIONS_ECON_OVERLAY_SCALE_TITLE>Scale Economy Overlay',
description = '<LOC OPTIONS_ECON_OVERLAY_SCALE_DESCRIPTION>Adjusts the size of the economy overlay.\nRequires a game restart if overlay was enabled this session.',
},
-- **********************
-- ** Lobby Strings
-- **********************
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.