Hotkeys order, minimap mark windw changes

This commit is contained in:
Henrique Santiago
2013-01-24 20:57:51 -02:00
parent d5b4e0929f
commit 42b05df717
4 changed files with 67 additions and 35 deletions

View File

@@ -252,10 +252,28 @@ end
function addKeyCombo(messageBox, keyCombo, keySettings)
local label = nil
if currentHotkeysList:getChildById(keyCombo) == nil then
local label = g_ui.createWidget('HotkeyListLabel', currentHotkeysList)
local label = g_ui.createWidget('HotkeyListLabel')
local children = currentHotkeysList:getChildren()
if #children == 0 then
currentHotkeysList:addChild(label)
else
local add = false
for i=1,#children do
if keyCombo:operatorLess(children[i]:getId()) then
currentHotkeysList:insertChild(i, label)
add = true
break
end
end
if not add then
currentHotkeysList:addChild(label)
end
end
label:setId(keyCombo)
label:setColor(HotkeyColors.text)
label:setText(keyCombo..': ')
label:setText(keyCombo .. ': ')
if keySettings then
hotkeyLabelSelectedOnList = label
label.keyCombo = keyCombo