fix chat and grid layout
This commit is contained in:
parent
4590c1b894
commit
eb308997d4
|
@ -6,10 +6,9 @@ local function onTabClick(tabButton)
|
|||
end
|
||||
|
||||
local function tabBlink(tabButton)
|
||||
if tabButton.blinking then
|
||||
if not tabButton.blinking then return end
|
||||
tabButton:setOn(not tabButton:isOn())
|
||||
scheduleEvent(function() tabBlink(tabButton) end, 300)
|
||||
end
|
||||
scheduleEvent(function() tabBlink(tabButton) end, 500)
|
||||
end
|
||||
|
||||
-- public functions
|
||||
|
@ -66,12 +65,10 @@ function UITabBar:selectTab(tabButton)
|
|||
end
|
||||
|
||||
function UITabBar:blinkTab(tabButton)
|
||||
if not tabButton:isChecked() then
|
||||
tabButton:setOn(true)
|
||||
if tabButton:isChecked() or tabButton.blinking then return end
|
||||
tabButton.blinking = true
|
||||
tabBlink(tabButton)
|
||||
end
|
||||
end
|
||||
|
||||
function UITabBar:getTabPanel(tabButton)
|
||||
return tabButton.tabPanel
|
||||
|
|
|
@ -74,8 +74,7 @@ local function onCreatureSpeak(name, level, speaktypedesc, message, channelId, c
|
|||
end
|
||||
end
|
||||
|
||||
local channelPanel = consoleTabBar:getTabPanel(defaultChannelTab)
|
||||
Console.addText(message, speaktype.color, channelPanel)
|
||||
Console.addText(message, speaktype.color, defaultChannelTab)
|
||||
end
|
||||
|
||||
connect(Game, { onLogin = Console.create,
|
||||
|
|
|
@ -75,8 +75,8 @@ void UIGridLayout::internalUpdate()
|
|||
if(!widget->isExplicitlyVisible())
|
||||
continue;
|
||||
|
||||
int line = index / m_numLines;
|
||||
int column = index % m_numLines;
|
||||
int line = index / m_numColumns;
|
||||
int column = index % m_numColumns;
|
||||
Point virtualPos = Point(column * (m_cellSize.width() + m_cellSpacing), line * (m_cellSize.height() + m_cellSpacing));
|
||||
Point pos = topLeft + virtualPos;
|
||||
|
||||
|
|
|
@ -129,6 +129,7 @@ void OTClient::registerLuaFunctions()
|
|||
g_lua.bindClassMemberFunction<Creature>("setSkullTexture", &Creature::setSkullTexture);
|
||||
g_lua.bindClassMemberFunction<Creature>("setShieldTexture", &Creature::setShieldTexture);
|
||||
g_lua.bindClassMemberFunction<Creature>("setEmblemTexture", &Creature::setEmblemTexture);
|
||||
g_lua.bindClassMemberFunction<Creature>("asMonster", &Creature::asMonster);
|
||||
|
||||
g_lua.registerClass<Item, Thing>();
|
||||
g_lua.bindClassStaticFunction<Item>("create", &Item::create);
|
||||
|
|
Loading…
Reference in New Issue