Total RP 2
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Work on the frame.

2 posters

Page 1 of 2 1, 2  Next

Go down

Work on the frame. Empty Work on the frame.

Post  CMCCallaghan Thu Mar 06, 2014 3:10 pm

I have been working on a new interface for the guide frame

Here is what I've done:

_Remove the xml file as the frame is created from the lua file

_I add the lib AceLocale-3.0 with dedicated file for every languages (only english so far, but the model is the same for every language)

_I created an embedable library called AceWidget-3.0 that has for now two functions one to create textures the other to create fontstring

_I used the same string format as totalRP2 is using for every page of the guide so I use the TRP2_ConvertToHTML() function to transform it

The source code can be found on my Google Drive

The code is not commented but as it is very short it is not very hard to understand.
CMCCallaghan
CMCCallaghan
Developer

Posts : 25
Join date : 2014-02-18

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  Ellypse Thu Mar 06, 2014 7:32 pm

Thank you for sharing this, I will give it a look Very Happy
Ellypse
Ellypse
Admin

Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  CMCCallaghan Fri Mar 07, 2014 9:32 am

If you have any question do not hesitate
CMCCallaghan
CMCCallaghan
Developer

Posts : 25
Join date : 2014-02-18

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  CMCCallaghan Sat Mar 08, 2014 8:18 am

I made some little improvement such as making it movable and added a short description to the buttons tooltips

The main purpose of the way I made it movable is to be able to stick it to Total RP2 Main Frame (the one I'm working on).
In other words: if the main frame in shown then the guide frame will stick to it, if not then it will appeared where you left it.

I also renamed the directory file to totalRP2_Guide2 to make it work with the old Guide.

I did a quick workaround on the frFR file to make it translated in french too
CMCCallaghan
CMCCallaghan
Developer

Posts : 25
Join date : 2014-02-18

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  Ellypse Sat Mar 08, 2014 8:40 am

Wow, thank you again Very Happy
I didn't have time yet to check your files (I'm sure this sentence is not correct Suspect ). I will give it a look today now that it's the weekend Very Happy

Also, as I've planed to add the Chinese translation to Total RP, I will make the change to AceLocale-3.0 soon Very Happy 
Ellypse
Ellypse
Admin

Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  CMCCallaghan Sat Mar 08, 2014 8:42 am

you will see it's very easy to set and in the end it helps keeping the code very light
CMCCallaghan
CMCCallaghan
Developer

Posts : 25
Join date : 2014-02-18

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  Ellypse Sat Mar 08, 2014 12:53 pm

I'm having issues running your files because of librairies dependency. I tried to fix it, but it seems that you have renamed several files (totalRP2-1.024?). Can you upload your entire folder so I don't have to change names around? ^^
Ellypse
Ellypse
Admin

Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  CMCCallaghan Sat Mar 08, 2014 12:57 pm

you have to run it with totalRP2 as it use the TRP2_ConvertToHTML() function which is in the totalRP2_API.lua file in totalRP2 folder.

You probably have to look for some libraries you might not have such as LibDBIcon-1.0. for the complete list see the libs\libs.xml file

CMCCallaghan
CMCCallaghan
Developer

Posts : 25
Join date : 2014-02-18

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  Ellypse Sat Mar 08, 2014 1:00 pm

CMCCallaghan wrote:for the complete list see the libs\libs.xml file
I think the problem is that there is no such file in what you shared  Neutral 
Ellypse
Ellypse
Admin

Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  CMCCallaghan Sat Mar 08, 2014 1:02 pm

my bad. It's fixed
CMCCallaghan
CMCCallaghan
Developer

Posts : 25
Join date : 2014-02-18

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  Ellypse Sat Mar 08, 2014 1:12 pm

Thank you but I still have an error even though I have the library in the libs folder
Code:
totalRP2-1.024\libs\AceAddon-3.0\AceAddon-3.0-11.lua:210: in function "EmbedLibrary"
I'm sorry if I'm doing it wrong, I've never used Ace Mad
Ellypse
Ellypse
Admin

Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  CMCCallaghan Sat Mar 08, 2014 1:27 pm

I forgot to add the AceConsole-3.0 to libs.xml
Add this libs and it shoudl be good.
CMCCallaghan
CMCCallaghan
Developer

Posts : 25
Join date : 2014-02-18

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  Ellypse Sat Mar 08, 2014 1:37 pm

Still not working Mad
Here's the files I have with libs.xml
Work on the frame. Capture%20d%E2%80%99%C3%A9cran%202014-03-08%20%C3%A0%2017.32.04
And here's the error
Code:
6x totalRP2_Guide2\totalRP2_Guide2.lua:1: Cannot find a library instance of "AceAddon-3.0".
<in C code>
BugSack-r272-release\Libs\LibStub\Libstub.lua:38: in function "LibStub"
totalRP2_Guide2\totalRP2_Guide2.lua:1: in main chunk

Locals:
self = <table> {
 NewLibrary = <function> defined @Interface\AddOns\BugSack\Libs\LibStub\Libstub.lua:20
 minors = <table> {
 }
 minor = 2
 IterateLibraries = <function> defined @Interface\AddOns\BugSack\Libs\LibStub\Libstub.lua:46
 GetLibrary = <function> defined @Interface\AddOns\BugSack\Libs\LibStub\Libstub.lua:36
 libs = <table> {
 }
}
major = "AceAddon-3.0"
silent = nil
From what I understand it can't find the AceAddon library but it's there, it's in the right folder Neutral
Ellypse
Ellypse
Admin

Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  CMCCallaghan Sat Mar 08, 2014 1:44 pm

