Simple rectangular button. More...

#include <Rectangle_LumaButton.hpp>

Public Member Functions

 Rectangle_LumaButton (iv::Instance *inst, ResourcePath const &icon, char const *label, LumaStyleId style_id=LumaStyleId())
 
- Public Member Functions inherited from iv::LumaButton
 LumaButton (Instance *inst, LumaStyleId style=LumaStyleId())
 
LumaButtonsufraceNeutralColor (std::optional< float4 >)
 
LumaButtonoverlayNeutralColor (std::optional< float4 >)
 
LumaButtonresizeStage (FlatShader::ResizeStage)
 
LumaButtonsurface (ResourcePath)
 
LumaButtonoverlay (ResourcePath)
 
LumaButtonhot (ResourcePath)
 
LumaButtonpreblend (float4 val)
 
LumaButtontranslucent (bool val)
 
- Public Member Functions inherited from iv::PickableSlot
 PickableSlot (Instance *inst)
 
void pickable_elem (Pickable *pickable)
 
float2 input_position_local ()
 
- Public Member Functions inherited from iv::Slot
 Slot (Instance *)
 
void status (iv::TableDebugView *view)
 
Instanceinstance () const
 
- Public Member Functions inherited from iv::VectorChildrenElem< SlotChild >
 VectorChildrenElem (Instance *inst)
 
 ~VectorChildrenElem ()
 
T * createChild (CArgs const &... cargs)
 
T * createChild_Instance (char const *name, CArgs const &... cargs)
 
void pushChild (SlotChild *)
 
void removeChild (SlotChild *)
 
- Public Member Functions inherited from iv::Elem
 Elem (Instance *inst)
 
 ~Elem ()
 
void status (iv::TableDebugView *view)
 
Instanceinstance () const
 
void elem_setParent (Elem *)
 
Elemelem_getParent ()
 
virtual Cameraelem_getRoot ()
 
void first_pass (ElementRenderer *)
 
void second_pass (ElementRenderer *)
 
unsigned first_pass_frame_id ()
 
unsigned second_pass_frame_id ()
 
Elemenabled (bool val)
 
void quiet (bool)
 
bool quiet () const
 
float3 FromLocalSpaceToScreenSpace (float3 local_space)
 
float3 FromScreenSpaceToLocalSpace (float3 screen_space)
 
float2 FromScreenPlaneToLocalPlane (float2 screen_space)
 
void Add_InputNode (InputNode *node)
 
void Remove_InputNode (InputNode *node)
 
- Public Member Functions inherited from iv::InputNode
 InputNode (Instance *inst)
 
 ~InputNode ()
 
Instanceinstance () const
 
void status (iv::TableDebugView *view)
 
void inputEnabled (bool)
 
bool inputEnabled ()
 
void quiet (bool)
 
bool quiet () const
 
void input_deactivate ()
 
void input_treeRefresh ()
 
void input_setParent (InputNode *)
 
InputNodeinput_getParent ()
 
virtual InputRootinput_getRoot ()
 
bool input_trigger_visit (InputRoot *root, Input::DeviceKey key)
 
bool input_visit (InputRoot *root, Input::DeviceKey key, bool &press, bool &real, bool &offspace)
 
- Public Member Functions inherited from iv::SlotChild
 SlotChild (Elem *elem)
 
Instanceinstance () const
 
void status (iv::TableDebugView *view)
 
virtual bool picking_test (int2 input_pos) override
 
virtual bool picking_test_pixel_perfect (float2 local_pos)
 
- Public Member Functions inherited from iv::Pickable
 Pickable (Elem *elem)
 
Elemelem ()
 
const Elemelem () const
 
- Public Member Functions inherited from iv::LumaListener
 LumaListener (Instance *inst, LumaStyleId)
 
 ~LumaListener ()
 
Instanceinstance () const
 
LumaStyleId style_id () const
 
const LumaStylestyle () const
 
- Public Member Functions inherited from iv::TranslucentElem
 TranslucentElem (Elem *elem)
 
void status (iv::TableDebugView *view)
 
Elemelem ()
 
const Elemelem () const
 
TranslucentElempreblend (float4 val)
 
TranslucentElemtranslucent (bool val)
 

Public Attributes

ClientMarker cm
 
- Public Attributes inherited from iv::LumaButton
ClientMarker cm
 
DirtyAttr< std::optional< float4 > > attr_sufraceNeutralColor
 
DirtyAttr< std::optional< float4 > > attr_overlayNeutralColor
 
DirtyAttr< FlatShader::ResizeStageattr_resizeStage
 
DirtyAttr< ResourcePathattr_surface
 
DirtyAttr< ResourcePathattr_overlay
 
DirtyAttr< ResourcePathattr_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< float4x4modelTransform
 
DirtyAttr< ShaderScissorscissor
 
- Public Attributes inherited from iv::InputNode
ClientMarker cm
 
- Public Attributes inherited from iv::SlotChild
ClientMarker cm
 
DirtyAttr< float3expectedSize
 
DirtyAttr< float3preferredSize
 
DirtyAttr< float3size
 
- 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< float4attr_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...
 

Protected Member Functions

virtual void ColorsChanged (float4 surface, float4 on_surface) override
 
- Protected Member Functions inherited from iv::LumaButton
virtual void first_pass_impl (ElementRenderer *) override
 
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)
 

Additional Inherited Members

- Static Public Attributes inherited from iv::LumaButton
static const constexpr int DefaultShadowHeightPx = 2
 
- Protected Attributes inherited from iv::LumaButton
Slot surface_slot
 
- Protected Attributes inherited from iv::PickableSlot
Pickablepickable
 
- Protected Attributes inherited from iv::VectorChildrenElem< SlotChild >
std::vector< SlotChild * > children
 
bool children_dirty
 

Detailed Description

Simple rectangular button.

Input events are generated in PickableSlot::input (Rectangle_LumaButton indirectly inherits PickableSlot).

Definition at line 14 of file Rectangle_LumaButton.hpp.

Constructor & Destructor Documentation

◆ Rectangle_LumaButton()

iv::Rectangle_LumaButton::Rectangle_LumaButton ( iv::Instance inst,
ResourcePath const &  icon,
char const *  label,
LumaStyleId  style_id = LumaStyleId() 
)

Definition at line 7 of file Rectangle_LumaButton.cpp.

Member Function Documentation

◆ ColorsChanged()

void iv::Rectangle_LumaButton::ColorsChanged ( float4  surface,
float4  on_surface 
)
overrideprotectedvirtual

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 from iv::LumaButton.

Definition at line 63 of file Rectangle_LumaButton.cpp.

Member Data Documentation

◆ cm

ClientMarker iv::Rectangle_LumaButton::cm

Definition at line 17 of file Rectangle_LumaButton.hpp.


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