15 if (m_DefaultSkin !=
nullptr)
20 if (m_Skin != m_DefaultSkin && m_Skin !=
nullptr)
26 Component* Control::getHitComponent(int32_t x, int32_t y)
28 if (!isInteractable()) {
return nullptr; }
30 Component* hitted = Parent::getHitComponent(x, y);
32 if (hitted !=
nullptr)
37 if (m_Skin !=
nullptr)
39 return m_Skin->getHitComponent(x, y);
45 void Control::layoutChildren()
47 if (m_Skin !=
nullptr)
49 m_Skin->layoutChildren();
53 Parent::layoutChildren();
57 void Control::prerenderSelf()
59 if (m_Skin !=
nullptr)
61 Sml::Renderer::getInstance().pushSetTarget(getSnapshot());
63 m_Skin->prerenderControl();
65 Sml::Renderer::getInstance().popTarget();
69 int32_t Control::computeCustomPrefWidth(int32_t height)
const
71 if (m_Skin !=
nullptr)
73 return m_Skin->computePrefWidth(height);
79 int32_t Control::computeCustomPrefHeight(int32_t width)
const
81 if (m_Skin !=
nullptr)
83 return m_Skin->computePrefHeight(width);
89 int32_t Control::computeCustomMinWidth(int32_t height)
const
91 if (m_Skin !=
nullptr)
93 return m_Skin->computeMinWidth(height);
99 int32_t Control::computeCustomMinHeight(int32_t width)
const
101 if (m_Skin !=
nullptr)
103 return m_Skin->computeMinHeight(width);
109 int32_t Control::computeCustomMaxWidth(int32_t height)
const
111 if (m_Skin !=
nullptr)
113 return m_Skin->computeMaxWidth(height);
119 int32_t Control::computeCustomMaxHeight(int32_t width)
const
121 if (m_Skin !=
nullptr)
123 return m_Skin->computeMaxHeight(width);