Browse Source

double click funcionalities and some fixes

Andre Ricca da Costa 9 years ago
parent
commit
882b7ec026

+ 3
- 0
modules/client_entergame/characterlist.lua View File

@@ -73,9 +73,12 @@ function CharacterList.create(characters, premDays)
73 73
 
74 74
     local label = createWidget('CharacterListLabel', characterList)
75 75
     label:setText(characterName .. '  (' .. worldName .. ')')
76
+    label:setPhantom(false)
76 77
     label.characterName = characterName
77 78
     label.worldHost = worldHost
78 79
     label.worldPort = worldIp
80
+    
81
+    connect(label, { onMouseDoubleClick = function () CharacterList.doLogin() return true end } )
79 82
 
80 83
     if i == 1 or Settings.get('lastUsedCharacter') == characterName then
81 84
       focusLabel = label

+ 4
- 0
modules/game_console/console.lua View File

@@ -127,6 +127,10 @@ function Console.addChannel(name, id)
127 127
 end
128 128
 
129 129
 function Console.addPrivateText(text, speaktype, name)
130
+  if speaktype.speakType == SpeakPrivateNpcToPlayer then
131
+    name = 'NPCs'
132
+  end
133
+
130 134
   local privateTab = Console.getTab(name)
131 135
   if privateTab == nil then
132 136
     if Options.showPrivateMessagesInConsole then

+ 3
- 1
modules/game_inventory/inventory.lua View File

@@ -7,11 +7,13 @@ local inventoryButton
7 7
 -- public functions
8 8
 function Inventory.create()
9 9
   inventoryWindow = displayUI('inventory.otui', { parent = Game.gameRightPanel })
10
-  inventoryButton = TopMenu.addGameButton('inventoryButton', 'Skills (Ctrl+I)', 'inventory.png', Inventory.toggle)
10
+  inventoryButton = TopMenu.addGameButton('inventoryButton', 'Inventory (Ctrl+I)', 'inventory.png', Inventory.toggle)
11 11
   inventoryButton:setOn(true)
12
+  Hotkeys.bindKeyDown('Ctrl+I', Inventory.toggle)
12 13
 end
13 14
 
14 15
 function Inventory.destroy()
16
+  Hotkeys.unbindKeyDown('Ctrl+I')
15 17
   inventoryWindow:destroy()
16 18
   inventoryWindow = nil
17 19
   inventoryButton:destroy()

+ 2
- 0
modules/game_skills/skills.lua View File

@@ -45,9 +45,11 @@ function Skills.create()
45 45
   skillsWindow = displayUI('skills.otui', { parent = Game.gameRightPanel })
46 46
   skillsWindow:hide()
47 47
   skillsButton = TopMenu.addGameButton('skillsButton', 'Skills (Ctrl+S)', '/core_styles/icons/skills.png', Skills.toggle)
48
+  Hotkeys.bindKeyDown('Ctrl+S', Skills.toggle)
48 49
 end
49 50
 
50 51
 function Skills.destroy()
52
+  Hotkeys.unbindKeyDown('Ctrl+S')
51 53
   skillsButton:destroy()
52 54
   skillsButton = nil
53 55
   skillsWindow:destroy()

+ 3
- 0
modules/game_viplist/viplist.lua View File

@@ -55,6 +55,9 @@ function VipList.onAddVip(id, name, online)
55 55
 
56 56
   label.vipOnline = online
57 57
 
58
+  label:setPhantom(false)
59
+  connect(label, { onMouseDoubleClick = function () Game.openPrivateChannel(label:getText()) return true end } )
60
+  
58 61
   local nameLower = name:lower()
59 62
   local childrenCount = vipList:getChildCount()
60 63
 

Loading…
Cancel
Save