CoriEngine
Loading...
Searching...
No Matches
CoriMouseCodes.hpp
Go to the documentation of this file.
1#pragma once
2#include <string_view>
3#define MAGIC_ENUM_RANGE_MIN 0
4#define MAGIC_ENUM_RANGE_MAX 512
5#include <magic_enum/magic_enum.hpp>
6
7namespace Cori {
8 namespace Core {
20
21 [[maybe_unused]] static std::string CoriGetKeyName(const CoriMouseKeycode code) {
22 std::string_view name = magic_enum::enum_name(code);
23 constexpr std::string_view prefix = "CORI_";
24 if (name.starts_with(prefix)) {
25 name.remove_prefix(prefix.size());
26 }
27 return std::string(name);
28 }
29 }
30}
static std::string CoriGetKeyName(const CoriKeycode code)
CoriMouseCode
An enum of all available mouse buttons.
enum Cori::Core::CoriMouseCode CoriMouseKeycode
An enum of all available mouse buttons.
Global engine namespace.