Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions LuaMenu/configs/gameConfig/zk/ModOptions.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

-- $Id: ModOptions.lua 4642 2009-05-22 05:32:36Z carrepairer $


Expand Down Expand Up @@ -83,7 +82,7 @@ local options = {
{ key='none', name = "Off", desc = 'Turns commsharing off.' },
},
},

{
key = "noelo",
name = "No Elo",
Expand Down Expand Up @@ -539,7 +538,6 @@ local options = {
-- -- }
-- },
-- },

{
key = 'chicken',
name = 'Chicken',
Expand Down
2 changes: 2 additions & 0 deletions LuaMenu/configs/gameConfig/zk/mainConfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ local externalFuncAndData = {
"sounds/lobbyMusic/Interstellar.ogg",
"sounds/lobbyMusic/Tomorrow Landscape.ogg",
},
-- I assume ZK doesn't want to show this as it was removed
hideGameExistanceDisplay = true,
}

function externalFuncAndData.CheckAvailability()
Expand Down
105 changes: 51 additions & 54 deletions LuaMenu/widgets/chobby/components/battle/battle_list_window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ local IMG_UNREADY = LUA_DIRNAME .. "images/unready.png"
function BattleListWindow:init(parent)
self:super("init", parent, "Play or watch a game", true, nil, nil, nil, 34)

if not Configuration.gameConfig.disableBattleListHostButton then
self.btnNewBattle = Button:New {
x = 260,
y = 7,
width = 150,
height = 45,
caption = i18n("open_mp_game"),
font = Configuration:GetFont(3),
classname = "option_button",
parent = self.window,
OnClick = {
function ()
self:OpenHostWindow()
end
},
}
end
if not Configuration.gameConfig.disableBattleListHostButton then
self.btnNewBattle = Button:New {
x = 260,
y = 7,
width = 150,
height = 45,
caption = i18n("open_mp_game"),
font = Configuration:GetFont(3),
classname = "option_button",
parent = self.window,
OnClick = {
function ()
self:OpenHostWindow()
end
},
}
end

local function SoftUpdate()
self:UpdateFilters()
Expand Down Expand Up @@ -511,24 +511,17 @@ function BattleListWindow:MakeJoinBattle(battleID, battle)
}
end

--local imHaveGame = Image:New {
-- name = "imHaveGame",
-- x = height + 50,
-- width = 15,
-- height = 15,
-- y = 20,
-- height = 15,
-- file = (VFS.HasArchive(battle.gameName) and IMG_READY or IMG_UNREADY),
-- parent = parentButton,
--}
local modeName = battle.battleMode and Configuration.battleTypeToHumanName[battle.battleMode]
if battle.isRunning then
if modeName then
modeName = modeName .. " - "
else
modeName = ""
end
modeName = modeName .. "Running for " .. Spring.Utilities.GetTimeToPast(battle.runningSince)
if not Configuration.gameConfig.hideGameExistanceDisplay then
local imHaveGame = Image:New {
name = "imHaveGame",
x = height + 50,
width = 15,
height = 15,
y = 20,
height = 15,
file = (VFS.HasArchive(battle.gameName) and IMG_READY or IMG_UNREADY),
parent = parentButton,
}
end

local lblGame = Label:New {
Expand All @@ -538,7 +531,7 @@ function BattleListWindow:MakeJoinBattle(battleID, battle)
y = 20,
height = 15,
valign = 'center',
caption = modeName, --battle.gameName:sub(1, 22),
caption = self:_MakeGameCaption(battle),
font = Configuration:GetFont(1),
parent = parentButton,
}
Expand Down Expand Up @@ -656,12 +649,14 @@ function BattleListWindow:UpdateSync(battleID)
end

local imHaveMap = items.battleButton:GetChildByName("imHaveMap")
--local imHaveGame = items.battleButton:GetChildByName("imHaveGame")

if imHaveMap then
--imHaveGame.file = (VFS.HasArchive(battle.gameName) and IMG_READY or IMG_UNREADY)
if imHaveMap ~= nil then
imHaveMap.file = (VFS.HasArchive(battle.mapName) and IMG_READY or IMG_UNREADY)
end

local imHaveGame = items.battleButton:GetChildByName("imHaveGame")
if imHaveGame ~= nil then
imHaveGame.file = (VFS.HasArchive(battle.gameName) and IMG_READY or IMG_UNREADY)
end
end

function BattleListWindow:UpdateTimers()
Expand All @@ -685,6 +680,17 @@ function BattleListWindow:UpdateTimers()
end
end

function BattleListWindow:_MakeGameCaption(battle)
local gameCaption = battle.battleMode and Configuration.battleTypeToHumanName[battle.battleMode]
if gameCaption == nil then
gameCaption = battle.gameName -- :sub(1, 22)
end
if battle.isRunning then
gameCaption = gameCaption .. " - Running for " .. Spring.Utilities.GetTimeToPast(battle.runningSince)
end
return gameCaption
end

