Updated to OTCv8 3.1 rev 131

This commit is contained in:
OTCv8
2022-02-15 21:11:37 +00:00
parent 5a3e429d32
commit 80177bd151
136 changed files with 2685 additions and 5381 deletions

View File

@@ -1,127 +0,0 @@
OptionPanel
Label
text: Client user features profile
ComboBox
id: profile
margin-top: 3
@onOptionChange: modules.client_options.setOption(self:getId(), self.currentIndex)
@onSetup: |
self:addOption("1")
self:addOption("2")
self:addOption("3")
self:addOption("4")
self:addOption("5")
self:addOption("6")
self:addOption("7")
self:addOption("8")
self:addOption("9")
self:addOption("10")
Label
OptionCheckBox
id: topBar
!text: tr('Show customizable top status bar')
OptionCheckBox
id: topHealtManaBar
!text: tr('Show player top health and mana bar')
OptionCheckBox
id: showHealthManaCircle
!text: tr('Show health and mana circle')
$mobile:
visible: false
Label
margin-top: 5
text: Show Bottom Action Bars:
Panel
margin-top: 2
height: 16
layout:
type: horizontalBox
OptionCheckBox
id: actionbarBottom1
!text: tr('Bar 1')
width: 60
OptionCheckBox
id: actionbarBottom2
!text: tr('Bar 2')
width: 60
OptionCheckBox
id: actionbarBottom3
!text: tr('Bar 3')
width: 60
Label
text: Show Left Action Bars:
$mobile:
visible: false
Panel
margin-top: 2
height: 16
$mobile:
visible: false
layout:
type: horizontalBox
OptionCheckBox
id: actionbarLeft1
!text: tr('Bar 1')
width: 60
OptionCheckBox
id: actionbarLeft2
!text: tr('Bar 2')
width: 60
OptionCheckBox
id: actionbarLeft3
!text: tr('Bar 3')
width: 60
Label
text: Show Right Action Bars:
$mobile:
visible: false
Panel
margin-top: 2
height: 16
layout:
type: horizontalBox
$mobile:
visible: false
OptionCheckBox
id: actionbarRight1
!text: tr('Bar 1')
width: 60
OptionCheckBox
id: actionbarRight2
!text: tr('Bar 2')
width: 60
OptionCheckBox
id: actionbarRight3
!text: tr('Bar 3')
width: 60
Label
OptionCheckBox
id: actionbarLock
!text: tr('Disable action bar hotkeys when chat mode is on')
$mobile:
visible: false

View File

@@ -36,6 +36,14 @@ OptionPanel
$mobile:
visible: false
OptionCheckBox
id: actionBar1
!text: tr("Show first action bar")
OptionCheckBox
id: actionBar2
!text: tr("Show second action bar")
OptionCheckBox
id: showPing
@@ -66,6 +74,16 @@ OptionPanel
$mobile:
visible: false
OptionCheckBox
id: topHealtManaBar
!text: tr('Show player top health and mana bar')
OptionCheckBox
id: showHealthManaCircle
!text: tr('Show health and mana circle')
$mobile:
visible: false
OptionCheckBox
id: highlightThingsUnderCursor
!text: tr('Highlight things under cursor')

View File

@@ -49,24 +49,9 @@ local defaultOptions = {
walkStairsDelay = 50,
walkTeleportDelay = 200,
walkCtrlTurnDelay = 150,
topBar = true,
actionbarBottom1 = true,
actionbarBottom2 = false,
actionbarBottom3 = false,
actionbarLeft1 = false,
actionbarLeft2 = false,
actionbarLeft3 = false,
actionbarRight1 = false,
actionbarRight2 = false,
actionbarRight3 = false,
actionbarLock = true,
profile = 1
actionBar1 = true,
actionBar2 = false
}
local optionsWindow
@@ -78,8 +63,7 @@ local generalPanel
local interfacePanel
local consolePanel
local graphicsPanel
local audioPanel
local customPanel
local soundPanel
local extrasPanel
local audioButton
@@ -117,7 +101,6 @@ function init()
audioPanel = g_ui.loadUI('audio')
optionsTabBar:addTab(tr('Audio'), audioPanel, '/images/optionstab/audio')
extrasPanel = g_ui.createWidget('OptionPanel')
for _, v in ipairs(g_extras.getAll()) do
local extrasButton = g_ui.createWidget('OptionCheckBox')
@@ -129,9 +112,6 @@ function init()
optionsTabBar:addTab(tr('Extras'), extrasPanel, '/images/optionstab/extras')
end
customPanel = g_ui.loadUI('custom')
optionsTabBar:addTab(tr('Custom'), customPanel, '/images/optionstab/features')
optionsButton = modules.client_topmenu.addLeftButton('optionsButton', tr('Options'), '/images/topbuttons/options', toggle)
audioButton = modules.client_topmenu.addLeftButton('audioButton', tr('Audio'), '/images/topbuttons/audio', function() toggleOption('enableAudio') end)
if g_app.isMobile() then
@@ -376,20 +356,12 @@ function setOption(key, value, force)
g_settings.set(key, value)
options[key] = value
if key == "profile" then
modules.client_profiles.onProfileChange()
end
if key == 'classicView' or key == 'rightPanels' or key == 'leftPanels' or key == 'cacheMap' then
modules.game_interface.refreshViewMode()
elseif key:find("actionbar") then
elseif key == 'actionBar1' or key == 'actionBar2' then
modules.game_actionbar.show()
end
if key == 'topBar' then
modules.game_topbar.show()
end
end
function getOption(key)