MyGUI 3.4.3
MyGUI_ControllerRepeatClick.cpp
Go to the documentation of this file.
1/*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7#include "MyGUI_Precompiled.h"
9
10namespace MyGUI
11{
12
14 {
15 if (mTimeLeft == 0)
16 mTimeLeft = mInit;
17
18 if (mStep <= 0)
19 return true;
20
21 mTimeLeft -= _time;
22 while (mTimeLeft <= 0)
23 {
24 mTimeLeft += mStep;
25 eventRepeatClick(_widget, this);
26 }
27 return true;
28 }
29
30 void ControllerRepeatClick::setRepeat(float init, float step)
31 {
32 mInit = init;
33 mStep = step;
34 }
35
36 void ControllerRepeatClick::setProperty(std::string_view _key, std::string_view _value)
37 {
38 }
39
43}
void prepareItem(Widget *_widget) override
void setProperty(std::string_view _key, std::string_view _value) override
bool addTime(Widget *_widget, float _time) override
void setRepeat(float init, float step)
widget description should be here.