Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Commit 60455f9

Browse files
authored
Merge pull request #34 from DarthGandalf/revert-33-revert-32-tabs
Revert "Revert "fix tabs strings, load buttons again""
2 parents 716698d + 4e7266c commit 60455f9

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

bootstrap.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ local function loadGameData()
9797
return result
9898
end
9999

100-
abyss.addLoaderProvider("filesystem", "./DATA/FS-fallback")
101100
casc = loadBaseCASC()
102101
mpq = loadBaseMPQs()
102+
abyss.addLoaderProvider("filesystem", "./DATA/FS-fallback")
103103

104104
local resultData = { missing = {}, errored = {}}
105105
for _,obj in ipairs(casc.data.missing) do table.insert(resultData.missing, obj) end

common/layout.lua

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,6 @@ local TYPES = {
328328
end,
329329

330330
ButtonWidget = function(layout, hd, palette)
331-
if layout.fields.filename == 'PANEL\\buysellbtn' or layout.fields.filename == 'FrontEnd\\XLMediumButtonBlank' then
332-
-- TODO this file throws an exception in dc6 parsing now
333-
return abyss.createNode()
334-
end
335331
local image = abyss.loadImage(imageFilename(layout.fields.filename, hd), palette)
336332
local button = abyss.createButton(image)
337333
button.data.image = image
@@ -687,11 +683,16 @@ local TYPES = {
687683
tab.currentFrameIndex = layout.fields.inactiveFrames[i]
688684
end
689685
if layout.fields.textStrings ~= nil then
690-
-- TODO verify font
691-
local label = abyss.createLabel(SystemFonts.FntFormal12)
692-
label.caption = layout.fields.textStrings[i]
693-
label:setAlignment('middle', 'end')
686+
-- TODO hd uses different font
687+
local label = abyss.createLabel(SystemFonts.Fnt16)
688+
label.caption = Language:translate(layout.fields.textStrings[i])
689+
label:setAlignment('middle', 'middle')
694690
label:setPosition(math.floor(layout.fields.tabSize.x/2), math.floor(layout.fields.tabSize.y/2))
691+
if i == activeTab then
692+
label:setColorMod(199, 179, 119)
693+
else
694+
label:setColorMod(255, 255, 255)
695+
end
695696
tab.data.label = label
696697
tab:appendChild(label)
697698
end

0 commit comments

Comments
 (0)