Work on the frame.
2 posters
Total RP 2 :: Development :: Discussion
Page 1 of 2
Page 1 of 2 • 1, 2
Work on the frame.
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.
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- Developer
- Posts : 25
Join date : 2014-02-18
Re: Work on the frame.
Thank you for sharing this, I will give it a look
Ellypse- Admin
- Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France
Re: Work on the frame.
If you have any question do not hesitate
CMCCallaghan- Developer
- Posts : 25
Join date : 2014-02-18
Re: Work on the frame.
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
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- Developer
- Posts : 25
Join date : 2014-02-18
Re: Work on the frame.
Wow, thank you again
I didn't have time yet to check your files (I'm sure this sentence is not correct ). I will give it a look today now that it's the weekend
Also, as I've planed to add the Chinese translation to Total RP, I will make the change to AceLocale-3.0 soon
I didn't have time yet to check your files (I'm sure this sentence is not correct ). I will give it a look today now that it's the weekend
Also, as I've planed to add the Chinese translation to Total RP, I will make the change to AceLocale-3.0 soon
Ellypse- Admin
- Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France
Re: Work on the frame.
you will see it's very easy to set and in the end it helps keeping the code very light
CMCCallaghan- Developer
- Posts : 25
Join date : 2014-02-18
Re: Work on the frame.
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- Admin
- Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France
Re: Work on the frame.
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
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- Developer
- Posts : 25
Join date : 2014-02-18
Re: Work on the frame.
I think the problem is that there is no such file in what you sharedCMCCallaghan wrote:for the complete list see the libs\libs.xml file
Ellypse- Admin
- Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France
Re: Work on the frame.
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"
Ellypse- Admin
- Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France
Re: Work on the frame.
I forgot to add the AceConsole-3.0 to libs.xml
Add this libs and it shoudl be good.
Add this libs and it shoudl be good.
CMCCallaghan- Developer
- Posts : 25
Join date : 2014-02-18
Re: Work on the frame.
Still not working
Here's the files I have with libs.xml
And here's the error
Here's the files I have with libs.xml
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
Ellypse- Admin
- Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France
Re: Work on the frame.
I'm a bit confused... what does the FrameXML.log in the log folders says?
CMCCallaghan- Developer
- Posts : 25
Join date : 2014-02-18
Re: Work on the frame.
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
I think I will have to get more familiar with working with libraries
Ellypse- Admin
- Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France
Re: Work on the frame.
I really should have pay more attention to the libs I used as I actually don't use LibDBIcon for the guide :/
CMCCallaghan- Developer
- Posts : 25
Join date : 2014-02-18
Re: Work on the frame.
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- Admin
- Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France
Ellypse- Admin
- Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France
Re: Work on the frame.
you used the code I gave you?
CMCCallaghan- Developer
- Posts : 25
Join date : 2014-02-18
Re: Work on the frame.
Oops, sorry, I was sure I've replied
No, I took the documentation from WoWAce and done it step by step, so I can understand everything that it's doing.
No, I took the documentation from WoWAce and done it step by step, so I can understand everything that it's doing.
Ellypse- Admin
- Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France
Re: Work on the frame.
so probably you didn't used the LibDataBroker yet. anyway it should be easier to use the minimap button with other addons.
CMCCallaghan- Developer
- Posts : 25
Join date : 2014-02-18
Re: Work on the frame.
I did use LibDataBroker
Here's the entire code
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- Admin
- Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France
Re: Work on the frame.
And it works great with addons like Minimap Button Frame and Masque, and slightly better with highly customized interfaces like Elvui and Tukui.
Ellypse- Admin
- Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France
Re: Work on the frame.
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
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- Developer
- Posts : 25
Join date : 2014-02-18
Re: Work on the frame.
Nope xD I'm an idiot. I will remove them for the next beta ^^"CMCCallaghan wrote:Have you remove all the functions related to the minimap button?
More information about that is coming really really soonCMCCallaghan 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
Ellypse- Admin
- Posts : 215
Join date : 2013-09-26
Age : 33
Location : Paris, France
Page 1 of 2 • 1, 2
Total RP 2 :: Development :: Discussion
Page 1 of 2
Permissions in this forum:
You cannot reply to topics in this forum
|
|