WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Blizzards SCT (https://www.wowinterface.com/forums/showthread.php?t=39759)

Aftermathhqt 04-24-11 08:00 AM

Blizzards SCT
 
Does anyone know if you can move blizzards SCT?

with a simple :SetPoint?

Aprikot 04-24-11 09:13 AM

Quote:

Originally Posted by Game92 (Post 235321)
Does anyone know if you can move blizzards SCT?

with a simple :SetPoint?

Not with SetPoint, but you can do it via start/end X/Y coords for COMBAT_TEXT_LOCATIONS:

http://wowprogramming.com/utils/xmlb...CombatText.lua

SuperClassic does it like so (replace the "opts" stuff w/your own):

lua Code:
  1. hooksecurefunc("CombatText_UpdateDisplayedMessages", function ()
  2.     COMBAT_TEXT_LOCATIONS = {
  3.         startX  = opts.StartX,
  4.         startY = opts.StartY * COMBAT_TEXT_Y_SCALE,
  5.         endX = opts.EndX,
  6.         endY = opts.EndY * COMBAT_TEXT_Y_SCALE
  7.     }
  8. end)

jasje 04-24-11 11:16 AM

Have a look at this
http://www.wowinterface.com/download...71-MonoUI.html
and his blizzard sct modifications

Aftermathhqt 04-24-11 11:27 AM

I already have my own modifcation, just need to change position.

http://pastebin.com/LvRA5enY

Aftermathhqt 04-24-11 12:03 PM

Quote:

Originally Posted by Aprikot (Post 235327)
Not with SetPoint, but you can do it via start/end X/Y coords for COMBAT_TEXT_LOCATIONS:

http://wowprogramming.com/utils/xmlb...CombatText.lua

SuperClassic does it like so (replace the "opts" stuff w/your own):

lua Code:
  1. hooksecurefunc("CombatText_UpdateDisplayedMessages", function ()
  2.     COMBAT_TEXT_LOCATIONS = {
  3.         startX  = opts.StartX,
  4.         startY = opts.StartY * COMBAT_TEXT_Y_SCALE,
  5.         endX = opts.EndX,
  6.         endY = opts.EndY * COMBAT_TEXT_Y_SCALE
  7.     }
  8. end)

Code:

Message: ...face\AddOns\AftermathhUI\Modules\AfterCombatText.lua:48: hooksecurefunc(): CombatText_UpdateDisplayedMessages is not a function
Time: 04/24/11 20:02:33
Count: 1
Stack: [C]: in function `hooksecurefunc'
...face\AddOns\AftermathhUI\Modules\AfterCombatText.lua:48: in function <...face\AddOns\AftermathhUI\Modules\AfterCombatText.lua:4>
[C]: in function `LoadAddOn'
[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:7: in function <[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:4>
[C]: ?
[C]: in function `hooksecurefunc'
...face\AddOns\AftermathhUI\Modules\AfterCombatText.lua:48: in function <...face\AddOns\AftermathhUI\Modules\AfterCombatText.lua:4>
[C]: in function `LoadAddOn'
...ddOns\AftermathhUI\Modules\AfterMinimap_GameTime.lua:21: in main chunk

Locals:


Aprikot 04-24-11 12:15 PM

Quote:

Originally Posted by Game92 (Post 235341)
Code:

Message: ...face\AddOns\AftermathhUI\Modules\AfterCombatText.lua:48: hooksecurefunc(): CombatText_UpdateDisplayedMessages is not a function
Time: 04/24/11 20:02:33
Count: 1
Stack: [C]: in function `hooksecurefunc'
...face\AddOns\AftermathhUI\Modules\AfterCombatText.lua:48: in function <...face\AddOns\AftermathhUI\Modules\AfterCombatText.lua:4>
[C]: in function `LoadAddOn'
[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:7: in function <[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:4>
[C]: ?
[C]: in function `hooksecurefunc'
...face\AddOns\AftermathhUI\Modules\AfterCombatText.lua:48: in function <...face\AddOns\AftermathhUI\Modules\AfterCombatText.lua:4>
[C]: in function `LoadAddOn'
...ddOns\AftermathhUI\Modules\AfterMinimap_GameTime.lua:21: in main chunk

Locals:


Yucky. I don't use it myself, and I don't know that a function is necessary. Try just
Code:

COMBAT_TEXT_LOCATIONS = {
    startX  = -300,
    startY = 300,
    endX = -300,
    endY = -300
}


Aftermathhqt 04-24-11 12:27 PM

Quote:

Originally Posted by Aprikot (Post 235344)
Yucky. I don't use it myself, and I don't know that a function is necessary. Try just
Code:

COMBAT_TEXT_LOCATIONS = {
    startX  = -300,
    startY = 300,
    endX = -300,
    endY = -300
}


Got it to work, but yeah xD looks abit funie! then i have somthing to atleast!

Aftermathhqt 04-24-11 12:55 PM

Done! Thanks for help! Abit more centered to fit forte ;>


Aprikot 04-25-11 06:58 AM

Looks good--was it off-center before? I briefly tested the last thing I posted and it did seem a little nasty...like not all messages were behaving. What code did you land on for the positioning?

Aftermathhqt 04-25-11 07:23 AM

Quote:

Originally Posted by Aprikot (Post 235385)
Looks good--was it off-center before? I briefly tested the last thing I posted and it did seem a little nasty...like not all messages were behaving. What code did you land on for the positioning?

Thanks, yes it was, he toke me somtime to figure out anyways here is the code.

Code:

                local function UpdateCombatTextPos()
                COMBAT_TEXT_LOCATIONS = {   
                    startX  = -12, -- ("-200" LEFT) ("200" RIGHT)
                    startY = 384 * COMBAT_TEXT_Y_SCALE, -- Where it starts (UPP) (384)
                    endX = -12, -- ("-200" LEFT) ("200" RIGHT)
                    endY = 159 * COMBAT_TEXT_Y_SCALE  -- Where it ends (DOWN) (609)
                }
            end
                hooksecurefunc("CombatText_UpdateDisplayedMessages", UpdateCombatTextPos)



All times are GMT -6. The time now is 12:33 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI