Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tiled/abstractobjecttool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void AbstractObjectTool::mouseMoved(const QPointF &pos,
const QPointF tilePosF = mapDocument()->renderer()->screenToTileCoords(offsetPos);
const int x = qFloor(tilePosF.x());
const int y = qFloor(tilePosF.y());
setStatusInfo(QString(QLatin1String("%1, %2 (%3, %4)")).arg(x).arg(y).arg(pixelPos.x()).arg(pixelPos.y()));
setStatusInfo(QString(QLatin1String("%1, %2 (%3, %4) %5 ")).arg(x).arg(y).arg(pixelPos.x()).arg(pixelPos.y()).arg(mToolInfo));
}

void AbstractObjectTool::mousePressed(QGraphicsSceneMouseEvent *event)
Expand Down
2 changes: 1 addition & 1 deletion src/tiled/abstractobjecttool.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/tiled/createellipseobjecttool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ CreateEllipseObjectTool::CreateEllipseObjectTool(QObject *parent)
icon.addFile(QLatin1String(":images/48x48/insert-ellipse.png"));
setIcon(icon);
Utils::setThemeIcon(this, "insert-ellipse");
mToolInfo = tr("Place an ellipse by clicking-and-dragging in any direction. Holding <b>Shift</b> makes it circle and holding <b>Ctrl</b> snaps its size to the tile size.");
languageChanged();
}

Expand Down
1 change: 1 addition & 0 deletions src/tiled/createpointobjecttool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ CreatePointObjectTool::CreatePointObjectTool(QObject *parent)
icon.addFile(QLatin1String(":images/48x48/insert-point.png"));
setIcon(icon);
Utils::setThemeIcon(this, "insert-point");
mToolInfo = tr("<b>Click</b> on the map to position a point object.");
languageChanged();
}

Expand Down
5 changes: 5 additions & 0 deletions src/tiled/createpolygonobjecttool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ CreatePolygonObjectTool::CreatePolygonObjectTool(QObject *parent)
icon.addFile(QLatin1String(":images/48x48/insert-polygon.png"));
setIcon(icon);

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.");


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.");

languageChanged();
}

Expand Down
1 change: 1 addition & 0 deletions src/tiled/createrectangleobjecttool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ CreateRectangleObjectTool::CreateRectangleObjectTool(QObject *parent)
icon.addFile(QLatin1String(":images/48x48/insert-rectangle.png"));
setIcon(icon);
Utils::setThemeIcon(this, "insert-rectangle");
mToolInfo = tr("Place a rectangle by clicking-and-dragging in any direction. Holding <b>Shift</b> makes it square and holding <b>Ctrl</b> snaps its size to the tile size.");
languageChanged();
}

Expand Down
1 change: 1 addition & 0 deletions src/tiled/createtextobjecttool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ CreateTextObjectTool::CreateTextObjectTool(QObject *parent)
icon.addFile(QLatin1String(":images/48x48/insert-text.png"));
setIcon(icon);
Utils::setThemeIcon(this, "insert-text");
mToolInfo = tr("<b>Click</b> anywhere on the map to insert text. You can also hold <b>Left mouse button</b> to see default text while placing it on the map, release <b>Left mouse button</b> to place text on the map.");
languageChanged();
}

Expand Down
1 change: 1 addition & 0 deletions src/tiled/createtileobjecttool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ CreateTileObjectTool::CreateTileObjectTool(QObject *parent)
icon.addFile(QLatin1String(":images/48x48/insert-image.png"));
setIcon(icon);
Utils::setThemeIcon(this, "insert-image");
mToolInfo = tr("First select the tile to place in the Tilesets view. Hold <b>Left mouse button</b> on the map to move the object and release it to place object. Holding <b>Ctrl</b> snaps the object to grid.");
languageChanged();
}

Expand Down
1 change: 1 addition & 0 deletions src/tiled/editpolygontool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}

EditPolygonTool::~EditPolygonTool()
Expand Down