From 041e1dddee602bb4c9f72e082de3563b87e8c8bb Mon Sep 17 00:00:00 2001 From: diwako Date: Sun, 13 Oct 2024 09:26:48 +0200 Subject: [PATCH] Fix wrong default font for nametags (#229) --- addons/nametags/settings.sqf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/nametags/settings.sqf b/addons/nametags/settings.sqf index a22f0e7..a41da0c 100644 --- a/addons/nametags/settings.sqf +++ b/addons/nametags/settings.sqf @@ -99,12 +99,14 @@ private _curCat = localize "STR_dui_cat_general"; private _curCat = "STR_dui_cat_fonts"; +private _fontNameIndex = EGVAR(main,availableFonts) findIf {_x isEqualTo "RobotoCondensedBold"}; +private _fontGroupIndex = EGVAR(main,availableFonts) findIf {_x isEqualTo "RobotoCondensedLight"}; [ QGVAR(fontName), "LIST", ["STR_dui_nametags_nameFont", "STR_dui_nametags_nameFont_desc"], [_cat, _curCat], - [EGVAR(main,availableFonts), EGVAR(main,availableFonts), 5], + [EGVAR(main,availableFonts), EGVAR(main,availableFonts), _fontNameIndex], false ] call CBA_fnc_addSetting; @@ -113,7 +115,7 @@ private _curCat = "STR_dui_cat_fonts"; "LIST", ["STR_dui_nametags_groupNameFont", "STR_dui_nametags_groupNameFont_desc"], [_cat, _curCat], - [EGVAR(main,availableFonts), EGVAR(main,availableFonts), 6], + [EGVAR(main,availableFonts), EGVAR(main,availableFonts), _fontGroupIndex], false ] call CBA_fnc_addSetting;