mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 04:53:27 +02:00
Background label hide function, Skins fix and combobox hide, messagebox changes, show entergame when reload
This commit is contained in:
@@ -89,24 +89,22 @@ function Skins.setSkin(name)
|
||||
g_fonts.clearFonts()
|
||||
g_ui.clearStyles()
|
||||
|
||||
if name ~= defaultSkinName then
|
||||
local defaultSkin = installedSkins[defaultSkinName]
|
||||
if not defaultSkin then
|
||||
error("Default skin is not installed.")
|
||||
return false
|
||||
end
|
||||
|
||||
Skins.loadSkin(defaultSkin)
|
||||
end
|
||||
|
||||
if currentSkin and currentSkin.name ~= defaultSkinName then
|
||||
g_resources.removeSearchPath(getSkinPath(currentSkin.name))
|
||||
end
|
||||
|
||||
if skin.name ~= defaultSkinName then
|
||||
g_resources.addSearchPath(getSkinPath(skin.name), true)
|
||||
Skins.loadSkin(skin)
|
||||
end
|
||||
|
||||
Skins.loadSkin(skin)
|
||||
local defaultSkin = installedSkins[defaultSkinName]
|
||||
if not defaultSkin then
|
||||
error("Default skin is not installed.")
|
||||
return false
|
||||
end
|
||||
Skins.loadSkin(defaultSkin)
|
||||
|
||||
currentSkin = skin
|
||||
return true
|
||||
end
|
||||
@@ -136,3 +134,12 @@ function Skins.loadSkin(skin)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Skins.hideComboBox()
|
||||
if not skinComboBox then
|
||||
addEvent(Skins.hideComboBox)
|
||||
else
|
||||
skinComboBox:hide()
|
||||
skinComboBox:setWidth(0)
|
||||
end
|
||||
end
|
||||
|
@@ -1,11 +1,3 @@
|
||||
MessageBoxWindow < MainWindow
|
||||
id: messageBoxWindow
|
||||
anchors.centerIn: parent
|
||||
height: 60
|
||||
width: 80
|
||||
padding-bottom: 10
|
||||
padding-right: 10
|
||||
|
||||
MessageBoxLabel < Label
|
||||
id: messageBoxLabel
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
Reference in New Issue
Block a user