Skip to content

Commit

Permalink
Made chat use key bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
medsouz committed May 6, 2016
1 parent 189046b commit 7eaf0bf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Web/Ui/WebChat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,13 @@ namespace

void OnGameInputUpdated()
{
//TODO: Don't hardocde
if (GetKeyTicks(eKeyCodeT, eInputTypeUi) == 1)
BindingsTable bindings;
GetBindings(0, &bindings);

if (GetKeyTicks(bindings.PrimaryKeys[eGameActionTeamChat], eInputTypeUi) == 1 || GetKeyTicks(bindings.SecondaryKeys[eGameActionTeamChat], eInputTypeUi) == 1)
Web::Ui::WebChat::Show(true);

if (GetKeyTicks(eKeyCodeY, eInputTypeUi) == 1)
if (GetKeyTicks(bindings.PrimaryKeys[eGameActionGeneralChat], eInputTypeUi) == 1 || GetKeyTicks(bindings.SecondaryKeys[eGameActionGeneralChat], eInputTypeUi) == 1)
Web::Ui::WebChat::Show(false);
}
}

0 comments on commit 7eaf0bf

Please sign in to comment.