bug report module

* change modules authors and website
* avoid anchors recursivity crash
* update README
master
Eduardo Bart 12年前
コミット 788a831f24

@ -1,6 +1,5 @@
== CRASHS
modules recursivity makes client crash, it should generate a warning
anchors recursivity makes the client crash
== P1 BUGS (affects game play)
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,
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
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
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
* Translating the client to other languages
* 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)
* 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

@ -3,12 +3,10 @@ game_shaders (with shader manager)
game_map (with save/load/options)
game_minimap (with all tibia functionality)
game_playertrade
game_ruleviolations
== NOTABLE FEATURES
make left panel optional
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
save/load mini windows states/location when restarting the client
graphics options menu

@ -1,8 +1,8 @@
Module
name: client
description: Initialize the client and setups its main window
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart
website: www.otclient.info
autoload: true
autoload-priority: 100
reloadable: false

@ -1,8 +1,8 @@
Module
name: client_background
description: Handles the background of the login screen
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart
website: www.otclient.info
dependencies:
- client_topmenu

@ -1,8 +1,8 @@
Module
name: client_entergame
description: Manages enter game and character list windows
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart
website: www.otclient.info
dependencies:
- client_topmenu

@ -1,8 +1,8 @@
Module
name: client_locales
description: Translates texts to selected language
author: OTClient team
website: https://github.com/edubart/otclient
author: baxnie
website: www.otclient.info
dependencies:
- client_topmenu

@ -1,8 +1,8 @@
Module
name: client_modulemanager
description: Manage other modules
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart
website: www.otclient.info
dependencies:
- client_topmenu

@ -1,8 +1,8 @@
Module
name: client_options
description: Create the options window
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart
website: www.otclient.info
dependencies:
- client_topmenu

@ -1,8 +1,8 @@
Module
name: client_terminal
description: Terminal for executing lua functions
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart
website: www.otclient.info
@onLoad: |
dofile 'terminal'

@ -1,8 +1,8 @@
Module
name: client_topmenu
description: Create the top menu
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart
website: www.otclient.info
@onLoad: |
dofile 'topmenu'

@ -2,7 +2,7 @@ Module
name: core_lib
description: Contains core lua classes, functions and constants used by other modules
author: OTClient team
website: https://github.com/edubart/otclient
website: www.otclient.info
autoload: true
autoload-priority: 10
reloadable: false

@ -2,7 +2,7 @@ Module
name: core_styles
description: Contains ui styles used by other modules
author: OTClient team
website: https://github.com/edubart/otclient
website: www.otclient.info
autoload: true
autoload-priority: 20
reloadable: false

@ -2,7 +2,7 @@ Module
name: game
description: Create the game interface, where the ingame stuff starts
author: OTClient team
website: https://github.com/edubart/otclient
website: www.otclient.info
dependencies:
- game_tibiafiles
@ -27,6 +27,7 @@ Module
- game_playertrade
- game_questlog
- game_ruleviolation
- game_bugreport
@onLoad: |
importStyle 'styles/items.otui'

@ -1,8 +1,8 @@
Module
name: game_battle
description: Manage battle window
author: OTClient team
website: https://github.com/edubart/otclient
author: andrefaramir
website: www.otclient.info
icon: battle.png
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
name: game_combatcontrols
description: Combat controls window
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart
website: www.otclient.info
dependencies:
- game

@ -1,8 +1,8 @@
Module
name: game_console
description: Manage chat window
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart, andrefaramir, baxnie
website: www.otclient.info
dependencies:
- game

@ -1,8 +1,8 @@
Module
name: game_containers
description: Manage containers
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart, baxnie
website: www.otclient.info
dependencies:
- game

@ -1,8 +1,8 @@
Module
name: game_healthbar
description: Displays health and mana points
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart
website: www.otclient.info
dependencies:
- game

@ -1,8 +1,8 @@
Module
name: game_hotkeys
description: Manage client hotkeys
author: OTClient team
website: https://github.com/edubart/otclient
author: andrefaramir
website: www.otclient.info
dependencies:
- game

@ -1,8 +1,8 @@
Module
name: game_inventory
description: View local player equipments window
author: OTClient team
website: https://github.com/edubart/otclient
author: baxnie, edubart
website: www.otclient.info
dependencies:
- game

@ -1,8 +1,8 @@
Module
name: game_minimap
description: Manage minimap
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart
website: www.otclient.info
dependencies:
- game

@ -1,8 +1,8 @@
Module
name: game_npctrade
description: NPC trade interface
author: OTClient team
website: https://github.com/edubart/otclient
author: andrefaramir, baxnie
website: www.otclient.info
dependencies:
- game

