yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::gui::BackgroundRenderer Class Reference

Renders themed background effects for docking windows. More...

#include <background_renderer.h>

Collaboration diagram for yaze::gui::BackgroundRenderer:

Classes

struct  GridSettings
 

Public Member Functions

void RenderDockingBackground (ImDrawList *draw_list, const ImVec2 &window_pos, const ImVec2 &window_size, const Color &theme_color)
 
void RenderGridBackground (ImDrawList *draw_list, const ImVec2 &window_pos, const ImVec2 &window_size, const Color &grid_color)
 
void RenderRadialGradient (ImDrawList *draw_list, const ImVec2 &center, float radius, const Color &inner_color, const Color &outer_color)
 
void SetGridSettings (const GridSettings &settings)
 
const GridSettingsGetGridSettings () const
 
void UpdateAnimation (float delta_time)
 
void SetAnimationEnabled (bool enabled)
 
void UpdateForTheme (const Color &primary_color, const Color &background_color)
 
void DrawSettingsUI ()
 

Static Public Member Functions

static BackgroundRendererGet ()
 

Private Member Functions

 BackgroundRenderer ()=default
 
float CalculateRadialFade (const ImVec2 &pos, const ImVec2 &center, float max_distance) const
 
ImU32 BlendColorWithFade (const Color &base_color, float fade_factor) const
 
void DrawGridLine (ImDrawList *draw_list, const ImVec2 &start, const ImVec2 &end, ImU32 color, float thickness) const
 
void DrawGridDot (ImDrawList *draw_list, const ImVec2 &pos, ImU32 color, float size) const
 

Private Attributes

GridSettings grid_settings_
 
float animation_time_ = 0.0f
 
Color cached_grid_color_ {0.5f, 0.5f, 0.5f, 0.1f}
 

Detailed Description

Renders themed background effects for docking windows.

Definition at line 18 of file background_renderer.h.

Constructor & Destructor Documentation

◆ BackgroundRenderer()

yaze::gui::BackgroundRenderer::BackgroundRenderer ( )
privatedefault

Member Function Documentation

◆ Get()

◆ RenderDockingBackground()

void yaze::gui::BackgroundRenderer::RenderDockingBackground ( ImDrawList * draw_list,
const ImVec2 & window_pos,
const ImVec2 & window_size,
const Color & theme_color )

◆ RenderGridBackground()

◆ RenderRadialGradient()

void yaze::gui::BackgroundRenderer::RenderRadialGradient ( ImDrawList * draw_list,
const ImVec2 & center,
float radius,
const Color & inner_color,
const Color & outer_color )

◆ SetGridSettings()

void yaze::gui::BackgroundRenderer::SetGridSettings ( const GridSettings & settings)
inline

Definition at line 50 of file background_renderer.h.

References grid_settings_.

◆ GetGridSettings()

const GridSettings & yaze::gui::BackgroundRenderer::GetGridSettings ( ) const
inline

Definition at line 53 of file background_renderer.h.

References grid_settings_.

◆ UpdateAnimation()

void yaze::gui::BackgroundRenderer::UpdateAnimation ( float delta_time)

◆ SetAnimationEnabled()

void yaze::gui::BackgroundRenderer::SetAnimationEnabled ( bool enabled)
inline

◆ UpdateForTheme()

void yaze::gui::BackgroundRenderer::UpdateForTheme ( const Color & primary_color,
const Color & background_color )

◆ DrawSettingsUI()

◆ CalculateRadialFade()

float yaze::gui::BackgroundRenderer::CalculateRadialFade ( const ImVec2 & pos,
const ImVec2 & center,
float max_distance ) const
private

Definition at line 354 of file background_renderer.cc.

◆ BlendColorWithFade()

ImU32 yaze::gui::BackgroundRenderer::BlendColorWithFade ( const Color & base_color,
float fade_factor ) const
private

Definition at line 363 of file background_renderer.cc.

References yaze::gui::Color::alpha, yaze::gui::Color::blue, yaze::gui::ConvertColorToImVec4(), yaze::gui::Color::green, and yaze::gui::Color::red.

Referenced by RenderGridBackground().

Here is the call graph for this function:

◆ DrawGridLine()

void yaze::gui::BackgroundRenderer::DrawGridLine ( ImDrawList * draw_list,
const ImVec2 & start,
const ImVec2 & end,
ImU32 color,
float thickness ) const
private

Definition at line 370 of file background_renderer.cc.

Referenced by RenderGridBackground().

◆ DrawGridDot()

void yaze::gui::BackgroundRenderer::DrawGridDot ( ImDrawList * draw_list,
const ImVec2 & pos,
ImU32 color,
float size ) const
private

Definition at line 376 of file background_renderer.cc.

Referenced by RenderGridBackground().

Member Data Documentation

◆ grid_settings_

◆ animation_time_

float yaze::gui::BackgroundRenderer::animation_time_ = 0.0f
private

◆ cached_grid_color_

Color yaze::gui::BackgroundRenderer::cached_grid_color_ {0.5f, 0.5f, 0.5f, 0.1f}
private

Definition at line 73 of file background_renderer.h.

Referenced by UpdateForTheme().


The documentation for this class was generated from the following files: