mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 20:14:54 +02:00
Changes/Fixes to Channels/Hotkeys/Inventory Slots.
- Fixed issue with opening multiple instances of the same message channels (will focus the channel if already exists). - Added tooltip to the 'Clear message window' button. - Added keyboard Up/Down press for hotkeys. - Added inventory slots/images. - Started on adding soul
This commit is contained in:
@@ -118,18 +118,13 @@ local function onOpenChannel(channelId, channelName)
|
||||
end
|
||||
|
||||
local function onOpenPrivateChannel(receiver)
|
||||
local privateTab = Console.getTab(receiver)
|
||||
if privateTab == nil then
|
||||
channels[receiver] = receiver
|
||||
Console.addTab(receiver, true)
|
||||
end
|
||||
Console.addPrivateChannel(receiver)
|
||||
end
|
||||
|
||||
local function onOpenOwnPrivateChannel(channelId, channelName)
|
||||
local privateTab = Console.getTab(channelName)
|
||||
if privateTab == nil then
|
||||
--channels[channelId] = channelName (this should be tested)
|
||||
Console.addChannel(channelName, channelId, true)
|
||||
Console.addChannel(channelName, channelId)
|
||||
end
|
||||
ownPrivateName = channelName
|
||||
end
|
||||
@@ -302,7 +297,12 @@ function Console.openHelp()
|
||||
end
|
||||
|
||||
function Console.addTab(name, focus)
|
||||
local tab = consoleTabBar:addTab(name)
|
||||
local tab = Console.getTab(name)
|
||||
if(tab) then -- is channel already open
|
||||
if(not focus) then focus = true end
|
||||
else
|
||||
tab = consoleTabBar:addTab(name)
|
||||
end
|
||||
if focus then
|
||||
consoleTabBar:selectTab(tab)
|
||||
elseif name ~= tr('Server Log') then
|
||||
@@ -348,6 +348,11 @@ function Console.addChannel(name, id)
|
||||
return tab
|
||||
end
|
||||
|
||||
function Console.addPrivateChannel(receiver)
|
||||
channels[receiver] = receiver
|
||||
return Console.addTab(receiver, true)
|
||||
end
|
||||
|
||||
function Console.addPrivateText(text, speaktype, name, isPrivateCommand, creatureName)
|
||||
local focus = false
|
||||
if speaktype.speakType == SpeakPrivateNpcToPlayer then
|
||||
|
Reference in New Issue
Block a user