부모
ffeb34e0e7
커밋
cf0aab6d4d
@ -1,3 +1,3 @@
|
||||
[submodule "modules/tibiafiles"]
|
||||
path = modules/tibiafiles
|
||||
[submodule "modules/client_tibiafiles"]
|
||||
path = modules/client_tibiafiles
|
||||
url = git://github.com/Baxnie/otclient-tibiafiles.git
|
||||
|
@ -0,0 +1 @@
|
||||
-- place any code for testing purposes here
|
@ -1,9 +1,6 @@
|
||||
Module
|
||||
name: playground
|
||||
autoLoad: true
|
||||
dependencies:
|
||||
- core
|
||||
|
||||
onLoad: |
|
||||
require 'playground'
|
||||
return true
|
@ -1,13 +1,13 @@
|
||||
OTClient = { }
|
||||
Client = { }
|
||||
|
||||
-- TODO: load and save configurations
|
||||
function OTClient.init()
|
||||
function Client.init()
|
||||
g_window.move({ x=220, y=220 })
|
||||
g_window.resize({ width=800, height=600 })
|
||||
g_window.setTitle('OTClient')
|
||||
g_window.setIcon('otcicon.png')
|
||||
g_window.setIcon('clienticon.png')
|
||||
return true
|
||||
end
|
||||
|
||||
function OTClient.terminate()
|
||||
function Client.terminate()
|
||||
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 = {}
|
||||
|
||||
-- private variables
|
||||
local about
|
||||
local aboutWindow
|
||||
|
||||
-- public functions
|
||||
function About.create()
|
||||
about = UI.display('about.otui', { locked = true })
|
||||
aboutWindow = UI.display('about.otui', { locked = true })
|
||||
end
|
||||
|
||||
function About.destroy()
|
||||
about:destroy()
|
||||
about = nil
|
||||
aboutWindow:destroy()
|
||||
aboutWindow = nil
|
||||
end
|
||||
|
||||
function About.openWebpage()
|
@ -1,10 +1,8 @@
|
||||
Module
|
||||
name: about
|
||||
name: client_about
|
||||
description: Create the about window
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
||||
dependencies:
|
||||
- core
|
||||
|
||||
onLoad: |
|
||||
require 'about'
|
@ -1,10 +1,8 @@
|
||||
Module
|
||||
name: background
|
||||
name: client_background
|
||||
description: Handles the background of the login screen
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
||||
dependencies:
|
||||
- core
|
||||
|
||||
onLoad: |
|
||||
require 'background'
|
@ -1,7 +1,7 @@
|
||||
Panel
|
||||
id: background
|
||||
image:
|
||||
source: /background/background.png
|
||||
source: /client_background/background.png
|
||||
smooth: true
|
||||
fixed ratio: true
|
||||
anchors.top: topMenu.bottom
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
@ -1,8 +1,9 @@
|
||||
Module
|
||||
name: entergame
|
||||
name: client_entergame
|
||||
description: Manages enter game and character list windows
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
||||
|
||||
onLoad: |
|
||||
require 'entergame'
|
||||
require 'characterlist'
|
@ -1,8 +1,9 @@
|
||||
Module
|
||||
name: options
|
||||
name: client_options
|
||||
description: Create the options window
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
||||
|
||||
onLoad: |
|
||||
require 'options'
|
||||
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
|
||||
name: chat
|
||||
name: game_chat
|
||||
description: Manage chat window
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
@ -1,10 +1,10 @@
|
||||
Module
|
||||
name: health_mana
|
||||
name: game_healthbar
|
||||
description: Displays health and mana points
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
||||
onLoad: |
|
||||
require 'health_mana'
|
||||
require 'healthbar'
|
||||
return true
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
Module
|
||||
name: inventory
|
||||
name: game_inventory
|
||||
description: View local player equipments window
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
@ -1,5 +1,5 @@
|
||||
Module
|
||||
name: outfit
|
||||
name: game_outfit
|
||||
description: Change local player outfit
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
@ -1,5 +1,5 @@
|
||||
Module
|
||||
name: skills
|
||||
name: game_skills
|
||||
description: Manage skills window
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
@ -1,7 +1,7 @@
|
||||
TextMessage = {}
|
||||
|
||||
-- require styles
|
||||
importStyles '/textmessage/textmessage.otui'
|
||||
importStyles 'textmessage.otui'
|
||||
|
||||
-- private variables
|
||||
local bottomLabelWidget, centerLabelWidget
|
@ -1,5 +1,5 @@
|
||||
Module
|
||||
name: textmessage
|
||||
name: game_textmessage
|
||||
description: Manage game text messages
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
@ -1,5 +1,5 @@
|
||||
Module
|
||||
name: viplist
|
||||
name: game_viplist
|
||||
description: Manage vip list window
|
||||
author: OTClient team
|
||||
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
|
불러오는 중...
Reference in new issue