Skip to content

Commit

Permalink
xrGame/ui/UIEditKeyBind.cpp: support texture from SOC/CS (#382, #392)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Feb 22, 2024
1 parent 02e6e09 commit 31d6c28
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/xrGame/ui/UIEditKeyBind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 31d6c28

Please sign in to comment.