Merge branch 'main' into voice
This commit is contained in:
commit
cf09616b1b
@ -8,18 +8,18 @@
|
|||||||
|
|
||||||
namespace Star {
|
namespace Star {
|
||||||
|
|
||||||
STAR_CLASS(Input);
|
STAR_CLASS(Input);
|
||||||
STAR_EXCEPTION(InputException, StarException);
|
STAR_EXCEPTION(InputException, StarException);
|
||||||
|
|
||||||
typedef Variant<Key, MouseButton, ControllerButton> InputVariant;
|
typedef Variant<Key, MouseButton, ControllerButton> InputVariant;
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct hash<InputVariant> {
|
struct hash<InputVariant> {
|
||||||
size_t operator()(InputVariant const& v) const;
|
size_t operator()(InputVariant const& v) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Input {
|
class Input {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static Json inputEventToJson(InputEvent const& event);
|
static Json inputEventToJson(InputEvent const& event);
|
||||||
|
|
||||||
@ -117,11 +117,11 @@ namespace Star {
|
|||||||
inline void release() { released = ++releases; held = false; }
|
inline void release() { released = ++releases; held = false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Get pointer to the singleton root instance, if it exists. Otherwise,
|
// Get pointer to the singleton Input instance, if it exists. Otherwise,
|
||||||
// returns nullptr.
|
// returns nullptr.
|
||||||
static Input* singletonPtr();
|
static Input* singletonPtr();
|
||||||
|
|
||||||
// Gets reference to GuiContext singleton, throws GuiContextException if root
|
// Gets reference to Input singleton, throws InputException if root
|
||||||
// is not initialized.
|
// is not initialized.
|
||||||
static Input& singleton();
|
static Input& singleton();
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ namespace Star {
|
|||||||
void setBinds(String const& categoryId, String const& bindId, Json const& binds);
|
void setBinds(String const& categoryId, String const& bindId, Json const& binds);
|
||||||
Json getDefaultBinds(String const& categoryId, String const& bindId);
|
Json getDefaultBinds(String const& categoryId, String const& bindId);
|
||||||
Json getBinds(String const& categoryId, String const& bindId);
|
Json getBinds(String const& categoryId, String const& bindId);
|
||||||
private:
|
private:
|
||||||
List<BindEntry*> filterBindEntries(List<BindRef> const& binds, KeyMod mods) const;
|
List<BindEntry*> filterBindEntries(List<BindRef> const& binds, KeyMod mods) const;
|
||||||
|
|
||||||
BindEntry* bindEntryPtr(String const& categoryId, String const& bindId);
|
BindEntry* bindEntryPtr(String const& categoryId, String const& bindId);
|
||||||
@ -185,7 +185,8 @@ namespace Star {
|
|||||||
|
|
||||||
KeyMod m_pressedMods;
|
KeyMod m_pressedMods;
|
||||||
bool m_textInputActive;
|
bool m_textInputActive;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue
Block a user