Download
(60 Kb)
Download
Updated: 10-08-11 09:12 AM
Pictures
File Info
Updated:10-08-11 09:12 AM
Created:02-26-09 03:29 PM
Downloads:4,804
Favorites:19
MD5:
Categories:Graphic UI Mods, Developer Utilities
rFrameRotater
Version: 40300.01
by: zork [More]

Intro
Mod to test frame and/or texture rotation via using the WoW API AnimationGroup system.

SVN
Link: http://code.google.com/p/rothui/sour.../rFrameRotater

40300.01
- version to show the animation system bug on the ptr

003
- complete rewrite now using the animationgroup system, thus nearly zero cpu usage, no onUpdate func needed anymore

002
- added setpoints and posx, posy to the table
- change event to player_login

001
- initial release
Optional Files (0)


Archived Files (3)
File Name
Version
Size
Author
Date
003
102kB
zork
10-25-09 10:26 AM
002
249kB
zork
04-09-09 02:28 AM
001
249kB
zork
02-26-09 03:29 PM


Post A Reply Comment Options
Old 01-26-10, 01:29 PM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1310
File comments: 3288
Uploads: 84
This mod is for developers only, they know what they are doing .
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
zork is offline Report comment to moderator  
Reply With Quote
Old 11-10-11, 09:30 AM  
Sniffles
A Black Drake
 
Sniffles's Avatar
AddOn Author - Click to view AddOns

Forum posts: 86
File comments: 77
Uploads: 16
I don't know whether it's only buggy on the PTR, but I get this lua error, if I open the worldmap:

Code:
Message: Interface\AddOns\rFrameRotater\rFrameRotater.lua:222: attempt to concatenate global 'i' (a nil value)
Time: 11/10/11 17:29:30
Count: 72
Stack: Interface\AddOns\rFrameRotater\rFrameRotater.lua:222: in function <Interface\AddOns\rFrameRotater\rFrameRotater.lua:222>
[C]: in function `Hide'
Interface\FrameXML\UIParent.lua:1559: in function `SetUIPanel'
Interface\FrameXML\UIParent.lua:1402: in function `ShowUIPanel'
Interface\FrameXML\UIParent.lua:1338: in function <Interface\FrameXML\UIParent.lua:1334>
[C]: in function `SetAttribute'
Interface\FrameXML\UIParent.lua:2044: in function `ShowUIPanel'
Interface\FrameXML\UIParent.lua:2028: in function `ToggleFrame'
[string "TOGGLEWORLDMAP"]:1: in function <[string "TOGGLEWORLDMAP"]:1>

Locals: (*temporary) = <function> defined @Interface\FrameXML\RestrictedInfrastructure.lua:116
(*temporary) = "id: "
(*temporary) = nil
(*temporary) = " duration: 15 time: 414"
(*temporary) = "15"
(*temporary) = " time: "
(*temporary) = "414"
(*temporary) = 414.392
(*temporary) = 414
(*temporary) = "attempt to concatenate global 'i' (a nil value)"
cfg = <table> {
 frame = <table> {
 }
 anim = <table> {
 }
 texture = <table> {
 }
}
h = <unnamed> {
 0 = <userdata>
 t = <unnamed> {
 }
 time = 10886.558
}
__________________
Sniffles is offline Report comment to moderator  
Reply With Quote
Old 11-10-11, 09:53 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1310
File comments: 3288
Uploads: 84
Ignore this mod. The bug I made this for is fixed already. (Textures not displaying correctly.)
There is an error in the print function that has wrong variable name. The "i" should be "id". Easy to fix though. Error message says: rFrameRotater.lua line 222

Fix
Code:
    h:SetScript("OnShow", function() print("id: "..id.." duration: "..cfg.anim.duration.." time: "..floor(GetTime()-h.time)) end)
    h:SetScript("OnHide", function() print("id: "..id.." duration: "..cfg.anim.duration.." time: "..floor(GetTime()-h.time)) end)
Why on earth would you install this mod? Stay away from it. Unless you want huge rotating thingies in the center of your screen for no reason.
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Last edited by zork : 11-10-11 at 10:01 AM.
zork is offline Report comment to moderator  
Reply With Quote
Old 11-15-11, 02:21 PM  
Aanson
A Flamescale Wyrmkin

Forum posts: 123
File comments: 14
Uploads: 0
Hello there.

I've read your last couple of comments but I'll give this a bash anyways lol...

I've been looking for a long time for an addon (or script) that will enable me to rotate a frame 270 degrees.

It's for my custom UI but I'll not bore you with the details!

Any help / advice you could give on this would be great!
__________________
__________________
Aanson is offline Report comment to moderator  
Reply With Quote
Old 11-15-11, 03:16 PM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1310
File comments: 3288
Uploads: 84
You can do this easily with the animation system.
lua Code:
  1. local createRotateAnim = function(parent,x,y,size,duration)
  2.     local t = parent:CreateTexture(nil, "BACKGROUND", nil, -8)
  3.     t:SetSize(size,size)
  4.     t:SetPoint("CENTER",x,y)
  5.     t:SetTexture("Interface\\AddOns\\myMod\\myTexture")
  6.     local ag = t:CreateAnimationGroup()
  7.     local anim = ag:CreateAnimation("Rotation")
  8.     anim:SetDegrees(270)
  9.     anim:SetDuration(duration) --how long should it take to rotate 270
  10.     ag:Play()
  11.     return t
  12.   end

parent is the frame you want the texture to be anchored to.

You do not have to "Play()" the animation just yet. You can do this on an event aswell. And you can have another animationgroup on the same texure that does the same thing just backwards. (-degrees)

http://wowprogramming.com/docs/widgets#animationgroup
http://wowprogramming.com/docs/widgets#animation

http://wowprogramming.com/docs/widgets/Animation
__________________
| Simple is beautiful.
| Roth UI | Roth UI FAQ | GoogleCode | Zork | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Last edited by zork : 11-15-11 at 03:22 PM.
zork is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: