-
Notifications
You must be signed in to change notification settings - Fork 2
timer
mythzeal edited this page Dec 26, 2016
·
1 revision
- 秒数
- 小数点指定が有効(最小0.01まで?)
- 不明
- 指定しなくても動く
- 0 が指定されることが多い
- (未確認)
- timerを更新間隔 sec 秒で起動する
- (多分無い)
- (未確認)
- timerを停止する
- 関数名
- (未確認)
- timer更新時に実行する関数名を設定する
- lua
local cnt = 0;
function PROC_TIMER_UPDATE(frame)
CHAT_SYSTEM("timer update!");
cnt = cnt + 1;
if cnt > 10 then
timer:Stop();
end
end
function ON_INIT(addon, frame)
local __timer = frame:GetChild("addontimer");
local timer = tolua.cast(__timer, "ui::CAddOnTimer");
timer:SetUpdateScript("PROC_TIMER_UPDATE");
timer:Start(0.1);
end- xml
...
<controls>
<timer name="addontimer" rect="0 0 10 10"/>
</controls>
</uiframe>