2
0
mirror of https://github.com/OTCv8/otclientv8.git synced 2025-05-08 23:09:21 +02:00

Updated to OTCv8 3.1 rev 200

This commit is contained in:
OTCv8 2022-05-11 15:57:17 +00:00
parent 56ede4a075
commit 66a260a3a3
6 changed files with 38 additions and 9 deletions

@ -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")

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.