ReXGlue SDK
Loading...
Searching...
No Matches
style.h File Reference
#include <array>
#include <imgui.h>
#include <algorithm>
#include <rex/math.h>
#include <rex/logging/log_category.h>
#include <rex/types.h>
#include <rex/platform.h>

Go to the source code of this file.

Classes

struct  rex::ui::Color
struct  rex::ui::ControlPalette
struct  rex::ui::Palette
struct  rex::ui::WindowAlpha
struct  rex::ui::Metrics
struct  rex::ui::AchievementsStyle
struct  rex::ui::ToastStyle
struct  rex::ui::ConsoleStyle
struct  rex::ui::DebugOverlayStyle
struct  rex::ui::SettingsStyle
struct  rex::ui::Style

Namespaces

namespace  rex

Functions

ImVec4 rex::ui::ToImVec4 (Color color)
ImU32 rex::ui::ToImU32 (Color color)
Color rex::ui::FromImVec4 (const ImVec4 &value)
REX_UI_API void rex::ui::ApplyDefaultStyle (ImGuiStyle &imgui_style, const Palette &palette, const Metrics &metrics)

Variables

constexpr Color rex::ui::colors::kWhite = Color::FromRGBA(1, 1, 1)
constexpr Color rex::ui::colors::kBlack = Color::FromRGBA(0, 0, 0)
constexpr Color rex::ui::colors::kTransparent = Color::FromRGBA(0, 0, 0, 0)

Detailed Description

License
BSD 3-Clause License See LICENSE file in the project root for full license text.

Function Documentation

◆ ApplyDefaultStyle()

REX_UI_API void rex::ui::ApplyDefaultStyle ( ImGuiStyle & imgui_style,
const Palette & palette,
const Metrics & metrics )

Sets every ImGui color slot, rounding, border and padding from the palette and metrics.

◆ FromImVec4()

Color rex::ui::FromImVec4 ( const ImVec4 & value)
inline

Converts an ImGui floating point color.

Returns
The color with the same four channels.

◆ ToImU32()

ImU32 rex::ui::ToImU32 ( Color color)
inline

Converts a color to the packed ImGui form, red in the low byte.

Returns
The color packed by Color::ToRGBA8.

◆ ToImVec4()

ImVec4 rex::ui::ToImVec4 ( Color color)
inline

Converts a color to the ImGui floating point form.

Returns
The color with the same four channels.