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,805
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 11-15-11, 03:16 PM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1312
File comments: 3289
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
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-10-11, 09:53 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1312
File comments: 3289
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-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 01-26-10, 01:29 PM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1312
File comments: 3289
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 01-25-10, 02:34 PM  
willgk
An Aku'mai Servant
AddOn Author - Click to view AddOns

Forum posts: 37
File comments: 154
Uploads: 3
In the latest version you uploaded you left a 3rd frame to be rotated which was using the zahnrad image, right in the middle of the screen!!! This drove me absolutely batcrap insane trying to figure out which one was doing it. Please fix

and thanks for some great addons!
willgk is offline Report comment to moderator  
Reply With Quote
Old 10-25-09, 10:34 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1312
File comments: 3289
Uploads: 84
Complete rewrite. No CPU usage anymore. New Blizzard animation system ftw.
__________________
| 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 09-27-09, 01:26 PM  
zerosugar
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 17
Uploads: 1
More than 2

Is there a way you can have more than 2 rotations? I tried copying the code, ie. 1, 2 then 3 then 4 then 5 but it doesnt seem to want to have more than 2
zerosugar is offline Report comment to moderator  
Reply With Quote
Old 05-21-09, 04:44 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1312
File comments: 3289
Uploads: 84
Originally posted by Trogalith
i got one question, lol whats the two circles the red and blue on the actionbar. lol i think that looks neat (if its what im thinking it is; the health and mana meter) it would def be something i would like to have
http://www.wowinterface.com/download...75-RothUI.html
http://www.wowinterface.com/download...lerDiablo.html
__________________
| 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 05-20-09, 09:20 PM  
Trogalith
A Murloc Raider

Forum posts: 5
File comments: 1
Uploads: 0
i got one question, lol whats the two circles the red and blue on the actionbar. lol i think that looks neat (if its what im thinking it is; the health and mana meter) it would def be something i would like to have
Trogalith is offline Report comment to moderator  
Reply With Quote
Old 04-10-09, 05:05 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1312
File comments: 3289
Uploads: 84
Change the color to white, full alpha and activate blendmode

color_red = 255/255,
color_green = 255/255,
color_blue = 255/255,
alpha = 1,
blendmode = 1,
__________________
| 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 04-10-09, 04:49 AM  
Meadows
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
I really like the way this looks. I have a question though. On your screenshot "Example with color=white and blendmode = 1" what exactly would I have to make the LUA look like to get mine the same?
Meadows is offline Report comment to moderator  
Reply With Quote
Old 04-09-09, 05:54 AM  
Imithat
A Deviate Faerie Dragon
 
Imithat's Avatar
AddOn Author - Click to view AddOns

Forum posts: 15
File comments: 135
Uploads: 5
Originally posted by pHishr
Say I want to parent on of the frames to TargetFrame, how would I do that? I'm not very good at lua but I know how to edit stuff. )
anchorframe = "TargetFrame",
Imithat is online now Report comment to moderator  
Reply With Quote
Old 04-09-09, 02:34 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1312
File comments: 3289
Uploads: 84
You can now change the setpoint and the posx and posy of a frame.
Changed the event to Player_Login.
__________________
| 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 03-11-09, 09:07 AM  
pHishr
A Flamescale Wyrmkin
 
pHishr's Avatar
AddOn Author - Click to view AddOns

Forum posts: 105
File comments: 124
Uploads: 14
Say I want to parent on of the frames to TargetFrame, how would I do that? I'm not very good at lua but I know how to edit stuff. )
__________________
CHAMPION OF NEWERTH!!!!!!
pHishr is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: