bug report module
* change modules authors and website * avoid anchors recursivity crash * update README
This commit is contained in:
parent
69614da8cb
commit
788a831f24
1
BUGS
1
BUGS
|
@ -1,6 +1,5 @@
|
||||||
== CRASHS
|
== CRASHS
|
||||||
modules recursivity makes client crash, it should generate a warning
|
modules recursivity makes client crash, it should generate a warning
|
||||||
anchors recursivity makes the client crash
|
|
||||||
|
|
||||||
== P1 BUGS (affects game play)
|
== P1 BUGS (affects game play)
|
||||||
sometimes minimap desync Z pos
|
sometimes minimap desync Z pos
|
||||||
|
|
|
@ -13,7 +13,7 @@ Beyond of it's flexibility with scripts, otclient comes with tons of other featu
|
||||||
the creation of new client side stuff in otserv that was not possible before. These include,
|
the creation of new client side stuff in otserv that was not possible before. These include,
|
||||||
sound system, graphics effects with shaders, particle engines, modules/addons system, animated textures,
|
sound system, graphics effects with shaders, particle engines, modules/addons system, animated textures,
|
||||||
styleable user interface, transparency, multi language, in game lua terminal, an OpenGL 1.1/2.0 ES engine that make possible to
|
styleable user interface, transparency, multi language, in game lua terminal, an OpenGL 1.1/2.0 ES engine that make possible to
|
||||||
run on mobile platforms like Android, iPhone and iPad and much more. Otclient is also flexible enough to
|
run on mobile platforms like Androi/iPhon/iPad and much more. Otclient is also flexible enough to
|
||||||
create tibia tools like map editors just using scripts, because it wasn't designed to be just a
|
create tibia tools like map editors just using scripts, because it wasn't designed to be just a
|
||||||
client, instead otclient was designed to be a combination of a framework and tibia APIs.
|
client, instead otclient was designed to be a combination of a framework and tibia APIs.
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ We are currently needing help in the following areas:
|
||||||
* Designing new UI themes or improving the current one
|
* Designing new UI themes or improving the current one
|
||||||
* Translating the client to other languages
|
* Translating the client to other languages
|
||||||
* Documenting lua APIs and creating tutorials
|
* Documenting lua APIs and creating tutorials
|
||||||
* Scripting in lua new modules or improving the current ones
|
* Scripting with lua new modules or improving the current ones
|
||||||
* Porting otclient to other otserv protocols (8.54, 8.7, 9.x, etc)
|
* Porting otclient to other otserv protocols (8.54, 8.7, 9.x, etc)
|
||||||
* Spreading otclient project over the web and bring it to new possible contributors
|
* Spreading otclient project over the web and bring it to new possible contributors
|
||||||
* Testing the client itself to report bugs and missing features in our bug tracker
|
* Testing the client itself to report bugs and missing features in our bug tracker
|
||||||
|
|
2
TODO
2
TODO
|
@ -3,12 +3,10 @@ game_shaders (with shader manager)
|
||||||
game_map (with save/load/options)
|
game_map (with save/load/options)
|
||||||
game_minimap (with all tibia functionality)
|
game_minimap (with all tibia functionality)
|
||||||
game_playertrade
|
game_playertrade
|
||||||
game_ruleviolations
|
|
||||||
|
|
||||||
== NOTABLE FEATURES
|
== NOTABLE FEATURES
|
||||||
make left panel optional
|
make left panel optional
|
||||||
must close last container when opening a new containers
|
must close last container when opening a new containers
|
||||||
add options "Copy Text", "Copy Name", "Message" in console labels with a popupmenu
|
|
||||||
move chat tabs
|
move chat tabs
|
||||||
save/load mini windows states/location when restarting the client
|
save/load mini windows states/location when restarting the client
|
||||||
graphics options menu
|
graphics options menu
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: client
|
name: client
|
||||||
description: Initialize the client and setups its main window
|
description: Initialize the client and setups its main window
|
||||||
author: OTClient team
|
author: edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
autoload: true
|
autoload: true
|
||||||
autoload-priority: 100
|
autoload-priority: 100
|
||||||
reloadable: false
|
reloadable: false
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: client_background
|
name: client_background
|
||||||
description: Handles the background of the login screen
|
description: Handles the background of the login screen
|
||||||
author: OTClient team
|
author: edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- client_topmenu
|
- client_topmenu
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: client_entergame
|
name: client_entergame
|
||||||
description: Manages enter game and character list windows
|
description: Manages enter game and character list windows
|
||||||
author: OTClient team
|
author: edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- client_topmenu
|
- client_topmenu
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: client_locales
|
name: client_locales
|
||||||
description: Translates texts to selected language
|
description: Translates texts to selected language
|
||||||
author: OTClient team
|
author: baxnie
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- client_topmenu
|
- client_topmenu
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: client_modulemanager
|
name: client_modulemanager
|
||||||
description: Manage other modules
|
description: Manage other modules
|
||||||
author: OTClient team
|
author: edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- client_topmenu
|
- client_topmenu
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: client_options
|
name: client_options
|
||||||
description: Create the options window
|
description: Create the options window
|
||||||
author: OTClient team
|
author: edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- client_topmenu
|
- client_topmenu
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: client_terminal
|
name: client_terminal
|
||||||
description: Terminal for executing lua functions
|
description: Terminal for executing lua functions
|
||||||
author: OTClient team
|
author: edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
@onLoad: |
|
@onLoad: |
|
||||||
dofile 'terminal'
|
dofile 'terminal'
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: client_topmenu
|
name: client_topmenu
|
||||||
description: Create the top menu
|
description: Create the top menu
|
||||||
author: OTClient team
|
author: edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
@onLoad: |
|
@onLoad: |
|
||||||
dofile 'topmenu'
|
dofile 'topmenu'
|
||||||
|
|
|
@ -2,7 +2,7 @@ Module
|
||||||
name: core_lib
|
name: core_lib
|
||||||
description: Contains core lua classes, functions and constants used by other modules
|
description: Contains core lua classes, functions and constants used by other modules
|
||||||
author: OTClient team
|
author: OTClient team
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
autoload: true
|
autoload: true
|
||||||
autoload-priority: 10
|
autoload-priority: 10
|
||||||
reloadable: false
|
reloadable: false
|
||||||
|
|
|
@ -2,7 +2,7 @@ Module
|
||||||
name: core_styles
|
name: core_styles
|
||||||
description: Contains ui styles used by other modules
|
description: Contains ui styles used by other modules
|
||||||
author: OTClient team
|
author: OTClient team
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
autoload: true
|
autoload: true
|
||||||
autoload-priority: 20
|
autoload-priority: 20
|
||||||
reloadable: false
|
reloadable: false
|
||||||
|
|
|
@ -2,7 +2,7 @@ Module
|
||||||
name: game
|
name: game
|
||||||
description: Create the game interface, where the ingame stuff starts
|
description: Create the game interface, where the ingame stuff starts
|
||||||
author: OTClient team
|
author: OTClient team
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- game_tibiafiles
|
- game_tibiafiles
|
||||||
|
@ -27,6 +27,7 @@ Module
|
||||||
- game_playertrade
|
- game_playertrade
|
||||||
- game_questlog
|
- game_questlog
|
||||||
- game_ruleviolation
|
- game_ruleviolation
|
||||||
|
- game_bugreport
|
||||||
|
|
||||||
@onLoad: |
|
@onLoad: |
|
||||||
importStyle 'styles/items.otui'
|
importStyle 'styles/items.otui'
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_battle
|
name: game_battle
|
||||||
description: Manage battle window
|
description: Manage battle window
|
||||||
author: OTClient team
|
author: andrefaramir
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
icon: battle.png
|
icon: battle.png
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
BugReport = {}
|
||||||
|
|
||||||
|
local bugReportWindow
|
||||||
|
local bugTextEdit
|
||||||
|
local HOTKEY = 'Ctrl+Z'
|
||||||
|
|
||||||
|
function BugReport.init()
|
||||||
|
importStyle 'bugreport.otui'
|
||||||
|
|
||||||
|
bugReportWindow = createWidget('BugReportWindow', rootWidget)
|
||||||
|
bugReportWindow:hide()
|
||||||
|
|
||||||
|
bugTextEdit = bugReportWindow:getChildById('bugTextEdit')
|
||||||
|
|
||||||
|
Keyboard.bindKeyDown(HOTKEY, BugReport.show)
|
||||||
|
end
|
||||||
|
|
||||||
|
function BugReport.terminate()
|
||||||
|
Keyboard.unbindKeyDown(HOTKEY)
|
||||||
|
bugReportWindow:destroy()
|
||||||
|
bugReportWindow = nil
|
||||||
|
bugTextEdit = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function BugReport.doReport()
|
||||||
|
g_game.reportBug(bugTextEdit:getText())
|
||||||
|
bugReportWindow:hide()
|
||||||
|
TextMessage.displayEventAdvance(tr('Bug report sent.'))
|
||||||
|
end
|
||||||
|
|
||||||
|
function BugReport.show()
|
||||||
|
bugTextEdit:setText('')
|
||||||
|
bugReportWindow:show()
|
||||||
|
bugReportWindow:raise()
|
||||||
|
bugReportWindow:focus()
|
||||||
|
end
|
|
@ -0,0 +1,15 @@
|
||||||
|
Module
|
||||||
|
name: game_bugreport
|
||||||
|
description: Bug report interface (Ctrl+Z)
|
||||||
|
author: edubart
|
||||||
|
website: www.otclient.info
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
- game
|
||||||
|
|
||||||
|
@onLoad: |
|
||||||
|
dofile 'bugreport'
|
||||||
|
BugReport.init()
|
||||||
|
|
||||||
|
@onUnload: |
|
||||||
|
BugReport.terminate()
|
|
@ -0,0 +1,40 @@
|
||||||
|
BugReportWindow < MainWindow
|
||||||
|
!text: tr('Report Bug')
|
||||||
|
size: 280 250
|
||||||
|
&onEnter: BugReport.doReport
|
||||||
|
@onEscape: self:hide()
|
||||||
|
|
||||||
|
Label
|
||||||
|
id: bugLabel
|
||||||
|
!text: tr('Please use this dialog to only report bugs. Do not report rule violations here!')
|
||||||
|
text-wrap: true
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
height: 32
|
||||||
|
|
||||||
|
MultilineTextEdit
|
||||||
|
id: bugTextEdit
|
||||||
|
anchors.top: bugLabel.bottom
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: sendButton.top
|
||||||
|
margin-top: 4
|
||||||
|
margin-bottom: 8
|
||||||
|
|
||||||
|
Button
|
||||||
|
id: sendButton
|
||||||
|
!text: tr('Send')
|
||||||
|
anchors.bottom: cancelButton.bottom
|
||||||
|
anchors.right: cancelButton.left
|
||||||
|
margin-right: 10
|
||||||
|
width: 80
|
||||||
|
&onClick: BugReport.doReport
|
||||||
|
|
||||||
|
Button
|
||||||
|
id: cancelButton
|
||||||
|
!text: tr('Cancel')
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.right: parent.right
|
||||||
|
width: 80
|
||||||
|
@onClick: self:getParent():hide()
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_combatcontrols
|
name: game_combatcontrols
|
||||||
description: Combat controls window
|
description: Combat controls window
|
||||||
author: OTClient team
|
author: edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- game
|
- game
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_console
|
name: game_console
|
||||||
description: Manage chat window
|
description: Manage chat window
|
||||||
author: OTClient team
|
author: edubart, andrefaramir, baxnie
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- game
|
- game
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_containers
|
name: game_containers
|
||||||
description: Manage containers
|
description: Manage containers
|
||||||
author: OTClient team
|
author: edubart, baxnie
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- game
|
- game
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_healthbar
|
name: game_healthbar
|
||||||
description: Displays health and mana points
|
description: Displays health and mana points
|
||||||
author: OTClient team
|
author: edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- game
|
- game
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_hotkeys
|
name: game_hotkeys
|
||||||
description: Manage client hotkeys
|
description: Manage client hotkeys
|
||||||
author: OTClient team
|
author: andrefaramir
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- game
|
- game
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_inventory
|
name: game_inventory
|
||||||
description: View local player equipments window
|
description: View local player equipments window
|
||||||
author: OTClient team
|
author: baxnie, edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- game
|
- game
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_minimap
|
name: game_minimap
|
||||||
description: Manage minimap
|
description: Manage minimap
|
||||||
author: OTClient team
|
author: edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- game
|
- game
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_npctrade
|
name: game_npctrade
|
||||||
description: NPC trade interface
|
description: NPC trade interface
|
||||||
author: OTClient team
|
author: andrefaramir, baxnie
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- game
|
- game
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_outfit
|
name: game_outfit
|
||||||
description: Change local player outfit
|
description: Change local player outfit
|
||||||
author: OTClient team
|
author: baxnie, edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- game
|
- game
|
||||||
|
|
|
@ -1,7 +1,46 @@
|
||||||
PlayerTrade = {}
|
PlayerTrade = {}
|
||||||
|
|
||||||
|
-- g_game.inspectTrade(counterOffer, index)
|
||||||
|
-- g_game.acceptTrade()
|
||||||
|
-- g_game.rejectTrade()
|
||||||
|
|
||||||
|
local tradeWindow
|
||||||
|
|
||||||
|
local function createTrade()
|
||||||
|
if tradeWindow then
|
||||||
|
tradeWindow:destroy()
|
||||||
|
tradeWindow = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
tradeWindow = createWidget('TradeWindow', rootWidget)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function onOwnTrade(name, items)
|
||||||
|
local firstItem = items[1]
|
||||||
|
|
||||||
|
local tradeItemWidget = tradeWindow:getChildById('tradeItem')
|
||||||
|
tradeItemWidget:setItem(firstItem)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function onCounterTrade(name, items)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
local function onCloseTrade()
|
||||||
|
tradeWindow:destroy()
|
||||||
|
tradeWindow = nil
|
||||||
|
end
|
||||||
|
|
||||||
function PlayerTrade.init()
|
function PlayerTrade.init()
|
||||||
|
importStyle 'tradewindow.otui'
|
||||||
|
|
||||||
|
connect(g_game, { onOwnTrade = onGameOwnTrade,
|
||||||
|
onCounterTrade = onGameCounterTrade,
|
||||||
|
onCloseTrade = onGameCloseTrade })
|
||||||
end
|
end
|
||||||
|
|
||||||
function PlayerTrade.terminate()
|
function PlayerTrade.terminate()
|
||||||
|
disconnect(g_game, { onOwnTrade = onGameOwnTrade,
|
||||||
|
onCounterTrade = onGameCounterTrade,
|
||||||
|
onCloseTrade = onGameCloseTrade })
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_playertrade
|
name: game_playertrade
|
||||||
description: Allow to trade items with players
|
description: Allow to trade items with players
|
||||||
author: OTClient team
|
author: edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- game
|
- game
|
||||||
|
|
|
@ -4,9 +4,6 @@ local questLogButton
|
||||||
local questLogWindow
|
local questLogWindow
|
||||||
local questLineWindow
|
local questLineWindow
|
||||||
|
|
||||||
-- g_game.requestQuestLog()
|
|
||||||
-- g_game.requestQuestLine(questId)
|
|
||||||
|
|
||||||
local function onGameQuestLog(quests)
|
local function onGameQuestLog(quests)
|
||||||
QuestLog.destroyWindows()
|
QuestLog.destroyWindows()
|
||||||
|
|
||||||
|
@ -84,4 +81,7 @@ function QuestLog.terminate()
|
||||||
disconnect(g_game, { onQuestLine= onGameQuestLine })
|
disconnect(g_game, { onQuestLine= onGameQuestLine })
|
||||||
|
|
||||||
QuestLog.destroyWindows()
|
QuestLog.destroyWindows()
|
||||||
|
|
||||||
|
questLogButton:destroy()
|
||||||
|
questLogButton = nil
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_questlog
|
name: game_questlog
|
||||||
description: View game quests status
|
description: View game quests status
|
||||||
author: OTClient team
|
author: edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- game
|
- game
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_ruleviolation
|
name: game_ruleviolation
|
||||||
description: Rule violation interface
|
description: Rule violation interface (Ctrl+Y)
|
||||||
author: OTClient team
|
author: andrefaramir
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- game
|
- game
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_skills
|
name: game_skills
|
||||||
description: Manage skills window
|
description: Manage skills window
|
||||||
author: OTClient team
|
author: baxnie, edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- game
|
- game
|
||||||
|
|
|
@ -15,15 +15,15 @@ local function onGameEditText(id, itemId, maxLength, text, writter, time)
|
||||||
textEdit:setText(text)
|
textEdit:setText(text)
|
||||||
textEdit:setEnabled(writeable)
|
textEdit:setEnabled(writeable)
|
||||||
|
|
||||||
local desc = tr('You read the following')
|
local desc = ''
|
||||||
if #writter > 0 then
|
if #writter > 0 then
|
||||||
desc = desc .. tr(', written by \n%s\n', writter)
|
desc = tr('You read the following, written by \n%s\n', writter)
|
||||||
|
|
||||||
if #time > 0 then
|
if #time > 0 then
|
||||||
desc = desc .. tr('on %s.\n', time)
|
desc = desc .. tr('on %s.\n', time)
|
||||||
end
|
end
|
||||||
elseif #time > 0 then
|
elseif #time > 0 then
|
||||||
desc = desc .. tr(', written on %s.\n', time)
|
desc = tr('You read the following, written on %s.\n', time)
|
||||||
end
|
end
|
||||||
|
|
||||||
if #text == 0 and not writeable then
|
if #text == 0 and not writeable then
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_textbooks
|
name: game_textbooks
|
||||||
description: Allow to edit text books and lists
|
description: Allow to edit text books and lists
|
||||||
author: OTClient team
|
author: edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- game
|
- game
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_textmessage
|
name: game_textmessage
|
||||||
description: Manage game text messages
|
description: Manage game text messages
|
||||||
author: OTClient team
|
author: edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- game
|
- game
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Module
|
Module
|
||||||
name: game_viplist
|
name: game_viplist
|
||||||
description: Manage vip list window
|
description: Manage vip list window
|
||||||
author: OTClient team
|
author: baxnie, edubart
|
||||||
website: https://github.com/edubart/otclient
|
website: www.otclient.info
|
||||||
|
|
||||||
@onLoad: |
|
@onLoad: |
|
||||||
dofile 'viplist'
|
dofile 'viplist'
|
||||||
|
|
|
@ -86,12 +86,20 @@ void UIAnchorLayout::removeWidget(const UIWidgetPtr& widget)
|
||||||
removeAnchors(widget);
|
removeAnchors(widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UIAnchorLayout::updateWidget(const UIWidgetPtr& widget, UIAnchorGroup& anchorGroup)
|
bool UIAnchorLayout::updateWidget(const UIWidgetPtr& widget, UIAnchorGroup& anchorGroup, UIWidgetPtr first)
|
||||||
{
|
{
|
||||||
UIWidgetPtr parentWidget = getParentWidget();
|
UIWidgetPtr parentWidget = getParentWidget();
|
||||||
if(!parentWidget)
|
if(!parentWidget)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if(first == widget) {
|
||||||
|
logError("child '", widget->getId(), "' of parent widget '", parentWidget->getId(), "' is recursively anchored to itself, please fix this");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!first)
|
||||||
|
first = widget;
|
||||||
|
|
||||||
Rect newRect = widget->getRect();
|
Rect newRect = widget->getRect();
|
||||||
bool verticalMoved = false;
|
bool verticalMoved = false;
|
||||||
bool horizontalMoved = false;
|
bool horizontalMoved = false;
|
||||||
|
@ -125,7 +133,7 @@ bool UIAnchorLayout::updateWidget(const UIWidgetPtr& widget, UIAnchorGroup& anch
|
||||||
if(it != m_anchorsGroups.end()) {
|
if(it != m_anchorsGroups.end()) {
|
||||||
UIAnchorGroup& hookedAnchorGroup = it->second;
|
UIAnchorGroup& hookedAnchorGroup = it->second;
|
||||||
if(!hookedAnchorGroup.isUpdated())
|
if(!hookedAnchorGroup.isUpdated())
|
||||||
updateWidget(hookedWidget, hookedAnchorGroup);
|
updateWidget(hookedWidget, hookedAnchorGroup, first);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ protected:
|
||||||
bool internalUpdate();
|
bool internalUpdate();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool updateWidget(const UIWidgetPtr& widget, UIAnchorGroup& anchorGroup);
|
bool updateWidget(const UIWidgetPtr& widget, UIAnchorGroup& anchorGroup, UIWidgetPtr first = nullptr);
|
||||||
std::map<UIWidgetPtr, UIAnchorGroup> m_anchorsGroups;
|
std::map<UIWidgetPtr, UIAnchorGroup> m_anchorsGroups;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue