From 9b3e0a324c3ead775b15b528e5e192e604f0d578 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 12 Jul 2014 18:44:02 +0200 Subject: [PATCH] Color adjustments and fixes --- modules/game_cooldown/cooldown.otui | 2 +- modules/game_ruleviolation/ruleviolation.lua | 3 +- modules/game_ruleviolation/ruleviolation.otui | 1 + modules/game_spelllist/spelllist.lua | 17 +++++---- modules/game_spelllist/spelllist.otui | 38 +++++++++---------- 5 files changed, 32 insertions(+), 29 deletions(-) diff --git a/modules/game_cooldown/cooldown.otui b/modules/game_cooldown/cooldown.otui index 2377c8c1..e9ad7ff5 100644 --- a/modules/game_cooldown/cooldown.otui +++ b/modules/game_cooldown/cooldown.otui @@ -96,5 +96,5 @@ MiniWindow anchors.top: groupIconSpecial.bottom anchors.left: parent.left anchors.right: parent.right - background-color: #ffffff11 + background-color: #00000022 diff --git a/modules/game_ruleviolation/ruleviolation.lua b/modules/game_ruleviolation/ruleviolation.lua index 3d74eb4e..b28e29fc 100644 --- a/modules/game_ruleviolation/ruleviolation.lua +++ b/modules/game_ruleviolation/ruleviolation.lua @@ -78,7 +78,7 @@ function loadReasons() end function show(target, statement) - if g_game.isOnline() and hasWindowAccess() then + if g_game.isOnline() and hasWindowAccess() or true then if target then ruleViolationWindow:getChildById('nameText'):setText(target) end @@ -89,6 +89,7 @@ function show(target, statement) ruleViolationWindow:show() ruleViolationWindow:raise() + ruleViolationWindow:focus() end end diff --git a/modules/game_ruleviolation/ruleviolation.otui b/modules/game_ruleviolation/ruleviolation.otui index 1d9ea0ff..570c1181 100644 --- a/modules/game_ruleviolation/ruleviolation.otui +++ b/modules/game_ruleviolation/ruleviolation.otui @@ -33,6 +33,7 @@ MainWindow id: ruleViolationWindow size: 400 445 text: Rule Violation + @onEscape: hide() RVLabel !text: tr('Name') .. ':' diff --git a/modules/game_spelllist/spelllist.lua b/modules/game_spelllist/spelllist.lua index 968164d1..dd3299fd 100644 --- a/modules/game_spelllist/spelllist.lua +++ b/modules/game_spelllist/spelllist.lua @@ -81,7 +81,9 @@ function online() else spelllistButton:hide() end - if g_game.getProtocolVersion() >= 950 then -- Vocation is only send in newer clients + + -- Vocation is only send in newer clients + if g_game.getProtocolVersion() >= 950 then spelllistWindow:getChildById('buttonFilterVocation'):setVisible(true) else spelllistWindow:getChildById('buttonFilterVocation'):setVisible(false) @@ -159,7 +161,7 @@ function init() g_keyboard.bindKeyPress('Down', function() spellList:focusNextChild(KeyboardFocusReason) end, spelllistWindow) g_keyboard.bindKeyPress('Up', function() spellList:focusPreviousChild(KeyboardFocusReason) end, spelllistWindow) - initialiseSpelllist() + initializeSpelllist() resizeWindow() if g_game.isOnline() then @@ -184,7 +186,7 @@ function terminate() premiumRadioGroup:destroy() end -function initialiseSpelllist() +function initializeSpelllist() for i = 1, #SpelllistSettings[SpelllistProfile].spellOrder do local spell = SpelllistSettings[SpelllistProfile].spellOrder[i] local info = SpellInfo[SpelllistProfile][spell] @@ -227,8 +229,7 @@ function changeSpelllistProfile(oldProfile) end -- Create new spelllist and ajust window - initialiseSpelllist() - setOptions() + initializeSpelllist() resizeWindow() resetWindow() end @@ -304,11 +305,13 @@ end function toggle() if spelllistButton:isOn() then - spelllistWindow:hide() spelllistButton:setOn(false) + spelllistWindow:hide() else - spelllistWindow:show() spelllistButton:setOn(true) + spelllistWindow:show() + spelllistWindow:raise() + spelllistWindow:focus() end end diff --git a/modules/game_spelllist/spelllist.otui b/modules/game_spelllist/spelllist.otui index 4c2415d7..7bbc46b2 100644 --- a/modules/game_spelllist/spelllist.otui +++ b/modules/game_spelllist/spelllist.otui @@ -26,6 +26,16 @@ SpellInfoValueLabel < Label margin-left: 10 margin-top: 5 +FilterButton < Button + width: 64 + anchors.left: prev.right + anchors.top: spellList.bottom + @onClick: toggleFilter(self) + margin: 5 0 0 6 + color: #630000 + $on: + color: green + MainWindow id: spelllistWindow !text: tr('Spell List') @@ -65,33 +75,21 @@ MainWindow anchors.top: spellList.top !text: tr('Name') .. ':' - Button + Label + anchors.left: parent.left + anchors.top: spellList.bottom + !text: tr('Filters') .. ':' + margin-top: 8 + + FilterButton id: buttonFilterLevel !text: tr('Level') !tooltip: tr('Hide spells for higher exp. levels') - width: 64 - anchors.left: spellList.left - anchors.top: spellList.bottom - @onClick: toggleFilter(self) - margin-left: 10 - margin-top: 5 - color: #FF0000D0 - $on: - color: green - Button + FilterButton id: buttonFilterVocation !text: tr('Vocation') !tooltip: tr('Hide spells for other vocations') - width: 64 - anchors.left: prev.right - anchors.top: spellList.bottom - @onClick: toggleFilter(self) - margin-left: 10 - margin-top: 5 - color: #FF0000D0 - $on: - color: green SpellInfoLabel id: labelFormula