From 31d6c288b3fba39625758914fb6b0170c93d21e2 Mon Sep 17 00:00:00 2001 From: Xottab-DUTY Date: Thu, 22 Feb 2024 05:41:13 +0500 Subject: [PATCH] xrGame/ui/UIEditKeyBind.cpp: support texture from SOC/CS (#382, #392) --- src/xrGame/ui/UIEditKeyBind.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/xrGame/ui/UIEditKeyBind.cpp b/src/xrGame/ui/UIEditKeyBind.cpp index 3dcd2f6f12f..d3d228adadc 100644 --- a/src/xrGame/ui/UIEditKeyBind.cpp +++ b/src/xrGame/ui/UIEditKeyBind.cpp @@ -4,6 +4,7 @@ #include "xrEngine/xr_level_controller.h" #include "Common/object_broker.h" #include "xrEngine/XR_IOConsole.h" +#include "xrUICore/XML/UITextureMaster.h" CUIEditKeyBind::CUIEditKeyBind(bool primary, bool isGamepadBinds /*= false*/) : CUIStatic("CUIEditKeyBind") @@ -64,7 +65,14 @@ void CUIEditKeyBind::InitKeyBind(Fvector2 pos, Fvector2 size) { CUIStatic::SetWndPos(pos); CUIStatic::SetWndSize(size); - InitTexture("ui_listline2"); + + if (CUITextureMaster::ItemExist("ui_listline2")) // cop + InitTexture("ui_listline2"); + else if (CUITextureMaster::ItemExist("ui_options_string")) // soc + InitTexture("ui_options_string"); + else if (CUITextureMaster::ItemExist("ui_options_string_back")) // cs (exists in soc also, that's why it's last) + InitTexture("ui_options_string_back"); + TextItemControl()->SetFont(UI().Font().pFontLetterica16Russian); SetStretchTexture(true); SetEditMode(false);