• 0

    posted a message on MyMedia
    Something I want to share with all the people having problems with creating the mymedia.lua file:
    I put together a .bat file witch does all the stuff you need to do to add your Media
    How this works:
    You need to have SharedMedia installed (http://files.wowace.com/SharedMedia/)
    Copy the code below and put it into the Interface\Addons\SharedMedia\ folder and name it something like myMedia.bat
    All you have to do now is to run that .bat (doubleclick it..)
    It creates subdirectories inside SharedMedia. These are:
    MyMedia files\background (background textures)
    MyMedia files\border (border textures)
    MyMedia files\font (.ttf font files)
    MyMedia files\sound (.mp3 stuff)
    MyMedia files\statusbar (statusbar textures)

    the .bat will pause at that point so you can put your mediafiles into the corresponding folders. Then continue the .bat
    It will create a working myMedia.lua file for you with all files it just found inside MyMedia files\[Subfolder]

    @echo off
    echo.==================
    echo ==MyMediaCreator==
    echo.==================
    echo.for use inside "SharedMedia" only!
    echo.
    if not exist "MyMedia files" mkdir "MyMedia files"
    if not exist "MyMedia files\background" mkdir "MyMedia files\background"
    echo creating "background" folder (Background Textures)
    if not exist "MyMedia files\border" mkdir "MyMedia files\border"
    echo creating "border" folder (Border Textures)
    if not exist "MyMedia files\font" mkdir "MyMedia files\font"
    echo creating "font" folder (.ttf Fonts)
    if not exist "MyMedia files\sound" mkdir "MyMedia files\sound"
    echo creating "sound" folder (annoying sounds go here)
    if not exist "MyMedia files\statusbar" mkdir "MyMedia files\statusbar"
    echo creating "statusbar" folder (Statusbar Textures)
    echo.
    echo.
    echo !Please put your files into the subfolders!
    echo Only Files in these Folders will be added.
    echo MyMedia.lua will be overwritten!
    echo.
    pause
    
    echo -- Created by MyMediaCreator --> MyMedia.lua
    echo if not SharedMedia then return end>> MyMedia.lua
    
    echo.>>MyMedia.lua
    echo --background>> MyMedia.lua
    echo -- background
    for /r ".\MyMedia files\background" %%v in (*.*) do echo SharedMedia:Register("background", "%%~nv", [[Interface\Addons\SharedMedia\MyMedia files\background\%%~nv%%~xv]])>> MyMedia.lua
    for /r ".\MyMedia files\background" %%v in (*.*) do echo %%~nv%%~xv
    
    echo --border>> MyMedia.lua
    echo -- border
    for /r ".\MyMedia files\border" %%v in (*.*) do echo SharedMedia:Register("border", "%%~nv", [[Interface\Addons\SharedMedia\MyMedia files\border\%%~nv%%~xv]])>> MyMedia.lua
    for /r ".\MyMedia files\border" %%v in (*.*) do echo %%~nv%%~xv
    
    echo --font>> MyMedia.lua
    echo -- font
    for /r ".\MyMedia files\font" %%v in (*.*) do echo SharedMedia:Register("font", "%%~nv", [[Interface\Addons\SharedMedia\MyMedia files\font\%%~nv%%~xv]])>> MyMedia.lua
    for /r ".\MyMedia files\font" %%v in (*.*) do echo %%~nv%%~xv
    
    echo --sound>> MyMedia.lua
    echo -- sound
    for /r ".\MyMedia files\sound" %%v in (*.*) do echo SharedMedia:Register("sound", "%%~nv", [[Interface\Addons\SharedMedia\MyMedia files\sound\%%~nv%%~xv]])>> MyMedia.lua
    for /r ".\MyMedia files\sound" %%v in (*.*) do echo %%~nv%%~xv
    
    echo --statusbar>> MyMedia.lua
    echo -- statusbar
    for /r ".\MyMedia files\statusbar" %%v in (*.*) do echo SharedMedia:Register("statusbar", "%%~nv", [[Interface\Addons\SharedMedia\MyMedia files\statusbar\%%~nv%%~xv]])>> MyMedia.lua
    for /r ".\MyMedia files\statusbar" %%v in (*.*) do echo %%~nv%%~xv
    
    echo.
    echo finished.
    
    pause


    Example output
    -- Created by MyMediaCreator --
    if not SharedMedia then return end
    
    --background
    SharedMedia:Register("background", "pinkflowers", [[Interface\Addons\SharedMedia\MyMedia files\background\pinkflowers.tga]])
    --border
    SharedMedia:Register("border", "clearBorder", [[Interface\Addons\SharedMedia\MyMedia files\border\clearBorder.tga]])
    --font
    SharedMedia:Register("font", "ArialBold", [[Interface\Addons\SharedMedia\MyMedia files\font\ArialBold.ttf]])
    --sound
    SharedMedia:Register("sound", "boom", [[Interface\Addons\SharedMedia\MyMedia files\sound\boom.mp3]])
    --statusbar
    SharedMedia:Register("statusbar", "steel", [[Interface\Addons\SharedMedia\MyMedia files\statusbar\steel.tga]])

    I uploaded this also to curse http://www.curse.com/downloads/details/11581/
    The version there is aimed to create a standalone-addon Version but the .bat postet here is also included.

    -zapl
    Posted in: General AddOns
  • 0

    posted a message on nQuestLog
    I just added some code to nQuestlog to make LightHeaded-Comment coords clickable. Since it seems to be impossible to create links inside a comment I simply put them in front of the comment-text. If you click them you will get a waypoint in your current zone since it is impossible to determine the correct zone.

    Screenshot:

    Changes in nQuestLog\modules\Comments\Comments.lua
    --part 1 
    --insert before "local function itemClick(link)" line ~222
    local function addCommentLoc(cat, x, y, ind)
    	if LightHeaded and type(LightHeaded.OnHyperlinkClick) == "function" then
    		cat:AddLine('text', '|cFF0066FF ['..x..', '..y..']|r', 'func', function() LightHeaded:OnHyperlinkClick(nil,
    		"lhref:coord:"..x..":"..y..":"..x..","..y); end, 'indentation', indentSize*ind)
    	end
    end
    --part 1
    
    --part 2
    -- existing stuff around line 500
    cat = Tablet:AddCategory('text', 'LightHeaded Comments', 'columns', 1)
    if LightHeaded:GetNumQuestComments(title, level) then
    	for idx, cqid, cid, rating, indent, parent, date, poster, comment in LightHeaded:IterateQuestComments(title, level) do
    		if tonumber(qid) == tonumber(cqid) then
    			cat:AddLine('text', ("|cFF66FF66[%s - %s - %s]|r"):format(poster, date, rating), 'wrap', true, 'indentation',
    				indent*indentSize)
    -- begin NEW
    			for xCoord, yCoord in comment:gmatch("(%d%d?%.?%d?%d?)%s*[, ]%s*(%d%d?%.?%d?%d?)") do
    				addCommentLoc(cat, tonumber(xCoord), tonumber(yCoord), indent)
    			end
    -- end NEW
    			cat:AddLine('text', comment, 'wrap', true, 'indentation', indent*indentSize)
    			cat:AddLine('text', ' ') -- spacer.
    		end
    	end
    else
    --part 2


    edit: @Quagmire: thx :)
    Posted in: General AddOns
  • To post a comment, please or register a new account.