Skip to content

Commit 71190bd

Browse files
committed
control panel overhaul
1 parent ab19b4e commit 71190bd

File tree

7 files changed

+163
-278
lines changed

7 files changed

+163
-278
lines changed

Data/News.lua

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ function CraftSim.NEWS:GET_NEWS(itemMap)
1818
f.bb(" Hello and thank you for using CraftSim!\n"),
1919
f.bb(" ( You are awesome! )"),
2020
newP("19.4.0"),
21+
f.P .. "Overhauled the " .. f.bb("Control Panel"),
22+
f.a .. "- All of its functionality is now accessible by",
23+
f.a .. " a " .. f.bb("new button") .. " on the TOP LEFT of the Crafting UI",
2124
f.P .. f.bb("Queue Patron Orders") .. " is now " .. f.g("Queue Work Orders"),
2225
f.a .. "- Type of order can now be switched (Default: Patron Orders)",
2326
f.P .. "Moved more options to the new option button context menus",

Media/Images/craftsim.blp

-5.33 MB
Binary file not shown.

Media/Images/craftsim.tga

736 KB
Binary file not shown.

Modules/ControlPanel/ControlPanel.lua

+16-26
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ function CraftSim.CONTROL_PANEL:ForgeFinderExportAll()
8080
local jb = CraftSim.JSONBuilder()
8181
jb.json = jb.json .. "[\n"
8282
for index, recipeData in pairs(data) do
83-
print("skill: " .. tostring(recipeData.professionStats.skill.value))
8483
local recipeJson = recipeData:GetForgeFinderExport(1)
8584
if index == #data then
8685
jb.json = jb.json .. recipeJson
@@ -110,24 +109,24 @@ function CraftSim.CONTROL_PANEL:ForgeFinderExportAll()
110109
end
111110
currentIndex = currentIndex + 1
112111

113-
-- update button
114-
local currentPercent = GUTIL:Round(currentIndex / (numRecipes / 100))
112+
-- -- update button
113+
-- local currentPercent = GUTIL:Round(currentIndex / (numRecipes / 100))
115114

116-
CraftSim.CONTROL_PANEL.frame.content.exportForgeFinderButton:SetText(CraftSim.LOCAL:GetText(CraftSim
117-
.CONST.TEXT.CONTROL_PANEL_FORGEFINDER_EXPORTING) .. " " .. currentPercent .. "%")
115+
-- CraftSim.CONTROL_PANEL.frame.content.exportForgeFinderButton:SetText(CraftSim.LOCAL:GetText(CraftSim
116+
-- .CONST.TEXT.CONTROL_PANEL_FORGEFINDER_EXPORTING) .. " " .. currentPercent .. "%")
118117
RunNextFrame(mapRecipe)
119118
else
120119
-- if finished
121120
finishExport()
122-
CraftSim.CONTROL_PANEL.frame.content.exportForgeFinderButton:SetStatus("READY")
121+
-- CraftSim.CONTROL_PANEL.frame.content.exportForgeFinderButton:SetStatus("READY")
123122
CraftSim.DEBUG:StopProfiling("FORGEFINDER_EXPORT")
124123
end
125124
end
126125

127126
CraftSim.DEBUG:StartProfiling("FORGEFINDER_EXPORT")
128-
CraftSim.CONTROL_PANEL.frame.content.exportForgeFinderButton:SetText(CraftSim.LOCAL:GetText(CraftSim.CONST.TEXT
129-
.CONTROL_PANEL_FORGEFINDER_EXPORTING) .. " 0%")
130-
CraftSim.CONTROL_PANEL.frame.content.exportForgeFinderButton:SetEnabled(false)
127+
-- CraftSim.CONTROL_PANEL.frame.content.exportForgeFinderButton:SetText(CraftSim.LOCAL:GetText(CraftSim.CONST.TEXT
128+
-- .CONTROL_PANEL_FORGEFINDER_EXPORTING) .. " 0%")
129+
-- CraftSim.CONTROL_PANEL.frame.content.exportForgeFinderButton:SetEnabled(false)
131130
mapRecipe()
132131
end
133132
end
@@ -174,14 +173,6 @@ function CraftSim.CONTROL_PANEL:EasycraftExportAll()
174173
return false
175174
end
176175

177-
-- -- keeping this for later usage
178-
-- -- finally check if its a dragon isle recipe
179-
180-
-- local isDragonIsleRecipe = CraftSim.UTIL:IsDragonflightRecipe(recipeInfo.recipeID)
181-
-- if not isDragonIsleRecipe then
182-
-- return false
183-
-- end
184-
185176
-- finally check if its a The War Within recipe
186177

187178
local isTWWRecipe = CraftSim.UTIL:IsTWWRecipe(recipeInfo.recipeID)
@@ -244,24 +235,24 @@ function CraftSim.CONTROL_PANEL:EasycraftExportAll()
244235
end
245236
currentIndex = currentIndex + 1
246237

247-
-- update button
248-
local currentPercent = GUTIL:Round(currentIndex / (numRecipes / 100))
238+
-- -- update button
239+
-- local currentPercent = GUTIL:Round(currentIndex / (numRecipes / 100))
249240

250-
CraftSim.CONTROL_PANEL.frame.content.exportEasycraftButton:SetText(CraftSim.LOCAL:GetText(CraftSim
251-
.CONST.TEXT.CONTROL_PANEL_EASYCRAFT_EXPORTING) .. " " .. currentPercent .. "%")
241+
-- CraftSim.CONTROL_PANEL.frame.content.exportEasycraftButton:SetText(CraftSim.LOCAL:GetText(CraftSim
242+
-- .CONST.TEXT.CONTROL_PANEL_EASYCRAFT_EXPORTING) .. " " .. currentPercent .. "%")
252243
RunNextFrame(mapRecipe)
253244
else
254245
-- if finished
255246
finishExport()
256-
CraftSim.CONTROL_PANEL.frame.content.exportEasycraftButton:SetStatus("READY")
247+
-- CraftSim.CONTROL_PANEL.frame.content.exportEasycraftButton:SetStatus("READY")
257248
CraftSim.DEBUG:StopProfiling("EASYCRAFT_EXPORT")
258249
end
259250
end
260251

261252
CraftSim.DEBUG:StartProfiling("EASYCRAFT_EXPORT")
262-
CraftSim.CONTROL_PANEL.frame.content.exportEasycraftButton:SetText(CraftSim.LOCAL:GetText(CraftSim.CONST.TEXT
263-
.CONTROL_PANEL_EASYCRAFT_EXPORTING) .. " 0%")
264-
CraftSim.CONTROL_PANEL.frame.content.exportEasycraftButton:SetEnabled(false)
253+
-- CraftSim.CONTROL_PANEL.frame.content.exportEasycraftButton:SetText(CraftSim.LOCAL:GetText(CraftSim.CONST.TEXT
254+
-- .CONTROL_PANEL_EASYCRAFT_EXPORTING) .. " 0%")
255+
-- CraftSim.CONTROL_PANEL.frame.content.exportEasycraftButton:SetEnabled(false)
265256
mapRecipe()
266257
end
267258
end
@@ -270,6 +261,5 @@ end
270261
function CraftSim.CONTROL_PANEL:HandleModuleClose(moduleOption)
271262
return function()
272263
CraftSim.DB.OPTIONS:Save(moduleOption, false)
273-
CraftSim.CONTROL_PANEL.frame.content[moduleOption]:SetChecked(false)
274264
end
275265
end

0 commit comments

Comments
 (0)