lexogrine / hud-manager

All-in-one broadcast & HUDs Manager
https://lhm.gg
Other
273 stars 34 forks source link

Hotkey for tournament display and player display #45

Closed BigSaVo closed 3 years ago

BigSaVo commented 3 years ago

Hi there. I need some help. I'm having problems with keybind. I think I give the correct commands to show the tournament view or to deactivate it. But the HUD manager takes it wrong? At the moment it looks like this at Keybinds.jason:

[ { "bind":"Ctrl+B", "action":"toggleRadar" }, { "bind":"Alt+B", "action":"radarBigger" }, { "bind":"Alt+S", "action":"radarSmaller" }, { "bind":"Alt+T", "action":"toggleTrivia" }, { "bind":"Alt+C", "action":"toggleCams" }, { "bind":"Alt+P", "action":"toggleTournament" }, { "bind":"Alt+L", "action":"toggleplayer_preview" } ]

I then restart the manager Hud but unfortunately it does not react. Can someone explain to me what exactly I have to do ??? Would be very grateful.

osztenkurden commented 3 years ago

@BigSaVo hi! So those keybinds are basically very simple way to send action to the HUD. Even if you just added action "toggleTournament" they way you do, it probably sends this action to the HUD. However you need code the listener in the HUD itself, and then compile it, so you'd need at least basic knowledge of programming to add it.

You could add in src/HUD/Tournament/Tournament.tsx in componentDidMount something like:

actions.on("toggleTournament", () => {
    this.setState({show: !this.state.show});
});