Flexible base for variously styled buttons that needs to be supplied multiple textures. More...
#include <LumaButton.hpp>
Public Attributes | |
ClientMarker | cm |
DirtyAttr< std::optional< float4 > > | attr_sufraceNeutralColor |
DirtyAttr< std::optional< float4 > > | attr_overlayNeutralColor |
DirtyAttr< FlatShader::ResizeStage > | attr_resizeStage |
DirtyAttr< ResourcePath > | attr_surface |
DirtyAttr< ResourcePath > | attr_overlay |
DirtyAttr< ResourcePath > | attr_hot |
Public Attributes inherited from iv::PickableSlot | |
ClientMarker | cm |
Position_InputNode | input |
Public Attributes inherited from iv::Slot | |
ClientMarker | cm |
Public Attributes inherited from iv::VectorChildrenElem< SlotChild > | |
ClientMarker | cm |
Public Attributes inherited from iv::Elem | |
ClientMarker | cm |
DirtyAttr< bool > | attr_enabled |
DirtyAttr< float4x4 > | modelTransform |
DirtyAttr< ShaderScissor > | scissor |
Public Attributes inherited from iv::InputNode | |
ClientMarker | cm |
Public Attributes inherited from iv::SlotChild | |
ClientMarker | cm |
DirtyAttr< float3 > | expectedSize |
DirtyAttr< float3 > | preferredSize |
DirtyAttr< float3 > | size |
Public Attributes inherited from iv::Pickable | |
ClientMarker | cm |
Public Attributes inherited from iv::LumaListener | |
ClientMarker | cm |
Public Attributes inherited from iv::TranslucentElem | |
ClientMarker | cm |
DirtyAttr< float4 > | attr_preblend |
Enables blending in fragment shader - blends into a fixed color rather than into the current content of framebuffer. This allows us to emulate blending in static scenes without requiring specific draw order. More... | |
DirtyAttr< bool > | attr_translucent |
Item will be drawn as translucent - enables blending and draws after all opaque elements sorted by depth with other translucent objects. More... | |
Static Public Attributes | |
static const constexpr int | DefaultShadowHeightPx = 2 |
Protected Member Functions | |
virtual void | first_pass_impl (ElementRenderer *) override |
virtual void | ColorsChanged (float4 surface, float4 on_surface) |
void | CallColorsChanged () |
virtual void | LumaStyleChanged (LumaStyle const &) override |
Protected Member Functions inherited from iv::PickableSlot | |
virtual bool | position_test (int2 input_pos) override |
Protected Member Functions inherited from iv::Slot | |
virtual void | second_pass_impl (ElementRenderer *) override |
Protected Member Functions inherited from iv::VectorChildrenElem< SlotChild > | |
virtual void | elem_eachChild (std::function< void(Elem *) > const &) override |
virtual void | elem_childDisconnect (Elem *) override |
virtual void | input_eachChild (std::function< void(InputNode *) > const &f) override |
virtual void | input_childDisconnect (InputNode *child) override |
Protected Member Functions inherited from iv::InputNode | |
virtual bool | input_trigger_process (InputRoot *root, Input::DeviceKey key) |
virtual void | input_process (InputRoot *root, Input::DeviceKey key, bool &press, bool &real, bool &offspace) |
Protected Attributes | |
Slot | surface_slot |
Protected Attributes inherited from iv::PickableSlot | |
Pickable * | pickable |
Protected Attributes inherited from iv::VectorChildrenElem< SlotChild > | |
std::vector< SlotChild * > | children |
bool | children_dirty |
Detailed Description
Flexible base for variously styled buttons that needs to be supplied multiple textures.
At least LumaButton::surface should be set. LumaButton::hot is nice addition for visual responsiveness and LumaButton::overlay should contain foreground graphics - symbols, glyphs or an icon.
Definition at line 17 of file LumaButton.hpp.
Constructor & Destructor Documentation
◆ LumaButton()
iv::LumaButton::LumaButton | ( | Instance * | inst, |
LumaStyleId | style = LumaStyleId() |
||
) |
Definition at line 9 of file LumaButton.cpp.
Member Function Documentation
◆ sufraceNeutralColor()
LumaButton * iv::LumaButton::sufraceNeutralColor | ( | std::optional< float4 > | val | ) |
Definition at line 231 of file LumaButton.cpp.
◆ overlayNeutralColor()
LumaButton * iv::LumaButton::overlayNeutralColor | ( | std::optional< float4 > | val | ) |
Definition at line 237 of file LumaButton.cpp.
◆ resizeStage()
LumaButton * iv::LumaButton::resizeStage | ( | FlatShader::ResizeStage | val | ) |
Definition at line 243 of file LumaButton.cpp.
◆ surface()
LumaButton * iv::LumaButton::surface | ( | ResourcePath | val | ) |
Definition at line 249 of file LumaButton.cpp.
◆ overlay()
LumaButton * iv::LumaButton::overlay | ( | ResourcePath | val | ) |
Definition at line 255 of file LumaButton.cpp.
◆ hot()
LumaButton * iv::LumaButton::hot | ( | ResourcePath | val | ) |
Definition at line 261 of file LumaButton.cpp.
◆ preblend()
LumaButton * iv::LumaButton::preblend | ( | float4 | val | ) |
Definition at line 267 of file LumaButton.cpp.
◆ translucent()
LumaButton * iv::LumaButton::translucent | ( | bool | val | ) |
Definition at line 273 of file LumaButton.cpp.
◆ first_pass_impl()
|
overrideprotectedvirtual |
Reimplemented from iv::Slot.
Definition at line 164 of file LumaButton.cpp.
◆ ColorsChanged()
|
inlineprotectedvirtual |
Useful when inheriting LumaButton, adding specifically animated graphics on top of it. This tells us about the color shheme currently in use by LumaButton, so that the extra graphics can sync with that.
Reimplemented in iv::Rectangle_LumaButton.
Definition at line 78 of file LumaButton.hpp.
◆ CallColorsChanged()
|
protected |
Definition at line 221 of file LumaButton.cpp.
◆ LumaStyleChanged()
|
overrideprotectedvirtual |
Implements iv::LumaListener.
Definition at line 226 of file LumaButton.cpp.
Member Data Documentation
◆ cm
ClientMarker iv::LumaButton::cm |
Definition at line 20 of file LumaButton.hpp.
◆ DefaultShadowHeightPx
|
staticconstexpr |
Definition at line 23 of file LumaButton.hpp.
◆ attr_sufraceNeutralColor
Definition at line 40 of file LumaButton.hpp.
◆ attr_overlayNeutralColor
Definition at line 44 of file LumaButton.hpp.
◆ attr_resizeStage
DirtyAttr< FlatShader::ResizeStage > iv::LumaButton::attr_resizeStage |
Resize stage option used for all textures.
Definition at line 49 of file LumaButton.hpp.
◆ attr_surface
DirtyAttr< ResourcePath > iv::LumaButton::attr_surface |
Color are rotated from NeutralColor to surface or highlight color. Base graphics for the button.
Definition at line 55 of file LumaButton.hpp.
◆ attr_overlay
DirtyAttr< ResourcePath > iv::LumaButton::attr_overlay |
Displayed on top of everything. Colors are rotated from NeutralColor to on_surface or on_highlight color.
Definition at line 61 of file LumaButton.hpp.
◆ attr_hot
DirtyAttr< ResourcePath > iv::LumaButton::attr_hot |
Displayed on top of surface during hover and duration. Colors are rotated from NeutralColor to surface or highlight color.
Definition at line 67 of file LumaButton.hpp.
◆ surface_slot
|
protected |
Definition at line 81 of file LumaButton.hpp.
The documentation for this class was generated from the following files:
- ivorium_UI/LumaButton.hpp
- ivorium_UI/LumaButton.cpp