mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
Normalize source code
Add .gitattributes Remove trailing whitespaces
This commit is contained in:
@@ -74,7 +74,7 @@ function Options.init()
|
||||
optionsWindow = g_ui.displayUI('options.otui')
|
||||
optionsWindow:hide()
|
||||
optionsButton = TopMenu.addLeftButton('optionsButton', tr('Options') .. ' (Ctrl+D)', 'options.png', Options.toggle)
|
||||
|
||||
|
||||
optionsTabBar = optionsWindow:getChildById('optionsTabBar')
|
||||
optionsTabBar:setContentWidget(optionsWindow:getChildById('optionsTabContent'))
|
||||
|
||||
@@ -146,7 +146,7 @@ function Options.setOption(key, value)
|
||||
value = 0
|
||||
end
|
||||
|
||||
if graphicsPanel then
|
||||
if graphicsPanel then
|
||||
graphicsPanel:getChildById('backgroundFrameRateLabel'):setText(tr('Game framerate limit: %s', text))
|
||||
end
|
||||
g_app.setBackgroundPaneMaxFps(value)
|
||||
|
@@ -4,7 +4,7 @@ Table < UITable
|
||||
header-row-style: HeaderTableRow
|
||||
column-style: TableColumn
|
||||
row-style: TableRow
|
||||
|
||||
|
||||
TableData < UIScrollArea
|
||||
layout: verticalBox
|
||||
|
||||
|
@@ -84,7 +84,7 @@ end
|
||||
function TopMenu.addRightGameButton(id, description, icon, callback)
|
||||
return addButton(id, description, icon, callback, rightGameButtonsPanel, false)
|
||||
end
|
||||
|
||||
|
||||
function TopMenu.addRightGameToggleButton(id, description, icon, callback, right)
|
||||
return addButton(id, description, icon, callback, rightGameButtonsPanel, true)
|
||||
end
|
||||
|
@@ -62,7 +62,7 @@ TopPanel
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: prev.right
|
||||
visible: false
|
||||
|
||||
|
||||
UILabel
|
||||
id: frameCounter
|
||||
text-align: right
|
||||
|
@@ -5,7 +5,7 @@ function Bit.bit(p)
|
||||
end
|
||||
|
||||
function Bit.hasBit(x, p)
|
||||
return x % (p + p) >= p
|
||||
return x % (p + p) >= p
|
||||
end
|
||||
|
||||
function Bit.setbit(x, p)
|
||||
|
@@ -18,7 +18,7 @@ LogoutWindow < MainWindow
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
margin-left: 65
|
||||
|
||||
|
||||
Button
|
||||
id: buttonNo
|
||||
!text: tr('No')
|
||||
|
@@ -183,16 +183,16 @@ local function updateDetails(itemId, descriptions, purchaseStats, saleStats)
|
||||
else
|
||||
for k, stat in pairs(saleStats) do
|
||||
if not table.empty(stat) then
|
||||
sellStatsTable:addRow({{['text'] = 'Total Transations:'},
|
||||
sellStatsTable:addRow({{['text'] = 'Total Transations:'},
|
||||
{['text'] = stat[1], ['width'] = 270}})
|
||||
|
||||
sellStatsTable:addRow({{['text'] = 'Highest Price:'},
|
||||
sellStatsTable:addRow({{['text'] = 'Highest Price:'},
|
||||
{['text'] = stat[3], ['width'] = 270}})
|
||||
|
||||
sellStatsTable:addRow({{['text'] = 'Average Price:'},
|
||||
sellStatsTable:addRow({{['text'] = 'Average Price:'},
|
||||
{['text'] = math.floor(stat[2]/stat[1])}})
|
||||
|
||||
sellStatsTable:addRow({{['text'] = 'Lowest Price:'},
|
||||
sellStatsTable:addRow({{['text'] = 'Lowest Price:'},
|
||||
{['text'] = stat[4], ['width'] = 270}})
|
||||
end
|
||||
end
|
||||
@@ -205,16 +205,16 @@ local function updateDetails(itemId, descriptions, purchaseStats, saleStats)
|
||||
else
|
||||
for k, stat in pairs(purchaseStats) do
|
||||
if not table.empty(stat) then
|
||||
buyStatsTable:addRow({{['text'] = 'Total Transations:'},
|
||||
buyStatsTable:addRow({{['text'] = 'Total Transations:'},
|
||||
{['text'] = stat[1], ['width'] = 270}})
|
||||
|
||||
buyStatsTable:addRow({{['text'] = 'Highest Price:'},
|
||||
buyStatsTable:addRow({{['text'] = 'Highest Price:'},
|
||||
{['text'] = stat[3], ['width'] = 270}})
|
||||
|
||||
buyStatsTable:addRow({{['text'] = 'Average Price:'},
|
||||
buyStatsTable:addRow({{['text'] = 'Average Price:'},
|
||||
{['text'] = math.floor(stat[2]/stat[1]), ['width'] = 270}})
|
||||
|
||||
buyStatsTable:addRow({{['text'] = 'Lowest Price:'},
|
||||
buyStatsTable:addRow({{['text'] = 'Lowest Price:'},
|
||||
{['text'] = stat[4], ['width'] = 270}})
|
||||
end
|
||||
end
|
||||
@@ -230,7 +230,7 @@ local function updateSelectedItem(newItem)
|
||||
nameLabel:setText(selectedItem.item.marketData.name)
|
||||
-- update offer types
|
||||
Market.enableCreateOffer(true)
|
||||
|
||||
|
||||
MarketProtocol.sendMarketBrowse(selectedItem.item.ptr:getId()) -- send browsed msg
|
||||
else
|
||||
Market.Market.clearSelectedItem()
|
||||
@@ -429,7 +429,7 @@ local function initInterface()
|
||||
-- setup 'My Offer' section tabs
|
||||
myOffersPanel = g_ui.loadUI('ui/myoffers.otui')
|
||||
mainTabBar:addTab(tr('My Offers'), myOffersPanel)
|
||||
|
||||
|
||||
offersTabBar = myOffersPanel:getChildById('offersTabBar')
|
||||
offersTabBar:setContentWidget(myOffersPanel:getChildById('offersTabContent'))
|
||||
|
||||
@@ -483,7 +483,7 @@ local function initInterface()
|
||||
categoryList:addOption(getMarketCategoryName(255)) -- meta weapons
|
||||
categoryList:setCurrentOption(getMarketCategoryName(MarketCategory.First))
|
||||
subCategoryList:setEnabled(false)
|
||||
|
||||
|
||||
-- hook item filters
|
||||
categoryList.onOptionChange = onChangeCategory
|
||||
subCategoryList.onOptionChange = onChangeSubCategory
|
||||
@@ -521,7 +521,7 @@ function terminate()
|
||||
if marketWindow then
|
||||
marketWindow:destroy()
|
||||
end
|
||||
|
||||
|
||||
Market = nil
|
||||
end
|
||||
|
||||
@@ -693,7 +693,7 @@ function Market.loadDepotItems(depotItems)
|
||||
table.insert(items, newItem)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
for _, newItem in pairs(items) do
|
||||
local marketData = newItem:getMarketData()
|
||||
|
||||
|
2
modules/game_tibiafiles/.gitignore
vendored
2
modules/game_tibiafiles/.gitignore
vendored
@@ -1 +1 @@
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user