parent
ffeb34e0e7
commit
cf0aab6d4d
@ -1,3 +1,3 @@
|
|||||||
[submodule "modules/tibiafiles"]
|
[submodule "modules/client_tibiafiles"]
|
||||||
path = modules/tibiafiles
|
path = modules/client_tibiafiles
|
||||||
url = git://github.com/Baxnie/otclient-tibiafiles.git
|
url = git://github.com/Baxnie/otclient-tibiafiles.git
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
-- place any code for testing purposes here
|
@ -1,9 +1,6 @@
|
|||||||
Module
|
Module
|
||||||
name: playground
|
name: playground
|
||||||
autoLoad: true
|
autoLoad: true
|
||||||
dependencies:
|
|
||||||
- core
|
|
||||||
|
|
||||||
onLoad: |
|
onLoad: |
|
||||||
require 'playground'
|
require 'playground'
|
||||||
return true
|
return true
|
@ -1,13 +1,13 @@
|
|||||||
OTClient = { }
|
Client = { }
|
||||||
|
|
||||||
-- TODO: load and save configurations
|
-- TODO: load and save configurations
|
||||||
function OTClient.init()
|
function Client.init()
|
||||||
g_window.move({ x=220, y=220 })
|
g_window.move({ x=220, y=220 })
|
||||||
g_window.resize({ width=800, height=600 })
|
g_window.resize({ width=800, height=600 })
|
||||||
g_window.setTitle('OTClient')
|
g_window.setTitle('OTClient')
|
||||||
g_window.setIcon('otcicon.png')
|
g_window.setIcon('clienticon.png')
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
function OTClient.terminate()
|
function Client.terminate()
|
||||||
end
|
end
|
@ -0,0 +1,22 @@
|
|||||||
|
Module
|
||||||
|
name: client
|
||||||
|
description: Load all other otclient dependecies
|
||||||
|
author: OTClient team
|
||||||
|
website: https://github.com/edubart/otclient
|
||||||
|
|
||||||
|
// NOTE: order does matter
|
||||||
|
dependencies:
|
||||||
|
- client_background
|
||||||
|
- client_topmenu
|
||||||
|
- client_tibiafiles
|
||||||
|
- client_about
|
||||||
|
- client_options
|
||||||
|
- client_entergame
|
||||||
|
- game
|
||||||
|
|
||||||
|
onLoad: |
|
||||||
|
require 'client'
|
||||||
|
return Client.init()
|
||||||
|
|
||||||
|
onUnload: |
|
||||||
|
Client.terminate()
|
Before Width: | Height: | Size: 518 B After Width: | Height: | Size: 518 B |
@ -1,16 +1,16 @@
|
|||||||
About = {}
|
About = {}
|
||||||
|
|
||||||
-- private variables
|
-- private variables
|
||||||
local about
|
local aboutWindow
|
||||||
|
|
||||||
-- public functions
|
-- public functions
|
||||||
function About.create()
|
function About.create()
|
||||||
about = UI.display('about.otui', { locked = true })
|
aboutWindow = UI.display('about.otui', { locked = true })
|
||||||
end
|
end
|
||||||
|
|
||||||
function About.destroy()
|
function About.destroy()
|
||||||
about:destroy()
|
aboutWindow:destroy()
|
||||||
about = nil
|
aboutWindow = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
function About.openWebpage()
|
function About.openWebpage()
|
@ -1,10 +1,8 @@
|
|||||||
Module
|
Module
|
||||||
name: about
|
name: client_about
|
||||||
description: Create the about window
|
description: Create the about window
|
||||||
author: OTClient team
|
author: OTClient team
|
||||||
website: https://github.com/edubart/otclient
|
website: https://github.com/edubart/otclient
|
||||||
dependencies:
|
|
||||||
- core
|
|
||||||
|
|
||||||
onLoad: |
|
onLoad: |
|
||||||
require 'about'
|
require 'about'
|
@ -1,10 +1,8 @@
|
|||||||
Module
|
Module
|
||||||
name: background
|
name: client_background
|
||||||
description: Handles the background of the login screen
|
description: Handles the background of the login screen
|
||||||
author: OTClient team
|
author: OTClient team
|
||||||
website: https://github.com/edubart/otclient
|
website: https://github.com/edubart/otclient
|
||||||
dependencies:
|
|
||||||
- core
|
|
||||||
|
|
||||||
onLoad: |
|
onLoad: |
|
||||||
require 'background'
|
require 'background'
|
@ -1,7 +1,7 @@
|
|||||||
Panel
|
Panel
|
||||||
id: background
|
id: background
|
||||||
image:
|
image:
|
||||||
source: /background/background.png
|
source: /client_background/background.png
|
||||||
smooth: true
|
smooth: true
|
||||||
fixed ratio: true
|
fixed ratio: true
|
||||||
anchors.top: topMenu.bottom
|
anchors.top: topMenu.bottom
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
@ -1,8 +1,9 @@
|
|||||||
Module
|
Module
|
||||||
name: entergame
|
name: client_entergame
|
||||||
description: Manages enter game and character list windows
|
description: Manages enter game and character list windows
|
||||||
author: OTClient team
|
author: OTClient team
|
||||||
website: https://github.com/edubart/otclient
|
website: https://github.com/edubart/otclient
|
||||||
|
|
||||||
onLoad: |
|
onLoad: |
|
||||||
require 'entergame'
|
require 'entergame'
|
||||||
require 'characterlist'
|
require 'characterlist'
|
@ -1,8 +1,9 @@
|
|||||||
Module
|
Module
|
||||||
name: options
|
name: client_options
|
||||||
description: Create the options window
|
description: Create the options window
|
||||||
author: OTClient team
|
author: OTClient team
|
||||||
website: https://github.com/edubart/otclient
|
website: https://github.com/edubart/otclient
|
||||||
|
|
||||||
onLoad: |
|
onLoad: |
|
||||||
require 'options'
|
require 'options'
|
||||||
return true
|
return true
|
@ -0,0 +1 @@
|
|||||||
|
Subproject commit e76fa2786e2a194375a110b700b7e2daa769f960
|
Before Width: | Height: | Size: 9.7 KiB |
@ -0,0 +1,16 @@
|
|||||||
|
Module
|
||||||
|
name: core_scripts
|
||||||
|
description: Contains core lua classes, functions and constants used by other modules
|
||||||
|
author: OTClient team
|
||||||
|
website: https://github.com/edubart/otclient
|
||||||
|
|
||||||
|
onLoad: |
|
||||||
|
require 'ext/table'
|
||||||
|
require 'ext/string'
|
||||||
|
require 'constants'
|
||||||
|
require 'util'
|
||||||
|
require 'dispatcher'
|
||||||
|
require 'widget'
|
||||||
|
require 'ui'
|
||||||
|
require 'gfx'
|
||||||
|
return true
|
@ -0,0 +1,10 @@
|
|||||||
|
Module
|
||||||
|
name: core_widgets
|
||||||
|
description: Contains widgets used by other modules
|
||||||
|
author: OTClient team
|
||||||
|
website: https://github.com/edubart/otclient
|
||||||
|
|
||||||
|
onLoad: |
|
||||||
|
require 'tooltip/tooltip'
|
||||||
|
require 'messagebox/messagebox'
|
||||||
|
return true
|
@ -1,5 +1,5 @@
|
|||||||
Module
|
Module
|
||||||
name: chat
|
name: game_chat
|
||||||
description: Manage chat window
|
description: Manage chat window
|
||||||
author: OTClient team
|
author: OTClient team
|
||||||
website: https://github.com/edubart/otclient
|
website: https://github.com/edubart/otclient
|
@ -1,10 +1,10 @@
|
|||||||
Module
|
Module
|
||||||
name: health_mana
|
name: game_healthbar
|
||||||
description: Displays health and mana points
|
description: Displays health and mana points
|
||||||
author: OTClient team
|
author: OTClient team
|
||||||
website: https://github.com/edubart/otclient
|
website: https://github.com/edubart/otclient
|
||||||
onLoad: |
|
onLoad: |
|
||||||
require 'health_mana'
|
require 'healthbar'
|
||||||
return true
|
return true
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
Module
|
Module
|
||||||
name: inventory
|
name: game_inventory
|
||||||
description: View local player equipments window
|
description: View local player equipments window
|
||||||
author: OTClient team
|
author: OTClient team
|
||||||
website: https://github.com/edubart/otclient
|
website: https://github.com/edubart/otclient
|
@ -1,5 +1,5 @@
|
|||||||
Module
|
Module
|
||||||
name: outfit
|
name: game_outfit
|
||||||
description: Change local player outfit
|
description: Change local player outfit
|
||||||
author: OTClient team
|
author: OTClient team
|
||||||
website: https://github.com/edubart/otclient
|
website: https://github.com/edubart/otclient
|
@ -1,5 +1,5 @@
|
|||||||
Module
|
Module
|
||||||
name: skills
|
name: game_skills
|
||||||
description: Manage skills window
|
description: Manage skills window
|
||||||
author: OTClient team
|
author: OTClient team
|
||||||
website: https://github.com/edubart/otclient
|
website: https://github.com/edubart/otclient
|
@ -1,7 +1,7 @@
|
|||||||
TextMessage = {}
|
TextMessage = {}
|
||||||
|
|
||||||
-- require styles
|
-- require styles
|
||||||
importStyles '/textmessage/textmessage.otui'
|
importStyles 'textmessage.otui'
|
||||||
|
|
||||||
-- private variables
|
-- private variables
|
||||||
local bottomLabelWidget, centerLabelWidget
|
local bottomLabelWidget, centerLabelWidget
|
@ -1,5 +1,5 @@
|
|||||||
Module
|
Module
|
||||||
name: textmessage
|
name: game_textmessage
|
||||||
description: Manage game text messages
|
description: Manage game text messages
|
||||||
author: OTClient team
|
author: OTClient team
|
||||||
website: https://github.com/edubart/otclient
|
website: https://github.com/edubart/otclient
|
@ -1,5 +1,5 @@
|
|||||||
Module
|
Module
|
||||||
name: viplist
|
name: game_viplist
|
||||||
description: Manage vip list window
|
description: Manage vip list window
|
||||||
author: OTClient team
|
author: OTClient team
|
||||||
website: https://github.com/edubart/otclient
|
website: https://github.com/edubart/otclient
|
@ -1,12 +0,0 @@
|
|||||||
Module
|
|
||||||
name: messagebox
|
|
||||||
description: Manages message boxes
|
|
||||||
author: OTClient team
|
|
||||||
website: https://github.com/edubart/otclient
|
|
||||||
autoLoad: true
|
|
||||||
dependencies:
|
|
||||||
- core
|
|
||||||
|
|
||||||
onLoad: |
|
|
||||||
require 'messagebox'
|
|
||||||
return true
|
|
@ -1,27 +0,0 @@
|
|||||||
Module
|
|
||||||
name: otclient
|
|
||||||
description: Load all other otclient modules
|
|
||||||
author: OTClient team
|
|
||||||
website: https://github.com/edubart/otclient
|
|
||||||
autoLoad: true
|
|
||||||
autoLoadPriority: 10
|
|
||||||
dependencies:
|
|
||||||
- core
|
|
||||||
- background
|
|
||||||
- topmenu
|
|
||||||
- game
|
|
||||||
- health_mana
|
|
||||||
- inventory
|
|
||||||
- skills
|
|
||||||
- viplist
|
|
||||||
- textmessage
|
|
||||||
- chat
|
|
||||||
- outfit
|
|
||||||
- tibiafiles
|
|
||||||
|
|
||||||
onLoad: |
|
|
||||||
require 'otclient'
|
|
||||||
return OTClient.init()
|
|
||||||
|
|
||||||
onUnload: |
|
|
||||||
OTClient.terminate()
|
|
@ -1,24 +0,0 @@
|
|||||||
-- place any code for testing purposes here
|
|
||||||
|
|
||||||
function UIItem.onMouseRelease(self, mousePos, mouseButton)
|
|
||||||
if mouseButton ~= MouseRightButton then return end
|
|
||||||
local top = self:getY()
|
|
||||||
local bottom = self:getY() + self:getHeight()
|
|
||||||
local left = self:getX()
|
|
||||||
local right = self:getX() + self:getWidth()
|
|
||||||
if not (mousePos.y >= top and mousePos.y <= bottom and mousePos.x >= left and mousePos.x <= right) then return end
|
|
||||||
|
|
||||||
local menuFile = self:getStyle()['popup menu']
|
|
||||||
if not menuFile then return end
|
|
||||||
|
|
||||||
local popupMenu = UI.display(menuFile)
|
|
||||||
if not popupMenu then return end
|
|
||||||
|
|
||||||
popupMenu:moveTo(mousePos)
|
|
||||||
popupMenu.onMouseRelease = function(self) self:destroy() end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function init()
|
|
||||||
end
|
|
||||||
|
|
||||||
addEvent(init)
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 8bb3b7d6d86e561be4622fbe7dbef208446a0319
|
|
@ -1,13 +0,0 @@
|
|||||||
Module
|
|
||||||
name: tooltip
|
|
||||||
description: Enable tooltips on any button
|
|
||||||
author: OTClient team
|
|
||||||
website: https://github.com/edubart/otclient
|
|
||||||
autoLoad: true
|
|
||||||
autoLoadPriority: 2
|
|
||||||
dependencies:
|
|
||||||
- core
|
|
||||||
|
|
||||||
onLoad: |
|
|
||||||
require 'tooltip'
|
|
||||||
return true
|
|
Loading…
Reference in new issue