-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
12 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright 2018-2023 Jan Niklas Hasse <[email protected]> | ||
// Copyright 2018-2024 Jan Niklas Hasse <[email protected]> | ||
// For conditions of distribution and use, see copyright notice in LICENSE.txt | ||
/// @file | ||
#pragma once | ||
|
@@ -12,7 +12,7 @@ namespace jngl { | |
class Shader { | ||
public: | ||
/// Type of a Shader. To link a ShaderProgram, one shader of each type is needed. | ||
enum class Type { | ||
enum class Type : uint8_t { | ||
VERTEX, | ||
FRAGMENT, | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
// Copyright 2020-2022 Jan Niklas Hasse <[email protected]> | ||
// Copyright 2020-2024 Jan Niklas Hasse <[email protected]> | ||
// For conditions of distribution and use, see copyright notice in LICENSE.txt | ||
/// Effects that can be applied to jngl::Widget | ||
/// @file | ||
#pragma once | ||
|
||
#include "Vec2.hpp" | ||
#include <cstdint> | ||
#include <functional> | ||
|
||
namespace jngl { | ||
|
||
/// Base class for effects that can be applied to jngl::Widget | ||
class Effect { | ||
public: | ||
enum class Action { | ||
enum class Action : uint8_t { | ||
NONE, | ||
REMOVE_EFFECT, | ||
REMOVE_WIDGET, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright 2012-2022 Jan Niklas Hasse <[email protected]> | ||
// Copyright 2012-2024 Jan Niklas Hasse <[email protected]> | ||
// For conditions of distribution and use, see copyright notice in LICENSE.txt | ||
/// Input related functions | ||
/// @file | ||
|
@@ -21,7 +21,7 @@ namespace jngl { | |
|
||
namespace key { | ||
/// Keyboard keys | ||
enum KeyType { | ||
enum KeyType : uint8_t { | ||
Left, | ||
Up, | ||
Right, | ||
|
@@ -72,7 +72,7 @@ enum KeyType { | |
void setKeyboardVisible(bool); | ||
|
||
/// Whether a normal or a numbers-only keyboard should appear | ||
enum KeyboardType { Default, Numpad }; | ||
enum KeyboardType : uint8_t { Default, Numpad }; | ||
|
||
/// Type of the onscreen keyboard | ||
void setKeyboardType(KeyboardType); | ||
|
@@ -144,7 +144,7 @@ optional<Vec2> getCursorPos(); | |
|
||
namespace mouse { | ||
/// Mouse buttons | ||
enum Button { Left, Middle, Right }; | ||
enum Button : uint8_t { Left, Middle, Right }; | ||
} // namespace mouse | ||
|
||
/// Returns mouse wheel movement between -100 and 100 (0 if the mousewheel doesn't move) | ||
|
@@ -167,7 +167,7 @@ void setMouse(Vec2 position); | |
|
||
namespace controller { | ||
/// Gamepad buttons | ||
enum Button { | ||
enum Button : uint8_t { | ||
/// x axis of left stick, -1 to 1 | ||
LeftStickX, | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters