41 lines
1.4 KiB
C++
41 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <jlog/Logger.hpp>
|
|
#include <Event.h>
|
|
|
|
namespace JUI {
|
|
|
|
|
|
/// An enumeration for mouse buttons, used by JUI to decouple from external systems.
|
|
/// Some boilerplate is required in order to get input mechanisms up and running. See the demo files for reference.
|
|
enum class MouseButton {
|
|
Left = 1,
|
|
Middle = 2,
|
|
Right = 3
|
|
};
|
|
|
|
/// Designates an element as laid out horizontally or vertically.
|
|
enum class Orientation { Horizontal, Vertical };
|
|
|
|
/// Determines how a line element is decorated.
|
|
enum class LineFillMode { Solid, Dotted, Dashed };
|
|
|
|
|
|
/// Logger class for JUI. @see project jlog
|
|
class JUILogger : public jlog::GenericLogger {
|
|
public:
|
|
Event<std::string, Color4> OnLog;
|
|
|
|
JUILogger(const std::string& context,
|
|
std::ofstream& file,
|
|
Color4 contextColor = Colors::White,
|
|
Color4 timestampColor = Colors::Purples::Fuchsia,
|
|
Color4 locationColor = Colors::Pinks::Pink,
|
|
Color4 pointerColor = Colors::Pinks::LightPink,
|
|
Color4 messageColor = Colors::Greens::LightGreen);
|
|
|
|
void Log(const std::string& message, const std::source_location &location = std::source_location::current(), const jlog::Timestamp &ts = jlog::Timestamp()) override;
|
|
};
|
|
|
|
extern JUILogger UILogs;
|
|
} |