function BattleListWindow:JoinedBattle(battleID)
local battle = lobby:GetBattle(battleID)
if not (Configuration.displayBadEngines2 or Configuration:IsValidEngineVersion(battle.engineVersion)) then
Expand Down Expand Up @@ -781,22 +787,13 @@ function BattleListWindow:OnUpdateBattleInfo(battleID)
imHaveMap:Invalidate()


--local imHaveGame = items.battleButton:GetChildByName("imHaveGame")
--imHaveGame.file = (VFS.HasArchive(battle.gameName) and IMG_READY or IMG_UNREADY)
--gameCaption:SetCaption(battle.gameName:gsub("_", " "))
local imHaveGame = items.battleButton:GetChildByName("imHaveGame")
if imHaveGame ~= nil then
imHaveGame.file = (VFS.HasArchive(battle.gameName) and IMG_READY or IMG_UNREADY)
end

local gameCaption = items.battleButton:GetChildByName("gameCaption")
local modeName = battle.battleMode and Configuration.battleTypeToHumanName[battle.battleMode]
if battle.isRunning then
if modeName then
modeName = modeName .. " - "
else
modeName = ""
end
gameCaption:SetCaption(modeName .. "Running for " .. Spring.Utilities.GetTimeToPast(battle.runningSince))
else
gameCaption:SetCaption(modeName)
end
gameCaption:SetCaption(self:_MakeGameCaption(battle))

local playersCaption = items.battleButton:GetChildByName("playersCaption")
playersCaption:SetCaption(lobby:GetBattlePlayerCount(battleID) .. "/" .. battle.maxPlayers)
Expand Down
2 changes: 1 addition & 1 deletion LuaMenu/widgets/gui_campaign_handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ local function SelectPlanet(popupOverlay, planetHandler, planetID, planetData, s
fluffGrid:SetVisibility(true)
end
planetDesc:UpdateClientArea(false)

if planetHandler.height < 600 then
subPanel._relativeBounds.right = 390
subPanel._relativeBounds.bottom = "2%"
Expand Down
4 changes: 2 additions & 2 deletions LuaMenu/widgets/gui_steam_coop_handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,15 @@ local function CheckDownloads(gameName, mapName, DoneFunc, gameList)
DownloadUpdateFunction = nil
end
DownloadUpdateFunction = Update

local dlString = "Waiting on content: "
downloading = {
downloads = {
},
progress = {
},
}

if gameList then
for i = 1, #gameList do
if not WG.Package.ArchiveExists(gameList[i]) then
Expand Down
16 changes: 8 additions & 8 deletions libs/chiliui/luamenu/chili/chili/controls/font.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--// =============================================================================
--// =============================================================================

--- Font module

Expand Down Expand Up @@ -31,7 +31,7 @@ Font = Object:Inherit{
local this = Font
local inherited = this.inherited

--// =============================================================================
--// =============================================================================

function Font:New(obj)
obj = inherited.New(self, obj)
Expand All @@ -50,7 +50,7 @@ function Font:Dispose(...)
inherited.Dispose(self, ...)
end

--// =============================================================================
--// =============================================================================

function Font:_LoadFont()
local oldfont = self._font
Expand All @@ -60,7 +60,7 @@ function Font:_LoadFont()
FontHandler.UnloadFont(oldfont)
end

--// =============================================================================
--// =============================================================================

local function NotEqual(v1, v2)
local t1 = type(v1)
Expand Down Expand Up @@ -143,7 +143,7 @@ do
params = nil
end

--// =============================================================================
--// =============================================================================

function Font:GetLineHeight(size)
return self._font.lineheight * (size or self.size)
Expand Down Expand Up @@ -176,7 +176,7 @@ function Font:WrapText(text, width, height, size)
return (self._font):WrapText(text, width, height, size)
end

--// =============================================================================
--// =============================================================================

function Font:AdjustPosToAlignment(x, y, width, height, align, valign)
local extra = ''
Expand Down Expand Up @@ -248,7 +248,7 @@ local function _GetExtra(align, valign)
return extra
end

--// =============================================================================
--// =============================================================================

function Font:_DrawText(text, x, y, extra)
local font = self._font
Expand Down Expand Up @@ -307,4 +307,4 @@ end
Font.Print = Font.Draw
Font.PrintInBox = Font.DrawInBox

--// =============================================================================
--// =============================================================================
1 change: 0 additions & 1 deletion modinfo.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-- Chobby - an in-game lobby project
-- Authors: gajop

local modinfo = {
name = "Chobby",
Expand Down