As the title states I'm in need a programmers help.
I have put together a UI from other peoples creations (and yes i have asked each one for there permission to use and edit said addons). i can use the AddOn as is but it becomes a pain having to open the .lua edit it, save it, then reload WoW. My main goal is to make in-game options and be abel to have everything in a single file. Right now I have accompliched this with 2 Addons BasicUI and BasicUI_Config. The main issue with this is you have to do a /reload for any changes to to effect.
So for this project i change the UI name to cUI and would like some help figuring out how to get my UI to have the following:
Help with understanding how this is accomplished and how creating functions happens.
I know there will be alot of people that say "Well i guess you should start reading on .lua coding." or "Stop being lazy, do the foot work and create it yourself.". I do understand the best way to learn how to do it is read up on it and learn. But for me to learn is to do and right now I'm stuck on the to do part, i have been trying for about 3 weeks to bring the config over to the main AddOn but nothing seems to work and if i do get it over there and showing when i change a option nothing happens.
So below is the main AddOn in working form (the cUI one), if needed i can also upload BasicUI if it is needed.
Thank you all for your time in reading this and thank you to anyone who decides to help out.
local defaults = {
profile = {
},
global = {
gold = {},
},
Then the code in the datatext gold had to read:
-- Gold
if db.datatext.gold and db.datatext.gold > 0 then
local Stat = CreateFrame('Frame')
Stat:EnableMouse(true)
Stat:SetFrameStrata('BACKGROUND')
Stat:SetFrameLevel(3)
local Text = PanelLeft:CreateFontString(nil, 'OVERLAY')
Text:SetFont(db.general.font, db.datatext.fontsize,'THINOUTLINE')
PP(db.datatext.gold, Text)
local Profit = 0
local Spent = 0
local OldMoney = 0
local myPlayerRealm = GetCVar('realmName');
local function formatMoney(money)
local gold = floor(math.abs(money) / 10000)
local silver = mod(floor(math.abs(money) / 100), 100)
local copper = mod(floor(math.abs(money)), 100)
if gold ~= 0 then
return format('%s'..L['|cffffd700g|r'], gold)
elseif silver ~= 0 then
return format('%s'..L['|cffc7c7cfs|r'], silver)
else
return format('%s'..L['|cffeda55fc|r'], copper)
end
end
local function FormatTooltipMoney(money)
local gold, silver, copper = abs(money / 10000), abs(mod(money / 100, 100)), abs(mod(money, 100))
local cash = ''
cash = format('%.2d'..L['|cffffd700g|r']..' %.2d'..L['|cffc7c7cfs|r']..' %.2d'..L['|cffeda55fc|r'], gold, silver, copper)
return cash
end
local function OnEvent(self, event)
if event == 'PLAYER_ENTERING_WORLD' then
OldMoney = GetMoney()
end
local NewMoney = GetMoney()
local Change = NewMoney-OldMoney -- Positive if we gain money
if OldMoney>NewMoney then -- Lost Money
Spent = Spent - Change
else - Gained Money
Profit = Profit + Change
end
Text:SetText(hexa..'Cash: '..hexb..formatMoney(NewMoney))
-- Setup Money Tooltip
self:SetAllPoints(Text)
local myname = UnitName('player');
if (BasicUI.db.global == nil) then BasicUI.db.global = {}; end
if (BasicUI.db.global.gold == nil) then BasicUI.db.global.gold = {}; end
if (BasicUI.db.global.gold[myPlayerRealm]==nil) then BasicUI.db.global.gold[myPlayerRealm]={}; end
BasicUI.db.global.gold[myPlayerRealm][myname] = GetMoney();
OldMoney = NewMoney
end
Stat:RegisterEvent('PLAYER_MONEY')
Stat:RegisterEvent('SEND_MAIL_MONEY_CHANGED')
Stat:RegisterEvent('SEND_MAIL_COD_CHANGED')
Stat:RegisterEvent('PLAYER_TRADE_MONEY')
Stat:RegisterEvent('TRADE_MONEY_CHANGED')
Stat:RegisterEvent('PLAYER_ENTERING_WORLD')
Stat:SetScript('OnMouseDown', function() ToggleCharacter('TokenFrame') end)
Stat:SetScript('OnEvent', OnEvent)
Stat:SetScript('OnEnter', function(self)
if not InCombatLockdown() then
local anchor, panel, xoff, yoff = DataTextTooltipAnchor(Text)
GameTooltip:SetOwner(panel, anchor, xoff, yoff)
GameTooltip:ClearLines()
GameTooltip:AddLine(L['Session: '])
GameTooltip:AddDoubleLine(L['Earned:'], formatMoney(Profit), 1, 1, 1, 1, 1, 1)
GameTooltip:AddDoubleLine(L['Spent:'], formatMoney(Spent), 1, 1, 1, 1, 1, 1)
if Profit < Spent then
GameTooltip:AddDoubleLine(L['Deficit:'], formatMoney(Profit-Spent), 1, 0, 0, 1, 1, 1)
elseif (Profit-Spent)>0 then
GameTooltip:AddDoubleLine(L['Profit:'], formatMoney(Profit-Spent), 0, 1, 0, 1, 1, 1)
end
GameTooltip:AddLine' '
local totalGold = 0
GameTooltip:AddLine(L['Character: '])
local thisRealmList = BasicUI.db.global.gold[myPlayerRealm];
for k,v in pairs(thisRealmList) do
GameTooltip:AddDoubleLine(k, FormatTooltipMoney(v), 1, 1, 1, 1, 1, 1)
totalGold=totalGold+v;
end
GameTooltip:AddLine' '
GameTooltip:AddLine( L['Server: '])
GameTooltip:AddDoubleLine(L['Total: '], FormatTooltipMoney(totalGold), 1, 1, 1, 1, 1, 1)
for i = 1, GetNumWatchedTokens() do
local name, count, extraCurrencyType, icon, itemID = GetBackpackCurrencyInfo(i)
if name and i == 1 then
GameTooltip:AddLine(' ')
GameTooltip:AddLine(CURRENCY)
end
local r, g, b = 1,1,1
if itemID then r, g, b = GetItemQualityColor(select(3, GetItemInfo(itemID))) end
if name and count then GameTooltip:AddDoubleLine(name, count, r, g, b, 1, 1, 1) end
end
GameTooltip:Show()
end
end)
Stat:SetScript('OnLeave', function() GameTooltip:Hide() end)
-- reset gold data
local function RESETGOLD()
local myPlayerRealm = GetCVar('realmName');
local myname = UnitName('player');
BasicUI.db.global.gold = {}
BasicUI.db.global.gold[myPlayerRealm]={}
BasicUI.db.global.gold[myPlayerRealm][myname] = GetMoney();
end
SLASH_RESETGOLD1 = '/resetgold'
SlashCmdList['RESETGOLD'] = RESETGOLD
end
local USE_EPGP = true
I have a datatext that should create and save gold per charater. it not saving to the SavedVariables of my addon. If someone could help me figure this out that would be great.
TOC:
## Interface: 40200
## Author: Cokedriver
## Version: 1.0
## Title: |cff00B4FFBasic|rUI
## Notes: A Basic UI Replacement for the World of Warcraft Interface.
## SavedVariables: BasicUI
## SavedVariablesPerCharacter: BasicUIPerCharacter
-- Gold
if db.datatext.gold and db.datatext.gold > 0 then
local Stat = CreateFrame('Frame')
Stat:EnableMouse(true)
Stat:SetFrameStrata('BACKGROUND')
Stat:SetFrameLevel(3)
local Text = PanelLeft:CreateFontString(nil, 'OVERLAY')
Text:SetFont(db.general.font, db.datatext.fontsize,'THINOUTLINE')
PP(db.datatext.gold, Text)
local Profit = 0
local Spent = 0
local OldMoney = 0
local myPlayerRealm = GetCVar('realmName');
local function formatMoney(money)
local gold = floor(math.abs(money) / 10000)
local silver = mod(floor(math.abs(money) / 100), 100)
local copper = mod(floor(math.abs(money)), 100)
if gold ~= 0 then
return format('%s'..L['|cffffd700g|r'], gold)
elseif silver ~= 0 then
return format('%s'..L['|cffc7c7cfs|r'], silver)
else
return format('%s'..L['|cffeda55fc|r'], copper)
end
end
local function FormatTooltipMoney(money)
local gold, silver, copper = abs(money / 10000), abs(mod(money / 100, 100)), abs(mod(money, 100))
local cash = ''
cash = format('%.2d'..L['|cffffd700g|r']..' %.2d'..L['|cffc7c7cfs|r']..' %.2d'..L['|cffeda55fc|r'], gold, silver, copper)
return cash
end
local function OnEvent(self, event)
if event == 'PLAYER_ENTERING_WORLD' then
OldMoney = GetMoney()
end
local NewMoney = GetMoney()
local Change = NewMoney-OldMoney -- Positive if we gain money
if OldMoney>NewMoney then -- Lost Money
Spent = Spent - Change
else -- Gained Moeny
Profit = Profit + Change
end
Text:SetText(hexa..'Cash: '..hexb..formatMoney(NewMoney))
-- Setup Money Tooltip
self:SetAllPoints(Text)
local myname = UnitName('player');
if (BasicUI == nil) then BasicUI = {}; end
if (BasicUI.gold == nil) then BasicUI.gold = {}; end
if (BasicUI.gold[myPlayerRealm]==nil) then BasicUI.gold[myPlayerRealm]={}; end
BasicUI.gold[myPlayerRealm][myname] = GetMoney();
OldMoney = NewMoney
end
Stat:RegisterEvent('PLAYER_MONEY')
Stat:RegisterEvent('SEND_MAIL_MONEY_CHANGED')
Stat:RegisterEvent('SEND_MAIL_COD_CHANGED')
Stat:RegisterEvent('PLAYER_TRADE_MONEY')
Stat:RegisterEvent('TRADE_MONEY_CHANGED')
Stat:RegisterEvent('PLAYER_ENTERING_WORLD')
Stat:SetScript('OnMouseDown', function() ToggleCharacter('TokenFrame') end)
Stat:SetScript('OnEvent', OnEvent)
Stat:SetScript('OnEnter', function(self)
if not InCombatLockdown() then
local anchor, panel, xoff, yoff = DataTextTooltipAnchor(Text)
GameTooltip:SetOwner(panel, anchor, xoff, yoff)
GameTooltip:ClearLines()
GameTooltip:AddLine(L['Session: '])
GameTooltip:AddDoubleLine(L['Earned:'], formatMoney(Profit), 1, 1, 1, 1, 1, 1)
GameTooltip:AddDoubleLine(L['Spent:'], formatMoney(Spent), 1, 1, 1, 1, 1, 1)
if Profit < Spent then
GameTooltip:AddDoubleLine(L['Deficit:'], formatMoney(Profit-Spent), 1, 0, 0, 1, 1, 1)
elseif (Profit-Spent)>0 then
GameTooltip:AddDoubleLine(L['Profit:'], formatMoney(Profit-Spent), 0, 1, 0, 1, 1, 1)
end
GameTooltip:AddLine' '
local totalGold = 0
GameTooltip:AddLine(L['Character: '])
local thisRealmList = BasicUI.gold[myPlayerRealm];
for k,v in pairs(thisRealmList) do
GameTooltip:AddDoubleLine(k, FormatTooltipMoney(v), 1, 1, 1, 1, 1, 1)
totalGold=totalGold+v;
end
GameTooltip:AddLine' '
GameTooltip:AddLine( L['Server: '])
GameTooltip:AddDoubleLine(L['Total: '], FormatTooltipMoney(totalGold), 1, 1, 1, 1, 1, 1)
for i = 1, GetNumWatchedTokens() do
local name, count, extraCurrencyType, icon, itemID = GetBackpackCurrencyInfo(i)
if name and i == 1 then
GameTooltip:AddLine(' ')
GameTooltip:AddLine(CURRENCY)
end
local r, g, b = 1,1,1
if itemID then r, g, b = GetItemQualityColor(select(3, GetItemInfo(itemID))) end
if name and count then GameTooltip:AddDoubleLine(name, count, r, g, b, 1, 1, 1) end
end
GameTooltip:Show()
end
end)
Stat:SetScript('OnLeave', function() GameTooltip:Hide() end)
-- reset gold data
local function RESETGOLD()
local myPlayerRealm = GetCVar('realmName');
local myname = UnitName('player');
BasicUI.gold = {}
BasicUI.gold[myPlayerRealm]={}
BasicUI.gold[myPlayerRealm][myname] = GetMoney();
end
SLASH_RESETGOLD1 = '/resetgold'
SlashCmdList['RESETGOLD'] = RESETGOLD
end
local USE_EPGP = true
Also the "Gold" code is inside the my datatext function.
function BasicUI:UpdateDatatext()
Again any help with this would be greatly appreciated.
Ok so i have got my optiosn to work FINALLY. But when i uncheck one of my enable toggle it does nto disable it. and some of the movers dont adjust while i move the slider.
here are my core and config files maybe i missed something or need to add something.
The ellipsis variable ... is passed by Blizzard to all lua files of an addon.
An ellipsis variable is a special kind of variable sometimes called a vararg as it can "contain" an indeterminate number of arguments,
that you can use select() to assign to individual variables.
At this moment the ellipsis variable passed to addons contains only 2 separate variables:
addonName
addonTable
The first one is just a string variable containing the name of your addon.
The second one is a "private" table that is available to all the addon files without needing to put it in _G, the game engine takes care of that.
So the code you posted is really nothing specific to Tukui.
You can use (or not) the contents of the vararg passed by Blizzard to each addon (hence your own as well) or not as you choose.
'engine' in the example code you posted is just a table name,
you can call it 'pinkflamingo' if you like, the main thing is it is a table shared among all your addon files.
i've tried creating a addon with a engine created by someone else and would like to know how i would go about creating my own engine, as to not steal anothers idea.
The engine im refuring to is the one nightcracker made for the Tukui addon.
----------------------------------------------------------------
-- initiation of tukui
----------------------------------------------------------------
-- including system
local addon, engine = ...
engine[1] = {} -- T, functions, constants, variables
engine[2] = {} -- C, config
engine[3] = {} -- L, localization
Tukui = engine -- Allow other addons to use Engine
---------------------------------------------------------------------------------
-- This should be at the top of every file inside of the Tukui AddOn:
-- local T, C, L = unpack(select(2, ...))
-- This is how another addon imports the Tukui engine:
-- local T, C, L = unpack(Tukui)
---------------------------------------------------------------------------------
This engine makes it possible to use constants like so T.<constant> and also alows you to grab your config changes like C['addon'].enable.
I was using this to get my addon to be able to work but am now looking at trying to use ace to do this. is there a simple way for ace to preform the same functions?
ive also seen poeple use:
local _, ns = ...
local config = ns.config
to grab there code from a config file.
ive been trying to get ace to understand the first type of engine but not going so good.
I still need to learn alot as far as functions and OnInitialize, and Onload and OnEnable/OnDisable, but to start you need to figure out how to get your info from one place to another.
I'm not aware of any configuration changes requiring a reloadui to apply unless we're talking about "removing" hooksecurefunc hooks or some very specific cases of playing with secure frames.
This looks more like a problem with how you've implemented your options than with Ace.
1. You set a variable (this is now in memory) and at the same time do whatever changes are supposed to happen in response.
2. If that variable is stored in saved variables it will persist to disk next time the user exits or logs out of the game.
Why do you need to /reloadui I don't understand.
Edit: What I mean is you can apply the changes in your
set = function(info, value)
-- apply changes to the addon from changing value
-- set value to my db for saving
end
I'm still new to this and trying to learn as i go. Alot of the lingo used i have to seach the net to find what it means. The Setfunction i am trying to use is as follows:
get = function(info) return db.powerbar.rune[ info[#info] ] end,
set = function(info, value) db.powerbar.rune[ info[#info] ] = value; end,
i think my biggest issue is trying use someone elses workings instead of trying to set things up myself.
I think its back to the drawing board to get this thing working right.
btw I created my main addon using the Tukui engine created by nightracker
----------------------------------
-- Engine to make all files communicate.
-- Credit Nightcracker
----------------------------------
-- including system
local addon, engine = ...
engine[1] = {} -- B, functions, constants
engine[2] = {} -- C, config
engine[3] = {} -- L, localization
engine[4] = {} -- DB, database, post config load
bdcUI = engine --Allow other addons to use Engine
--[[
This should be at the top of every file inside of the bdcUI AddOn:
local B, C, L, DB = unpack(select(2, ...))
This is how another addon imports the bdcUI engine:
local B, C, L, DB = unpack(bdcUI)
]]
With using this engine i setup a config file that all the "modules" in my addon use with "local B, C, L, DB = unpack(select(2, ...)) -- Import: B - function; C - config; L - locales; DB - Database". Now there has been only one person (that i know of) in the Tukui community that has made a GUI with Ace to run there UI. So i figured I would try there setup and was able to get it working with the changes i wanted to use instead of using the Default Tukui. I know its probably wrong and I'm learning now I should just start from scratch.
I will be back with more questions now that i'm going to give it a go.
First question on new setup is... With everything i want to add to the UI i have over 40 modules (most are for my datapanel) for different options. So the "Core" of the UI is going to be a 9,000 to 10,000 line file is that to much or does it matter?
I tried to ask over at wowinterface.com they said i should ask here so here goes.
Alot of my config options require a ReloadUI() right now its setup to pop up a staticpopup that will run ReloadUI() with ever config change.
What I'm looking for is a "APPLY" button in the lower right hand corner kinda like with the Blizzard Options screen where you can change things then hit the button and it will reload the UI.
Doesn't that create a new anonymous function every OnUpdate?
Why not just
Movebar:SetScript("OnUpdate", RaiseBars)
Furthermore why do you need to continuously move the bar?
That function is the only one i have found that when you enter a vehicle and exit it it puts the mainmenubar back to where it need to be. With the sliding effect blizzard uses when you enter a vehicle the vehiclebar without the OnUpdate function it covers my datapanel.
let me see if i can find the pics of what im talking about.
will post when i find them.
Edit: Ok here are some scrrenshots.
Without the OnUpdate function getting in a vehicle.
With OnUpdate enabled:
Without the OnUpdate function Exiting Vehicle:
(If you look at the gryphnos tail you can see the panel behind them)
Maybe there is a better way to do this. I know other data bars such as Titan and Chocolatebar and Bazooka do this ive tried looking at there coeds but still am way to noobish at this to figure it out.
Hello,
I currently have a method to move the Mainmenubar and Vehiclebar above my datatext panel but it seems to be a memory hog.
I was wondering if one of you fine programmers here could take a look at the code and maybe figure out what i did wrong or post a better code to move the bar up.
Here be DRAGONS:
local Movebar = CreateFrame("Frame")
local NeedsUpdate = false
local function RaiseBars(self)
-- Check if in combat lockdown, and set NeedsUpdate
if InCombatLockdown() then
NeedsUpdate = true
return
end
--Update bars
_G['MainMenuBar']:ClearAllPoints()
_G['MainMenuBar']:SetPoint('BOTTOM', DataBorderPanel, 0, 32)
_G['VehicleMenuBar']:ClearAllPoints()
_G['VehicleMenuBar']:SetPoint('BOTTOM', DataBorderPanel, 0, 40)
end
Movebar:SetScript("OnUpdate", function() RaiseBars(); end)
RaiseBars()
Copy and paste the following code into your editor and save it as core.lua to your Fonts folder, make sure you pick Lua source File (*lua) as the file type.
--[[
-- A list of all fonts
'GameFontNormal',
'GameFontHighlight',
'GameFontDisable',
'GameFontNormalSmall',
'GameFontHighlightExtraSmall',
'GameFontHighlightMedium',
'GameFontNormalLarge',
'GameFontNormalHuge',
'BossEmoteNormalHuge',
'NumberFontNormal',
'NumberFontNormalSmall',
'NumberFontNormalLarge',
'NumberFontNormalHuge',
'ChatFontNormal',
'ChatFontSmall',
'QuestTitleFont',
'QuestFont',
'QuestFontNormalSmall',
'QuestFontHighlight',
'ItemTextFontNormal',
'MailTextFontNormal',
'SubSpellFont',
'DialogButtonNormalText',
'ZoneTextFont',
'SubZoneTextFont',
'PVPInfoTextFont',
'ErrorFont',
'TextStatusBarText',
'CombatLogFont',
'GameTooltipText',
'GameTooltipTextSmall',
'GameTooltipHeaderText',
'WorldMapTextFont',
'InvoiceTextFontNormal',
'InvoiceTextFontSmall',
'CombatTextFont',
'MovieSubtitleFont',
'AchievementPointsFont',
'AchievementPointsFontSmall',
'AchievementDescriptionFont',
'AchievementCriteriaFont',
'AchievementDateFont',
'ReputationDetailFont',
--]]
for _, font in pairs({
GameFontHighlight,
GameFontDisable,
GameFontHighlightExtraSmall,
GameFontHighlightMedium,
GameFontNormal,
GameFontNormalSmall,
--TextStatusBarText,
GameFontDisableSmall,
GameFontHighlightSmall,
GameTooltipText,
}) do
font:SetFont('Fonts\\ARIALN.ttf', 14)
font:SetShadowOffset(2, -1)
end
TextStatusBarText:SetFont('Fonts\\ARIALN.ttf', 11, 'outline')
GameTooltipHeaderText:SetFont('Fonts\\ARIALN.ttf', 16)
for _, font in pairs({
AchievementPointsFont,
AchievementPointsFontSmall,
AchievementDescriptionFont,
AchievementCriteriaFont,
AchievementDateFont,
}) do
font:SetFont('Fonts\\ARIALN.ttf', 12)
end
GameFontNormalHuge:SetFont('Fonts\\ARIALN.ttf', 20, 'OUTLINE')
GameFontNormalHuge:SetShadowOffset(0, 0)
This should be most of the ingame fonts and as you can see you can adjust what fonts you want to change and how big you want them, also if you want you can change the font type by adding a new folder inside your Fonts addon folder named fonttype.
Then all you would have to do is instead of:
font:SetFont('Fonts\\ARIALN.ttf', 12)
You could do:
font:SetFont('Interface\\Fonts\\fonttype\\<your font name>', 12)
The 12 in the code is the accualty size of the font. for me with older eyes 13 - 15 are good sizes but then again just remember some of WoWs font areas are not big enough for huge fonts.
Once everything is saved transfer your Fonts addon folder to your Interface\Addons folder.
Now there is no in-game config for this to change your font size you will have to open up core.lua and manualy change the number.
0
I have put together a UI from other peoples creations (and yes i have asked each one for there permission to use and edit said addons). i can use the AddOn as is but it becomes a pain having to open the .lua edit it, save it, then reload WoW. My main goal is to make in-game options and be abel to have everything in a single file. Right now I have accompliched this with 2 Addons BasicUI and BasicUI_Config. The main issue with this is you have to do a /reload for any changes to to effect.
So for this project i change the UI name to cUI and would like some help figuring out how to get my UI to have the following:
I know there will be alot of people that say "Well i guess you should start reading on .lua coding." or "Stop being lazy, do the foot work and create it yourself.". I do understand the best way to learn how to do it is read up on it and learn. But for me to learn is to do and right now I'm stuck on the to do part, i have been trying for about 3 weeks to bring the config over to the main AddOn but nothing seems to work and if i do get it over there and showing when i change a option nothing happens.
So below is the main AddOn in working form (the cUI one), if needed i can also upload BasicUI if it is needed.
Thank you all for your time in reading this and thank you to anyone who decides to help out.
Coke
Zip of cUI: cUI.zip
0
Moves the bars to where i want them without having any errors or incombat issues.
Hope this helps someone else.
Coke
0
I had to create a global db for this to work.
core:
Then the code in the datatext gold had to read:
Hope this helps someone.
Coke
0
TOC:
SavedVariables:
Core Addon:
Also the "Gold" code is inside the my datatext function.
Again any help with this would be greatly appreciated.
Coke
0
here are my core and config files maybe i missed something or need to add something.
Thanks
Coke
0
ok, thank you for that info.
0
The engine im refuring to is the one nightcracker made for the Tukui addon.
This engine makes it possible to use constants like so T.<constant> and also alows you to grab your config changes like C['addon'].enable.
I was using this to get my addon to be able to work but am now looking at trying to use ace to do this. is there a simple way for ace to preform the same functions?
ive also seen poeple use:
to grab there code from a config file.
ive been trying to get ace to understand the first type of engine but not going so good.
I still need to learn alot as far as functions and OnInitialize, and Onload and OnEnable/OnDisable, but to start you need to figure out how to get your info from one place to another.
Thanks
Coke
0
Thanks to everyone that helped.
0
it creates a "Apply" button on the video options frame and is disabled untill a option changes then then reloads the UI once its applied.
Thanks
Coke
Edit:
Ok i figured out how make my APPLY button but i would like it to be outside the scrolling window of my options so its visable all the time.
here is the codeim using:
0
I'm still new to this and trying to learn as i go. Alot of the lingo used i have to seach the net to find what it means. The Setfunction i am trying to use is as follows:
The default file is as follows:
i think my biggest issue is trying use someone elses workings instead of trying to set things up myself.
I think its back to the drawing board to get this thing working right.
btw I created my main addon using the Tukui engine created by nightracker
With using this engine i setup a config file that all the "modules" in my addon use with "local B, C, L, DB = unpack(select(2, ...)) -- Import: B - function; C - config; L - locales; DB - Database". Now there has been only one person (that i know of) in the Tukui community that has made a GUI with Ace to run there UI. So i figured I would try there setup and was able to get it working with the changes i wanted to use instead of using the Default Tukui. I know its probably wrong and I'm learning now I should just start from scratch.
I will be back with more questions now that i'm going to give it a go.
First question on new setup is... With everything i want to add to the UI i have over 40 modules (most are for my datapanel) for different options. So the "Core" of the UI is going to be a 9,000 to 10,000 line file is that to much or does it matter?
0
Alot of my config options require a ReloadUI() right now its setup to pop up a staticpopup that will run ReloadUI() with ever config change.
What I'm looking for is a "APPLY" button in the lower right hand corner kinda like with the Blizzard Options screen where you can change things then hit the button and it will reload the UI.
Any suggestions?
Thanks
Coke
0
That function is the only one i have found that when you enter a vehicle and exit it it puts the mainmenubar back to where it need to be. With the sliding effect blizzard uses when you enter a vehicle the vehiclebar without the OnUpdate function it covers my datapanel.
let me see if i can find the pics of what im talking about.
will post when i find them.
Edit: Ok here are some scrrenshots.
Without the OnUpdate function getting in a vehicle.
With OnUpdate enabled:
Without the OnUpdate function Exiting Vehicle:
(If you look at the gryphnos tail you can see the panel behind them)
With OnUpdate function exiting Vehicle:
Uploaded with ImageShack.us
Maybe there is a better way to do this. I know other data bars such as Titan and Chocolatebar and Bazooka do this ive tried looking at there coeds but still am way to noobish at this to figure it out.
Hope this brings more light to what im saying.
Coke
0
I currently have a method to move the Mainmenubar and Vehiclebar above my datatext panel but it seems to be a memory hog.
I was wondering if one of you fine programmers here could take a look at the code and maybe figure out what i did wrong or post a better code to move the bar up.
Here be DRAGONS:
0
First get a editor i like to use Notepad++. Once you have your editor installed create the following:
First create a folder named: Fonts
Next will be the addons TOC file.
Copy and paste the below code into your editor and save it as font.toc to your Fonts folder.
Now create the core of the addon.
Copy and paste the following code into your editor and save it as core.lua to your Fonts folder, make sure you pick Lua source File (*lua) as the file type.
This should be most of the ingame fonts and as you can see you can adjust what fonts you want to change and how big you want them, also if you want you can change the font type by adding a new folder inside your Fonts addon folder named fonttype.
Then all you would have to do is instead of:
You could do:
The 12 in the code is the accualty size of the font. for me with older eyes 13 - 15 are good sizes but then again just remember some of WoWs font areas are not big enough for huge fonts.
Once everything is saved transfer your Fonts addon folder to your Interface\Addons folder.
Now there is no in-game config for this to change your font size you will have to open up core.lua and manualy change the number.
Hope this helps you out.
Coke
0
thank you for this