mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-20 14:43:27 +02:00
Updated to OTCv8 3.1 rev 200
This commit is contained in:
@@ -262,13 +262,15 @@ function create(currentOutfit, outfitList, mountList, wingList, auraList, shader
|
||||
|
||||
updateAppearanceTexts(currentOutfit)
|
||||
|
||||
local isMount = g_game.getLocalPlayer():isMounted()
|
||||
if isMount then
|
||||
window.configure.mount.check:setEnabled(true)
|
||||
window.configure.mount.check:setChecked(true)
|
||||
else
|
||||
window.configure.mount.check:setEnabled(currentOutfit.mount > 0)
|
||||
window.configure.mount.check:setChecked(isMount and currentOutfit.mount > 0)
|
||||
if g_game.getFeature(GamePlayerMounts) then
|
||||
local isMount = g_game.getLocalPlayer():isMounted()
|
||||
if isMount then
|
||||
window.configure.mount.check:setEnabled(true)
|
||||
window.configure.mount.check:setChecked(true)
|
||||
else
|
||||
window.configure.mount.check:setEnabled(currentOutfit.mount > 0)
|
||||
window.configure.mount.check:setChecked(isMount and currentOutfit.mount > 0)
|
||||
end
|
||||
end
|
||||
|
||||
if currentOutfit.addons == 3 then
|
||||
@@ -372,6 +374,8 @@ function create(currentOutfit, outfitList, mountList, wingList, auraList, shader
|
||||
window.appearance.settings.manaBar:setVisible(g_game.getFeature(GameHealthInfoBackground))
|
||||
|
||||
window.configure.mount:setVisible(g_game.getFeature(GamePlayerMounts))
|
||||
|
||||
window.listSearch.search.onKeyPress = onFilterSearch
|
||||
end
|
||||
|
||||
function destroy()
|
||||
@@ -917,7 +921,9 @@ function onPresetSelect(list, focusedChild, unfocusedChild, reason)
|
||||
end
|
||||
end
|
||||
|
||||
window.configure.mount.check:setChecked(preset.mounted and tempOutfit.mount > 0)
|
||||
if g_game.getFeature(GamePlayerMounts) then
|
||||
window.configure.mount.check:setChecked(preset.mounted and tempOutfit.mount > 0)
|
||||
end
|
||||
|
||||
settings.currentPreset = presetId
|
||||
|
||||
@@ -1144,7 +1150,7 @@ function updatePreview()
|
||||
previewOutfit.manaBar = 0
|
||||
window.preview.panel.bars:hide()
|
||||
else
|
||||
if settings.showMount and previewOutfit.mount > 0 then
|
||||
if g_game.getFeature(GamePlayerMounts) and settings.showMount and previewOutfit.mount > 0 then
|
||||
window.preview.panel.bars:setMarginTop(45)
|
||||
window.preview.panel.bars:setMarginLeft(25)
|
||||
else
|
||||
@@ -1224,6 +1230,29 @@ function rotate(value)
|
||||
floor:setMargin(0)
|
||||
end
|
||||
|
||||
function onFilterSearch()
|
||||
addEvent(
|
||||
function()
|
||||
local searchText = window.listSearch.search:getText():lower():trim()
|
||||
local children = window.selectionList:getChildren()
|
||||
if searchText:len() >= 1 then
|
||||
for _, child in ipairs(children) do
|
||||
local text = child.name:getText():lower()
|
||||
if text:find(searchText) then
|
||||
child:show()
|
||||
else
|
||||
child:hide()
|
||||
end
|
||||
end
|
||||
else
|
||||
for _, child in ipairs(children) do
|
||||
child:show()
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function saveSettings()
|
||||
if not g_resources.fileExists(settingsFile) then
|
||||
g_resources.makeDir("/settings")
|
||||
|
Reference in New Issue
Block a user