Rewrite on simdjson with a flat src and smack-style build
This commit is contained in:
1 parent
2d11cddc5e
commit
1a0db1abbd
178 files changed
+5935
-44757
No files matched your search
@@ -0,0 +1,68 @@
|
||||
#pragma once
|
||||
|
||||
#include "character.h"
|
||||
#include "save.h"
|
||||
#include <imgui.h>
|
||||
|
||||
constexpr float FONT_NORMAL = 20;
|
||||
constexpr float FONT_HEADER_3 = 24;
|
||||
constexpr float FONT_HEADER_2 = 30;
|
||||
constexpr float FONT_HEADER_1 = 40;
|
||||
constexpr float FONT_HUGE = 80;
|
||||
|
||||
class Play;
|
||||
|
||||
enum Direction
|
||||
{
|
||||
DIRECTION_LEFT,
|
||||
DIRECTION_RIGHT
|
||||
};
|
||||
|
||||
// Hover and select sounds (from the character being played, or none) and the pulsing border on hovered widgets.
|
||||
void widget_sounds_set(Audio* audio, const Sounds* hover, const Sounds* select);
|
||||
void widget_fx();
|
||||
|
||||
// Passes a widget's result through after giving it its sounds and hover border.
|
||||
inline bool fx(bool result)
|
||||
{
|
||||
widget_fx();
|
||||
return result;
|
||||
}
|
||||
|
||||
inline ImVec4 imvec4_get(Color color)
|
||||
{
|
||||
return {color.r, color.g, color.b, color.a};
|
||||
}
|
||||
|
||||
void style_set(Color color, float rounding = 0);
|
||||
float row_width_get(int count);
|
||||
void tooltip_set(const char* text, float size = FONT_NORMAL);
|
||||
void triangle_draw(ImVec2 position, ImVec2 size, Direction direction);
|
||||
|
||||
// The menus, tools, toasts and select screen.
|
||||
class Ui
|
||||
{
|
||||
public:
|
||||
std::vector<Actor> itemActors;
|
||||
std::vector<Canvas> itemCanvases;
|
||||
Actor previewActor;
|
||||
Canvas previewCanvas;
|
||||
Progress selectedProgress;
|
||||
float menuSlide = 1;
|
||||
float toolsSlide = 0;
|
||||
int characterIndex = 0;
|
||||
int progressIndex = -1;
|
||||
int selectedItem = -1;
|
||||
bool isContinue = false;
|
||||
bool isFullscreen = false;
|
||||
bool isFullscreenToggled = false;
|
||||
bool isNewGame = false;
|
||||
bool isNewGameWarning = false;
|
||||
bool isPreview = false;
|
||||
bool isReturn = false;
|
||||
bool isSave = false;
|
||||
|
||||
void play_update(Play& play, Settings& settings, Renderer& renderer, Audio& audio);
|
||||
bool select_update(std::vector<Character>& characters, Settings& settings, Renderer& renderer, Audio& audio);
|
||||
void settings_update(Settings& settings, Audio& audio, const Character* character);
|
||||
};
|
||||
Reference in new issue
Block a user