RSS

Суббота, 21.12.2024, 19:57
Главная » WoW API » Событий API Виджетов »

OnUpdate

[ править ]
Run each time the screen is drawn by the game engine.
[клоны]
Run each time the screen is drawn by the game engine. This handler runs for each frame (not Frame) drawn -- if WoW is currently running at 27.5 frames per second, the OnUpdate handlers for every visible Frame, Animation, and AnimationGroup (or descendant thereof) are run approximately every 2/55ths of a second. Therefore, OnUpdate handler can be useful for processes which need to be run very frequently or with accurate timing, but extensive processing in an OnUpdate handler can slow down the game's framerate.

See the chapter "Responding to Graphic Updates with OnUpdate" for more information.


Signature:
Code
OnUpdate(self, elapsed)

Arguments:
  • self - Reference to the widget for which the script was run (frame)
  • elapsed - Number of seconds since the OnUpdate handlers were last run (likely a fraction of a second) (number)

Доступна для: Animation, AnimationGroup, Alpha, Path, Rotation, Scale, Translation, Frame, ArchaeologyDigSiteFrame, Button, ColorSelect, Cooldown, EditBox, GameTooltip, MessageFrame, Minimap, Model, MovieFrame, QuestPOIFrame, ScrollFrame, ScrollingMessageFrame, SimpleHTML, Slider, StatusBar, CheckButton, PlayerModel, DressUpModel, TabardModel

Также смотрите: Событий API Виджетов
Ссылки: http://wowprogramming.com/docs/scripts/OnUpdate