I'm a bit confused... what does the FrameXML.log in the log folders says?
CMCCallaghan
CMCCallaghan
Developer

Posts : 25
Join date : 2014-02-18

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  Ellypse Sat Mar 08, 2014 1:58 pm

Okay, I finally got it to work. I've added the entire Ace folder in the AddOns folder to be sure it loads all the libraries, I also download LibQTip and added it to the libs.
I think I will have to get more familiar with working with libraries Rolling Eyes 
Ellypse
Ellypse
Admin

Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  CMCCallaghan Sat Mar 08, 2014 2:05 pm

I really should have pay more attention to the libs I used as I actually don't use LibDBIcon for the guide :/
CMCCallaghan
CMCCallaghan
Developer

Posts : 25
Join date : 2014-02-18

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  Ellypse Sat Mar 08, 2014 2:07 pm

Well, seing this library there made me curious about using it for TRP's minimap icon. I hate it. It needs some drag-and-drop ^^


Last edited by Ellypse on Sat Mar 08, 2014 3:39 pm; edited 1 time in total
Ellypse
Ellypse
Admin

Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  Ellypse Sat Mar 08, 2014 3:39 pm

Work on the frame. Minimap
:)
Ellypse
Ellypse
Admin

Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  CMCCallaghan Sat Mar 08, 2014 5:50 pm

you used the code I gave you?
CMCCallaghan
CMCCallaghan
Developer

Posts : 25
Join date : 2014-02-18

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  Ellypse Sun Mar 09, 2014 1:45 pm

Oops, sorry, I was sure I've replied  scratch 
No, I took the documentation from WoWAce and done it step by step, so I can understand everything that it's doing.
Ellypse
Ellypse
Admin

Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  CMCCallaghan Sun Mar 09, 2014 2:02 pm

so probably you didn't used the LibDataBroker yet. anyway it should be easier to use the minimap button with other addons.
CMCCallaghan
CMCCallaghan
Developer

Posts : 25
Join date : 2014-02-18

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  Ellypse Sun Mar 09, 2014 2:04 pm

I did use LibDataBroker Smile

Here's the entire code
Code:
local icon = LibStub("LibDBIcon-1.0")

local TRP2_MinimapButton = LibStub("LibDataBroker-1.1"):NewDataObject("TRP2_MinimapButton", {
   type = "data source",
   text = "Total RP 2",
   icon = "Interface\\AddOns\\totalRP2\\Images\\icon.tga",
   OnClick = function(clickedframe, button) if button == "LeftButton" then
               TRP2_OpenMainMenu(not TRP2MainFrame:IsVisible());
            elseif button == "RightButton" then
               if TRP2_RaccBar:IsVisible() then
                  TRP2_RaccBar:Hide();
               else
                  TRP2_RaccBar:Show();
               end
            end
          end,
         OnLoad = function() self:RegisterForClicks("LeftButtonUp","RightButtonUp");end,
         OnTooltipShow = function(tooltip)
            TRP2_Libs:Tooltip_LDB(tooltip)
        end,
})

function TRP2_Libs:Tooltip_LDB(tooltip)
    tooltip:AddLine("Total RP 2");
    tooltip:AddLine(TRP2_LOC_CLIC.." : "..TRP2_LOC_OPENMENU);
    tooltip:AddLine(TRP2_LOC_CLICDROIT.." : "..TRP2_LOC_OPENRACC);
end

function TRP2_Libs:OnInitialize()

   self.db = LibStub("AceDB-3.0"):New("totalRP2", {
      profile = {
         minimap = {
            hide = false,
         },
      },
   })
   icon:Register("TRP2_MinimapButton", TRP2_MinimapButton, self.db.profile.minimap)
end
Ellypse
Ellypse
Admin

Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  Ellypse Sun Mar 09, 2014 2:06 pm

And it works great with addons like Minimap Button Frame and Masque, and slightly better with highly customized interfaces like Elvui and Tukui.
Ellypse
Ellypse
Admin

Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  CMCCallaghan Mon Mar 10, 2014 3:53 am

This is a good thing. Have you remove all the functions related to the minimap button?

Also the rework that shoudl be done is a complete rebuild of the UI to skip the use of various frames and have more consistancy over all pages
CMCCallaghan
CMCCallaghan
Developer

Posts : 25
Join date : 2014-02-18

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  Ellypse Mon Mar 10, 2014 5:16 am

CMCCallaghan wrote:Have you remove all the functions related to the minimap button?
Nope xD I'm an idiot. I will remove them for the next beta ^^"

CMCCallaghan wrote:Also the rework that shoudl be done is a complete rebuild of the UI to skip the use of various frames and have more consistancy over all pages
More information about that is coming really really soon Very Happy
Ellypse
Ellypse
Admin

Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France

Back to top Go down

Work on the frame. Empty Re: Work on the frame.

Post  Sponsored content


Sponsored content


Back to top Go down

Page 1 of 2 1, 2  Next

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum