Skip to content

Commit

Permalink
Register CUIEditKeyBind in the focus system (#943)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Jan 17, 2025
1 parent f5a32f7 commit 60ea0bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/xrGame/ui/UIEditKeyBind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ CUIEditKeyBind::CUIEditKeyBind(bool primary, bool isGamepadBinds /*= false*/)
m_keyboard = NULL;
m_opt_backup_value = NULL;
m_action = NULL;
UI().Focus().RegisterFocusable(this);
}

CUIEditKeyBind::~CUIEditKeyBind()
{
UI().Focus().UnregisterFocusable(this);
}

u32 CutStringByLength(CGameFont* font, LPCSTR src, pstr dst, u32 dst_size, float length)
Expand Down
1 change: 1 addition & 0 deletions src/xrGame/ui/UIEditKeyBind.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class CUIEditKeyBind final : public CUIStatic, public CUIOptionsItem

public:
CUIEditKeyBind(bool primary, bool isGamepadBinds = false);
~CUIEditKeyBind();

// options item
virtual void AssignProps(const shared_str& entry, const shared_str& group);
Expand Down

0 comments on commit 60ea0bc

Please sign in to comment.