![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Encapsule l'effet de sélection des nodes (glow + bordure épaisse) More...
#include <SelectionEffectRenderer.h>
Collaboration diagram for Olympe::SelectionEffectRenderer:Public Member Functions | |
| SelectionEffectRenderer () | |
| ~SelectionEffectRenderer ()=default | |
| void | SetGlowColor (const Vector &color) |
| Définit la couleur du glow de sélection. | |
| Vector | GetGlowColor () const |
| void | SetGlowAlpha (float alpha) |
| Définit l'alpha (transparence) du glow. | |
| float | GetGlowAlpha () const |
| void | SetBaseGlowSize (float size) |
| Définit la taille de base du glow (avant zoom/scale) | |
| float | GetBaseGlowSize () const |
| void | SetBorderWidthMultiplier (float multiplier) |
| Définit le multiplicateur d'épaisseur de bordure. | |
| float | GetBorderWidthMultiplier () const |
| void | SetGlowEnabled (bool enabled) |
| Active/désactive l'effet de glow (utile pour performance) @default true. | |
| bool | IsGlowEnabled () const |
| void | RenderSelectionGlow (const ImVec2 &minScreen, const ImVec2 &maxScreen, float canvasZoom=1.0f, float nodeScale=1.0f, float cornerRadius=5.0f) const |
| Dessine le glow de sélection (fond lumineux) | |
| void | RenderSelectionBorder (const ImVec2 &minScreen, const ImVec2 &maxScreen, ImU32 borderColor, float baseWidth, float canvasZoom=1.0f, float cornerRadius=5.0f) const |
| Rend la bordure de sélection (épaissie) | |
| void | RenderCompleteSelection (const ImVec2 &minScreen, const ImVec2 &maxScreen, ImU32 borderColor, float baseWidth, float canvasZoom=1.0f, float nodeScale=1.0f, float cornerRadius=5.0f) const |
| Rend l'ensemble de l'effet de sélection (glow + bordure) | |
| void | ApplyStyle_OlympeBlue () |
| Style standard "Olympe Blue" - Cyan vif avec glow modéré | |
| void | ApplyStyle_GoldAccent () |
| Style "Gold Accent" - Orange/or pour éditeurs de spécialité | |
| void | ApplyStyle_GreenEnergy () |
| Style "Green Energy" - Vert lumineux pour emphasis. | |
| void | ApplyStyle_PurpleMystery () |
| Style "Purple Mystery" - Violet/magenta. | |
| void | ApplyStyle_RedAlert () |
| Style "Red Alert" - Rouge vif pour avertissements/erreurs. | |
Private Attributes | |
| Vector | m_glowColor = {0.0f, 0.8f, 1.0f} |
| float | m_glowAlpha = 0.3f |
| float | m_baseGlowSize = 4.0f |
| float | m_borderWidthMultiplier = 2.0f |
| bool | m_glowEnabled = true |
Encapsule l'effet de sélection des nodes (glow + bordure épaisse)
Fournit un système standardisé de rendu de sélection réutilisable dans tous les canvas (VisualScript, EntityPrefab, AIEditor, etc.)
Usage: SelectionEffectRenderer renderer; renderer.SetGlowColor({0.0f, 0.8f, 1.0f}); renderer.SetGlowAlpha(0.3f);
// During node rendering if (node.selected) { renderer.RenderSelectionGlow(minScreen, maxScreen, canvasZoom, nodeScale); } renderer.RenderSelectionBorder(minScreen, maxScreen, nodeColor, baseWidth, canvasZoom);
Definition at line 25 of file SelectionEffectRenderer.h.
| Olympe::SelectionEffectRenderer::SelectionEffectRenderer | ( | ) |
Definition at line 5 of file SelectionEffectRenderer.cpp.
|
default |
| void Olympe::SelectionEffectRenderer::ApplyStyle_GoldAccent | ( | ) |
Style "Gold Accent" - Orange/or pour éditeurs de spécialité
Definition at line 94 of file SelectionEffectRenderer.cpp.
References m_baseGlowSize, m_borderWidthMultiplier, m_glowAlpha, and m_glowColor.
| void Olympe::SelectionEffectRenderer::ApplyStyle_GreenEnergy | ( | ) |
Style "Green Energy" - Vert lumineux pour emphasis.
Definition at line 102 of file SelectionEffectRenderer.cpp.
References m_baseGlowSize, m_borderWidthMultiplier, m_glowAlpha, and m_glowColor.
| void Olympe::SelectionEffectRenderer::ApplyStyle_OlympeBlue | ( | ) |
Style standard "Olympe Blue" - Cyan vif avec glow modéré
Definition at line 86 of file SelectionEffectRenderer.cpp.
References m_baseGlowSize, m_borderWidthMultiplier, m_glowAlpha, and m_glowColor.
| void Olympe::SelectionEffectRenderer::ApplyStyle_PurpleMystery | ( | ) |
Style "Purple Mystery" - Violet/magenta.
Definition at line 110 of file SelectionEffectRenderer.cpp.
References m_baseGlowSize, m_borderWidthMultiplier, m_glowAlpha, and m_glowColor.
| void Olympe::SelectionEffectRenderer::ApplyStyle_RedAlert | ( | ) |
Style "Red Alert" - Rouge vif pour avertissements/erreurs.
Definition at line 118 of file SelectionEffectRenderer.cpp.
References m_baseGlowSize, m_borderWidthMultiplier, m_glowAlpha, and m_glowColor.
|
inline |
Definition at line 49 of file SelectionEffectRenderer.h.
References m_baseGlowSize.
|
inline |
Definition at line 57 of file SelectionEffectRenderer.h.
References m_borderWidthMultiplier.
|
inline |
Definition at line 43 of file SelectionEffectRenderer.h.
References m_glowAlpha.
|
inline |
Definition at line 37 of file SelectionEffectRenderer.h.
References m_glowColor.
|
inline |
Definition at line 62 of file SelectionEffectRenderer.h.
References m_glowEnabled.
| void Olympe::SelectionEffectRenderer::RenderCompleteSelection | ( | const ImVec2 & | minScreen, |
| const ImVec2 & | maxScreen, | ||
| ImU32 | borderColor, | ||
| float | baseWidth, | ||
| float | canvasZoom = 1.0f, |
||
| float | nodeScale = 1.0f, |
||
| float | cornerRadius = 5.0f |
||
| ) | const |
Rend l'ensemble de l'effet de sélection (glow + bordure)
Fonction de commodité qui appelle RenderSelectionGlow et RenderSelectionBorder. À utiliser si vous voulez contrôler totalement le rendu.
| minScreen | Position écran minimale |
| maxScreen | Position écran maximale |
| borderColor | Couleur de la bordure |
| baseWidth | Épaisseur de bordure de base |
| canvasZoom | Niveau de zoom |
| nodeScale | Échelle du node |
| cornerRadius | Rayon des coins |
Definition at line 71 of file SelectionEffectRenderer.cpp.
References GetComponentTypeID_Static(), RenderSelectionBorder(), and RenderSelectionGlow().
Here is the call graph for this function:| void Olympe::SelectionEffectRenderer::RenderSelectionBorder | ( | const ImVec2 & | minScreen, |
| const ImVec2 & | maxScreen, | ||
| ImU32 | borderColor, | ||
| float | baseWidth, | ||
| float | canvasZoom = 1.0f, |
||
| float | cornerRadius = 5.0f |
||
| ) | const |
Rend la bordure de sélection (épaissie)
Appeler APRÈS la boîte principale du node. Automatiquement multiplie l'épaisseur de base par le multiplicateur.
| minScreen | Position écran minimale |
| maxScreen | Position écran maximale |
| borderColor | Couleur de la bordure en ImU32 |
| baseWidth | Épaisseur de base (avant multiplication) |
| canvasZoom | Niveau de zoom du canvas |
| cornerRadius | Rayon des coins arrondis |
Definition at line 46 of file SelectionEffectRenderer.cpp.
References GetComponentTypeID_Static(), and m_borderWidthMultiplier.
Referenced by RenderCompleteSelection().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::SelectionEffectRenderer::RenderSelectionGlow | ( | const ImVec2 & | minScreen, |
| const ImVec2 & | maxScreen, | ||
| float | canvasZoom = 1.0f, |
||
| float | nodeScale = 1.0f, |
||
| float | cornerRadius = 5.0f |
||
| ) | const |
Dessine le glow de sélection (fond lumineux)
Cette fonction doit être appelée AVANT de dessiner la boîte du node, pour que le glow apparaisse en arrière-plan.
| minScreen | Position écran minimale (coin haut-gauche) |
| maxScreen | Position écran maximale (coin bas-droit) |
| canvasZoom | Niveau de zoom du canvas |
| nodeScale | Multiplicateur d'échelle du node (défaut 1.0f) |
| cornerRadius | Rayon des coins arrondis |
Definition at line 14 of file SelectionEffectRenderer.cpp.
References GetComponentTypeID_Static(), m_baseGlowSize, m_glowAlpha, m_glowColor, m_glowEnabled, Vector::x, Vector::y, and Vector::z.
Referenced by RenderCompleteSelection().
Here is the call graph for this function:
Here is the caller graph for this function:Définit la taille de base du glow (avant zoom/scale)
| size | Pixels non-zoomés @default 4.0f |
Definition at line 48 of file SelectionEffectRenderer.h.
References m_baseGlowSize.
Définit le multiplicateur d'épaisseur de bordure.
| multiplier | Épaisseur finale = baseWidth * multiplier @default 2.0f (la bordure double quand sélectionné) |
Definition at line 56 of file SelectionEffectRenderer.h.
References GetComponentTypeID_Static(), and m_borderWidthMultiplier.
Here is the call graph for this function:Définit l'alpha (transparence) du glow.
| alpha | Valeur 0.0-1.0 (0=invisible, 1=opaque) @default 0.3f |
Definition at line 42 of file SelectionEffectRenderer.h.
References GetComponentTypeID_Static(), and m_glowAlpha.
Here is the call graph for this function:Définit la couleur du glow de sélection.
| color | Couleur RGB (valeurs 0.0-1.0) @default {0.0f, 0.8f, 1.0f} (Cyan) |
Definition at line 36 of file SelectionEffectRenderer.h.
References m_glowColor.
Active/désactive l'effet de glow (utile pour performance) @default true.
Definition at line 61 of file SelectionEffectRenderer.h.
References m_glowEnabled.
|
private |
Definition at line 152 of file SelectionEffectRenderer.h.
Referenced by ApplyStyle_GoldAccent(), ApplyStyle_GreenEnergy(), ApplyStyle_OlympeBlue(), ApplyStyle_PurpleMystery(), ApplyStyle_RedAlert(), GetBaseGlowSize(), RenderSelectionGlow(), and SetBaseGlowSize().
|
private |
Definition at line 153 of file SelectionEffectRenderer.h.
Referenced by ApplyStyle_GoldAccent(), ApplyStyle_GreenEnergy(), ApplyStyle_OlympeBlue(), ApplyStyle_PurpleMystery(), ApplyStyle_RedAlert(), GetBorderWidthMultiplier(), RenderSelectionBorder(), and SetBorderWidthMultiplier().
Definition at line 151 of file SelectionEffectRenderer.h.
Referenced by ApplyStyle_GoldAccent(), ApplyStyle_GreenEnergy(), ApplyStyle_OlympeBlue(), ApplyStyle_PurpleMystery(), ApplyStyle_RedAlert(), GetGlowAlpha(), RenderSelectionGlow(), and SetGlowAlpha().
Definition at line 150 of file SelectionEffectRenderer.h.
Referenced by ApplyStyle_GoldAccent(), ApplyStyle_GreenEnergy(), ApplyStyle_OlympeBlue(), ApplyStyle_PurpleMystery(), ApplyStyle_RedAlert(), GetGlowColor(), RenderSelectionGlow(), and SetGlowColor().
Definition at line 154 of file SelectionEffectRenderer.h.
Referenced by IsGlowEnabled(), RenderSelectionGlow(), and SetGlowEnabled().