Remove game version selector from config tab

This commit is contained in:
ppoelzl
2020-10-30 12:14:01 +01:00
parent 5b197ea7e8
commit ce6cb33db8
2 changed files with 0 additions and 43 deletions

View File

@@ -9,16 +9,6 @@ local m_max = math.max
local m_floor = math.floor
local s_upper = string.upper
local gameVersionDropList = { }
for _, version in ipairs(targetVersionList) do
local data = targetVersions[version]
t_insert( gameVersionDropList, {
label = data.long,
version = version,
versionPretty = data.short,
})
end
local varList = LoadModule("Modules/ConfigOptions")
local ConfigTabClass = newClass("ConfigTab", "UndoHandler", "ControlHost", "Control", function(self, build)
@@ -227,27 +217,6 @@ local ConfigTabClass = newClass("ConfigTab", "UndoHandler", "ControlHost", "Cont
t_insert(lastSection.varControlList, control)
end
end
-- Special control for game version selector
self.controls.gameVersion = new("DropDownControl", {"TOPLEFT",self.sectionList[1],"TOPLEFT"}, 234, 0, 118, 16, gameVersionDropList, function(index, value)
if value.version ~= build.targetVersion then
main:OpenConfirmPopup("Convert Build", colorCodes.WARNING.."Warning:^7 Converting a build to a different game version may have side effects.\nFor example, if the passive tree has changed, then some passives may be deallocated.\nYou should create a backup copy of the build before proceeding.", "Convert to "..value.versionPretty, function()
if build.unsaved then
build:OpenSavePopup("VERSION", value.version)
else
if build.dbFileName then
build.targetVersion = value.version
build:SaveDBFile()
end
build:Shutdown()
build:Init(build.dbFileName, build.buildName, nil, value.version)
end
end)
end
end)
t_insert(self.controls, new("LabelControl", {"RIGHT",self.controls.gameVersion,"LEFT"}, -4, 0, 0, 14, "^7Game Version:"))
t_insert(self.sectionList[1].varControlList, 1, self.controls.gameVersion)
self.controls.scrollBar = new("ScrollBarControl", {"TOPRIGHT",self,"TOPRIGHT"}, 0, 0, 18, 0, 50, "VERTICAL", true)
end)
@@ -314,11 +283,6 @@ function ConfigTabClass:Draw(viewPort, inputEvents)
self.width = viewPort.width
self.height = viewPort.height
if not main.popups[1] then
-- >_>
self.controls.gameVersion:SelByValue(self.build.targetVersion, "version")
end
for id, event in ipairs(inputEvents) do
if event.type == "KeyDown" then
if event.key == "z" and IsKeyDown("CTRL") then

View File

@@ -929,7 +929,6 @@ function buildMode:OpenSavePopup(mode, newVersion)
["LIST"] = "now?",
["EXIT"] = "before exiting?",
["UPDATE"] = "before updating?",
["VERSION"] = "before converting?",
}
local controls = { }
controls.label = new("LabelControl", nil, 0, 20, 0, 16, "^7This build has unsaved changes.\nDo you want to save them "..modeDesc[mode])
@@ -947,9 +946,6 @@ function buildMode:OpenSavePopup(mode, newVersion)
Exit()
elseif mode == "UPDATE" then
launch:ApplyUpdate(launch.updateAvailable)
elseif mode == "VERSION" then
self:Shutdown()
self:Init(self.dbFileName, self.buildName, nil, newVersion)
end
end)
controls.close = new("ButtonControl", nil, 90, 70, 80, 20, "Cancel", function()
@@ -1358,9 +1354,6 @@ function buildMode:SaveDBFile()
Exit()
elseif action == "UPDATE" then
launch:ApplyUpdate(launch.updateAvailable)
elseif action == "VERSION" then
self:Shutdown()
self:Init(self.dbFileName, self.buildName)
end
end