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

Commit

Permalink
Merge pull request #34 from DarthGandalf/revert-33-revert-32-tabs
Browse files Browse the repository at this point in the history
Revert "Revert "fix tabs strings, load buttons again""
  • Loading branch information
essial authored Oct 8, 2022
2 parents 716698d + 4e7266c commit 60455f9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bootstrap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ local function loadGameData()
return result
end

abyss.addLoaderProvider("filesystem", "./DATA/FS-fallback")
casc = loadBaseCASC()
mpq = loadBaseMPQs()
abyss.addLoaderProvider("filesystem", "./DATA/FS-fallback")

local resultData = { missing = {}, errored = {}}
for _,obj in ipairs(casc.data.missing) do table.insert(resultData.missing, obj) end
Expand Down
17 changes: 9 additions & 8 deletions common/layout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,6 @@ local TYPES = {
end,

ButtonWidget = function(layout, hd, palette)
if layout.fields.filename == 'PANEL\\buysellbtn' or layout.fields.filename == 'FrontEnd\\XLMediumButtonBlank' then
-- TODO this file throws an exception in dc6 parsing now
return abyss.createNode()
end
local image = abyss.loadImage(imageFilename(layout.fields.filename, hd), palette)
local button = abyss.createButton(image)
button.data.image = image
Expand Down Expand Up @@ -687,11 +683,16 @@ local TYPES = {
tab.currentFrameIndex = layout.fields.inactiveFrames[i]
end
if layout.fields.textStrings ~= nil then
-- TODO verify font
local label = abyss.createLabel(SystemFonts.FntFormal12)
label.caption = layout.fields.textStrings[i]
label:setAlignment('middle', 'end')
-- TODO hd uses different font
local label = abyss.createLabel(SystemFonts.Fnt16)
label.caption = Language:translate(layout.fields.textStrings[i])
label:setAlignment('middle', 'middle')
label:setPosition(math.floor(layout.fields.tabSize.x/2), math.floor(layout.fields.tabSize.y/2))
if i == activeTab then
label:setColorMod(199, 179, 119)
else
label:setColorMod(255, 255, 255)
end
tab.data.label = label
tab:appendChild(label)
end
Expand Down

0 comments on commit 60455f9

Please sign in to comment.