mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 20:14:54 +02:00
Refactor modules, closes #223
* All modules are sandboxed now * All images,sounds,fonts,translations and styles were moved to "data" folder * Reorganize image files folders * Remove unmaintained modules: client_particles, client_shaders * Implement new automatic way to load styles and fonts * Add hide/show offline option in VipList * Add invite/exclude to/from private channel in players menus * Many other minor changes
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
Market = {}
|
||||
|
||||
local protocol = runinsandbox('marketprotocol.lua')
|
||||
local protocol = runinsandbox('marketprotocol')
|
||||
|
||||
marketWindow = nil
|
||||
mainTabBar = nil
|
||||
@@ -602,41 +602,41 @@ local function initInterface()
|
||||
mainTabBar:setContentWidget(marketWindow:getChildById('mainTabContent'))
|
||||
|
||||
-- setup 'Market Offer' section tabs
|
||||
marketOffersPanel = g_ui.loadUI('ui/marketoffers.otui')
|
||||
marketOffersPanel = g_ui.loadUI('ui/marketoffers')
|
||||
mainTabBar:addTab(tr('Market Offers'), marketOffersPanel)
|
||||
|
||||
selectionTabBar = marketOffersPanel:getChildById('leftTabBar')
|
||||
selectionTabBar:setContentWidget(marketOffersPanel:getChildById('leftTabContent'))
|
||||
|
||||
browsePanel = g_ui.loadUI('ui/marketoffers/browse.otui')
|
||||
browsePanel = g_ui.loadUI('ui/marketoffers/browse')
|
||||
selectionTabBar:addTab(tr('Browse'), browsePanel)
|
||||
|
||||
overviewPanel = g_ui.loadUI('ui/marketoffers/overview.otui')
|
||||
overviewPanel = g_ui.loadUI('ui/marketoffers/overview')
|
||||
selectionTabBar:addTab(tr('Overview'), overviewPanel)
|
||||
|
||||
displaysTabBar = marketOffersPanel:getChildById('rightTabBar')
|
||||
displaysTabBar:setContentWidget(marketOffersPanel:getChildById('rightTabContent'))
|
||||
|
||||
itemOffersPanel = g_ui.loadUI('ui/marketoffers/itemoffers.otui')
|
||||
itemOffersPanel = g_ui.loadUI('ui/marketoffers/itemoffers')
|
||||
displaysTabBar:addTab(tr('Offers'), itemOffersPanel)
|
||||
|
||||
itemDetailsPanel = g_ui.loadUI('ui/marketoffers/itemdetails.otui')
|
||||
itemDetailsPanel = g_ui.loadUI('ui/marketoffers/itemdetails')
|
||||
displaysTabBar:addTab(tr('Details'), itemDetailsPanel)
|
||||
|
||||
itemStatsPanel = g_ui.loadUI('ui/marketoffers/itemstats.otui')
|
||||
itemStatsPanel = g_ui.loadUI('ui/marketoffers/itemstats')
|
||||
displaysTabBar:addTab(tr('Statistics'), itemStatsPanel)
|
||||
|
||||
-- setup 'My Offer' section tabs
|
||||
myOffersPanel = g_ui.loadUI('ui/myoffers.otui')
|
||||
myOffersPanel = g_ui.loadUI('ui/myoffers')
|
||||
mainTabBar:addTab(tr('My Offers'), myOffersPanel)
|
||||
|
||||
offersTabBar = myOffersPanel:getChildById('offersTabBar')
|
||||
offersTabBar:setContentWidget(myOffersPanel:getChildById('offersTabContent'))
|
||||
|
||||
currentOffersPanel = g_ui.loadUI('ui/myoffers/currentoffers.otui')
|
||||
currentOffersPanel = g_ui.loadUI('ui/myoffers/currentoffers')
|
||||
offersTabBar:addTab(tr('Current Offers'), currentOffersPanel)
|
||||
|
||||
offerHistoryPanel = g_ui.loadUI('ui/myoffers/offerhistory.otui')
|
||||
offerHistoryPanel = g_ui.loadUI('ui/myoffers/offerhistory')
|
||||
offersTabBar:addTab(tr('Offer History'), offerHistoryPanel)
|
||||
|
||||
balanceLabel = marketWindow:getChildById('balanceLabel')
|
||||
@@ -711,11 +711,11 @@ local function initInterface()
|
||||
end
|
||||
|
||||
function init()
|
||||
g_ui.importStyle('market.otui')
|
||||
g_ui.importStyle('ui/general/markettabs.otui')
|
||||
g_ui.importStyle('ui/general/marketbuttons.otui')
|
||||
g_ui.importStyle('ui/general/marketcombobox.otui')
|
||||
g_ui.importStyle('ui/general/amountwindow.otui')
|
||||
g_ui.importStyle('market')
|
||||
g_ui.importStyle('ui/general/markettabs')
|
||||
g_ui.importStyle('ui/general/marketbuttons')
|
||||
g_ui.importStyle('ui/general/marketcombobox')
|
||||
g_ui.importStyle('ui/general/amountwindow')
|
||||
|
||||
offerExhaust[MarketAction.Sell] = 10
|
||||
offerExhaust[MarketAction.Buy] = 20
|
||||
|
@@ -4,6 +4,6 @@ Module
|
||||
author: BeniS
|
||||
website: www.otclient.info
|
||||
sandboxed: true
|
||||
scripts: [ offerstatistic.lua, marketoffer.lua, marketprotocol.lua, market.lua ]
|
||||
scripts: [ offerstatistic, marketoffer, marketprotocol, market ]
|
||||
@onLoad: init()
|
||||
@onUnload: terminate()
|
||||
|
@@ -4,7 +4,7 @@ MarketProtocol = {}
|
||||
|
||||
local silent
|
||||
local protocol
|
||||
local statistics = runinsandbox('offerstatistic.lua')
|
||||
local statistics = runinsandbox('offerstatistic')
|
||||
|
||||
local function send(msg)
|
||||
if protocol and not silent then
|
||||
|
@@ -4,7 +4,7 @@ MarketComboBoxPopupMenuButton < ComboBoxRoundedPopupMenuButton
|
||||
text-offset: 2 2
|
||||
|
||||
MarketComboBoxPopupMenuSeparator < UIWidget
|
||||
image-source: /images/combobox_rounded.png
|
||||
image-source: /images/combobox_rounded
|
||||
image-repeated: true
|
||||
image-clip: 1 59 89 1
|
||||
height: 1
|
||||
|
Reference in New Issue
Block a user