RSS

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

OnMouseWheel

[ править ]
Run when the frame receives a mouse wheel scrolling action.
[клоны]
Run when the frame receives a mouse wheel scrolling action. In order for this handler to be run, the frame must be mouse wheel enabled and the mouse cursor must be within the frame while the scroll wheel (or equivalent device) is used.


Signature:
Code
OnMouseWheel(self, delta)

Arguments:
  • self - Reference to the widget for which the script was run (frame)
  • delta - 1 for a scroll-up action, -1 for a scroll-down action (number)

Examples:
-- Print the mousewheel delta for a button
CreateFrame("Frame", "test", UIParent, "UIPanelButtonTemplate2")
test:SetPoint("CENTER")
test:EnableMouseWheel(true)
test:SetScript("OnMouseWheel", function(self, delta)
DEFAULT_CHAT_FRAME:AddMessage(delta)
end)

Доступна для: 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/OnMouseWheel