LumaButton.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 #include "LumaSystem.hpp"
5 
6 namespace iv
7 {
8 
17 class LumaButton : public PickableSlot, public LumaListener, public TranslucentElem
18 {
19 public:
22 
23  static const constexpr int DefaultShadowHeightPx = 2;
24 
26 
27  LumaButton * sufraceNeutralColor( std::optional< float4 > );
28  LumaButton * overlayNeutralColor( std::optional< float4 > );
33 
34  LumaButton * preblend( float4 val );
35  LumaButton * translucent( bool val );
36 
37  // initialization parameters
41 
45 
50 
56 
62 
68 
69 protected:
70  // Elem
71  virtual void first_pass_impl( ElementRenderer * ) override;
72 
73  // LumaButton
78  virtual void ColorsChanged( float4 surface, float4 on_surface ){}
79 
80  void CallColorsChanged();
82 
83 protected:
84  virtual void LumaStyleChanged( LumaStyle const & ) override;
85 
86 private:
87  AnimHeap anim;
88 
89  Lambda_Connector * lambda;
90  Activator activator_ref;
91  bool hot_last;
92 
93  //Image * img_shadow;
94  Image * img_surface;
95  Image * img_overlay;
96 
97  Image * img_activation;
98  Image * img_hot;
99 };
100 
101 }