MCPcopy Create free account
hub / github.com/MyGUI/mygui / onMouseSetFocus

Method onMouseSetFocus

Plugins/Plugin_StrangeButton/StrangeButton.cpp:14–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12{
13
14 void StrangeButton::onMouseSetFocus(MyGUI::Widget* _old)
15 {
16 Base::onMouseSetFocus(_old);
17
18 if (getSubWidgetText() == nullptr)
19 return;
20
21 std::string s;
22 std::string str = getSubWidgetText()->getCaption();
23 for (int i = (int)str.length() - 1; i >= 0; i--)
24 s += str[i];
25
26 getSubWidgetText()->setCaption(s);
27 }
28
29 void StrangeButton::onMouseLostFocus(MyGUI::Widget* _new)
30 {

Callers

nothing calls this directly

Calls 2

lengthMethod · 0.45
setCaptionMethod · 0.45

Tested by

no test coverage detected