MCPcopy Create free account
hub / github.com/axmolengine/axmol / sliderEvent

Method sliderEvent

tests/cpp-tests/Source/LabelTest/LabelTest.cpp:1739–1752  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1737}
1738
1739void LabelShadowTest::sliderEvent(Object* pSender, ui::Slider::EventType type)
1740{
1741 if (type == Slider::EventType::ON_PERCENTAGE_CHANGED)
1742 {
1743 Slider* slider = (Slider*)this->getChildByTag(1);
1744 Slider* slider2 = (Slider*)this->getChildByTag(2);
1745
1746 auto offset = Size(slider->getPercent() - 50, 50 - slider2->getPercent());
1747 shadowLabelTTF->enableShadow(Color4B::BLACK, offset);
1748 shadowLabelBMFont->enableShadow(Color4B::GREEN, offset);
1749 shadowLabelOutline->enableShadow(Color4B::GREEN, offset);
1750 shadowLabelGrow->enableShadow(Color4B::BLUE, offset);
1751 }
1752}
1753
1754std::string LabelShadowTest::title() const
1755{

Callers

nothing calls this directly

Calls 6

setAdditionalKerningMethod · 0.80
SizeFunction · 0.50
getChildByTagMethod · 0.45
getPercentMethod · 0.45
enableShadowMethod · 0.45
setLineHeightMethod · 0.45

Tested by

no test coverage detected