12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 22 ■ <strong>Creating</strong> Scroll Frames 415type. Although the scroll frame provides an API <strong>for</strong> scrolling horizontally <strong>and</strong>vertically, it does not provide any scroll bars on its own.You can experiment with scroll frames by creating a new addon skeletoncalled ScrollFrameTest, so you have a place to put the test code <strong>for</strong> thischapter. Create ScrollFrameTest.toc with the following contents:## Interface: 30300## Title: ScrollFrameTest## Notes: Test addon <strong>for</strong> scroll framesScrollFrameTest.xmlScrollFrameTest.luaNext, create the basic frame definition within ScrollFrameTest.xml:This definition creates a 150x150 frame in the center <strong>of</strong> the screen with ablack background.Adding a Scroll ChildThe actual contents <strong>of</strong> the frame are defined within the elementwhen using XML, or set with the SetScrollChild() method when using Lua.Add the following section to ScrollFrameTest.xml immediately after the tag:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!