-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestions to User in bottom status-bar regarding current active object Tools (not added for insert-template tool) #1907
base: master
Are you sure you want to change the base?
Changes from 3 commits
7baccf0
235ab7a
fc08698
be6ee12
a6fe5ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,7 @@ class AbstractObjectTool : public AbstractTool | |
* an object group. | ||
*/ | ||
void updateEnabledState() override; | ||
|
||
QString mtoolInfo; | ||
MapScene *mapScene() const { return mMapScene; } | ||
ObjectGroup *currentObjectGroup() const; | ||
QList<MapObject*> mapObjectsAt(const QPointF &pos) const; | ||
|
@@ -89,7 +89,6 @@ private slots: | |
private: | ||
void showContextMenu(MapObject *clickedObject, | ||
QPoint screenPos); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please don't remove the empty line. |
||
MapScene *mMapScene; | ||
}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,19 @@ CreatePolygonObjectTool::CreatePolygonObjectTool(QObject *parent) | |
QIcon icon(QLatin1String(":images/24x24/insert-polygon.png")); | ||
icon.addFile(QLatin1String(":images/48x48/insert-polygon.png")); | ||
setIcon(icon); | ||
|
||
<<<<<<< HEAD | ||
<<<<<<< HEAD | ||
<<<<<<< HEAD | ||
|
||
======= | ||
mtoolInfo = tr("<b>First Click</b> determines the location of object and first point of polygon. <b>Right Click</b> or press <b>Enter</b> to finish creating polygon. press <b>Escape</b> to cancel creation of polygon."); | ||
>>>>>>> 7b9ddd1b... added information to be displayed in status bar for object-tools, except not for template object tool | ||
======= | ||
mtoolInfo = tr("<b>First Click</b> determines the location of object and first point of polygon. <b>Right Click</b> or press <b>Enter</b> to finish creating polygon. press <b>Escape</b> to cancel creation of polygon."); | ||
>>>>>>> 7b9ddd1b... added information to be displayed in status bar for object-tools, except not for template object tool | ||
======= | ||
mtoolInfo = tr("<b>First Click</b> determines the location of object and first point of polygon. <b>Right Click</b> or press <b>Enter</b> to finish creating polygon. press <b>Escape</b> to cancel creation of polygon."); | ||
>>>>>>> 7b9ddd1b... added information to be displayed in status bar for object-tools, except not for template object tool | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are conflicts markers, indicating you missed to resolve the conflict before committing (or before continuing the rebase). You can resolve these conflicts by either editing the file in your regular editor, or by using a special merge tool. I personally use Meld with |
||
languageChanged(); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* createpolylineobjecttool.cpp | ||
* Copyright 2014, Martin Ziel <martin.ziel.com> | ||
* | ||
* This file is part of Tiled. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the Free | ||
* Software Foundation; either version 2 of the License, or (at your option) | ||
* any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include "createpolylineobjecttool.h" | ||
|
||
#include "mapobject.h" | ||
#include "mapobjectitem.h" | ||
#include "utils.h" | ||
|
||
using namespace Tiled; | ||
using namespace Tiled::Internal; | ||
|
||
CreatePolylineObjectTool::CreatePolylineObjectTool(QObject *parent) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please don't re-create this file. It no longer exists since polyline and polygon creation tools have been merged into one tool now. |
||
: CreateMultipointObjectTool(parent) | ||
{ | ||
QIcon icon(QLatin1String(":images/24x24/insert-polyline.png")); | ||
icon.addFile(QLatin1String(":images/48x48/insert-polyline.png")); | ||
setIcon(icon); | ||
mtoolInfo = tr("<b>First Click</b> determines the location of object and first point of polyline. <b>Right Click</b> or press <b>Enter</b> to finish creating polyline. press <b>Escape</b> to cancel creation of polyline."); | ||
languageChanged(); | ||
} | ||
|
||
void CreatePolylineObjectTool::languageChanged() | ||
{ | ||
setName(tr("Insert Polyline")); | ||
setShortcut(QKeySequence(tr("L"))); | ||
} | ||
|
||
MapObject *CreatePolylineObjectTool::createNewMapObject() | ||
{ | ||
MapObject *newMapObject = new MapObject; | ||
newMapObject->setShape(MapObject::Polyline); | ||
return newMapObject; | ||
} | ||
|
||
void CreatePolylineObjectTool::finishNewMapObject() | ||
{ | ||
if (mNewMapObjectItem->mapObject()->polygon().size() >= 2) | ||
CreateObjectTool::finishNewMapObject(); | ||
else | ||
CreateObjectTool::cancelNewMapObject(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,7 @@ EditPolygonTool::EditPolygonTool(QObject *parent) | |
, mClickedObject(nullptr) | ||
, mMode(NoMode) | ||
{ | ||
mtoolInfo=tr("<b>Click</b> on a node to select it, hold <b>Shift</b> to select multiple nodes and holding <b>Alt</b> forces moving current selection. Press <b>Delete key</b> to remove currently selected node(s)"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Coding style: should have spaces around |
||
} | ||
|
||
EditPolygonTool::~EditPolygonTool() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming style:
mToolInfo