@ -1,8 +1,8 @@
Module
name: game_outfit
description: Change local player outfit
author: OTClient team
website: https://github.com/edubart/otclient
author: baxnie, edubart
website: www.otclient.info
dependencies:
- game

@ -1,7 +1,46 @@
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()
importStyle 'tradewindow.otui'
connect(g_game, { onOwnTrade = onGameOwnTrade,
onCounterTrade = onGameCounterTrade,
onCloseTrade = onGameCloseTrade })
end
function PlayerTrade.terminate()
disconnect(g_game, { onOwnTrade = onGameOwnTrade,
onCounterTrade = onGameCounterTrade,
onCloseTrade = onGameCloseTrade })
end

@ -1,8 +1,8 @@
Module
name: game_playertrade
description: Allow to trade items with players
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart
website: www.otclient.info
dependencies:
- game

@ -4,9 +4,6 @@ local questLogButton
local questLogWindow
local questLineWindow
-- g_game.requestQuestLog()
-- g_game.requestQuestLine(questId)
local function onGameQuestLog(quests)
QuestLog.destroyWindows()
@ -84,4 +81,7 @@ function QuestLog.terminate()
disconnect(g_game, { onQuestLine= onGameQuestLine })
QuestLog.destroyWindows()
questLogButton:destroy()
questLogButton = nil
end

@ -1,8 +1,8 @@
Module
name: game_questlog
description: View game quests status
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart
website: www.otclient.info
dependencies:
- game

@ -1,8 +1,8 @@
Module
name: game_ruleviolation
description: Rule violation interface
author: OTClient team
website: https://github.com/edubart/otclient
description: Rule violation interface (Ctrl+Y)
author: andrefaramir
website: www.otclient.info
dependencies:
- game

@ -1,8 +1,8 @@
Module
name: game_skills
description: Manage skills window
author: OTClient team
website: https://github.com/edubart/otclient
author: baxnie, edubart
website: www.otclient.info
dependencies:
- game

@ -15,15 +15,15 @@ local function onGameEditText(id, itemId, maxLength, text, writter, time)
textEdit:setText(text)
textEdit:setEnabled(writeable)
local desc = tr('You read the following')
local desc = ''
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
desc = desc .. tr('on %s.\n', time)
end
elseif #time > 0 then
desc = desc .. tr(', written on %s.\n', time)
desc = tr('You read the following, written on %s.\n', time)
end
if #text == 0 and not writeable then

@ -1,8 +1,8 @@
Module
name: game_textbooks
description: Allow to edit text books and lists
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart
website: www.otclient.info
dependencies:
- game

@ -1,8 +1,8 @@
Module
name: game_textmessage
description: Manage game text messages
author: OTClient team
website: https://github.com/edubart/otclient
author: edubart
website: www.otclient.info
dependencies:
- game

@ -1,8 +1,8 @@
Module
name: game_viplist
description: Manage vip list window
author: OTClient team
website: https://github.com/edubart/otclient
author: baxnie, edubart
website: www.otclient.info
@onLoad: |
dofile 'viplist'

@ -86,12 +86,20 @@ void UIAnchorLayout::removeWidget(const UIWidgetPtr& widget)
removeAnchors(widget);
}
bool UIAnchorLayout::updateWidget(const UIWidgetPtr& widget, UIAnchorGroup& anchorGroup)
bool UIAnchorLayout::updateWidget(const UIWidgetPtr& widget, UIAnchorGroup& anchorGroup, UIWidgetPtr first)
{
UIWidgetPtr parentWidget = getParentWidget();
if(!parentWidget)
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();
bool verticalMoved = false;
bool horizontalMoved = false;
@ -125,7 +133,7 @@ bool UIAnchorLayout::updateWidget(const UIWidgetPtr& widget, UIAnchorGroup& anch
if(it != m_anchorsGroups.end()) {
UIAnchorGroup& hookedAnchorGroup = it->second;
if(!hookedAnchorGroup.isUpdated())
updateWidget(hookedWidget, hookedAnchorGroup);
updateWidget(hookedWidget, hookedAnchorGroup, first);
}
}

@ -79,7 +79,7 @@ protected:
bool internalUpdate();
private:
bool updateWidget(const UIWidgetPtr& widget, UIAnchorGroup& anchorGroup);
bool updateWidget(const UIWidgetPtr& widget, UIAnchorGroup& anchorGroup, UIWidgetPtr first = nullptr);
std::map<UIWidgetPtr, UIAnchorGroup> m_anchorsGroups;
};

読み込み中…
キャンセル
保存