Add keyboard shortcuts for each of the editing tool buttons
This commit is contained in:
parent
fa2574ad48
commit
6131194065
3 changed files with 103 additions and 7 deletions
|
@ -618,6 +618,36 @@ void MainWindow::on_actionBetter_Cursors_triggered() {
|
|||
settings.setValue("cursor_mode", QString::number(ui->actionBetter_Cursors->isChecked()));
|
||||
}
|
||||
|
||||
void MainWindow::on_actionPencil_triggered()
|
||||
{
|
||||
on_toolButton_Paint_clicked();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionPointer_triggered()
|
||||
{
|
||||
on_toolButton_Select_clicked();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionFlood_Fill_triggered()
|
||||
{
|
||||
on_toolButton_Fill_clicked();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionEyedropper_triggered()
|
||||
{
|
||||
on_toolButton_Dropper_clicked();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionMove_triggered()
|
||||
{
|
||||
on_toolButton_Move_clicked();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionMap_Shift_triggered()
|
||||
{
|
||||
on_toolButton_Shift_clicked();
|
||||
}
|
||||
|
||||
void MainWindow::scaleMapView(int s) {
|
||||
editor->map->scale_exp += s;
|
||||
|
||||
|
|
|
@ -63,6 +63,12 @@ private slots:
|
|||
void on_actionZoom_In_triggered();
|
||||
void on_actionZoom_Out_triggered();
|
||||
void on_actionBetter_Cursors_triggered();
|
||||
void on_actionPencil_triggered();
|
||||
void on_actionPointer_triggered();
|
||||
void on_actionFlood_Fill_triggered();
|
||||
void on_actionEyedropper_triggered();
|
||||
void on_actionMove_triggered();
|
||||
void on_actionMap_Shift_triggered();
|
||||
|
||||
void on_toolButton_deleteObject_clicked();
|
||||
void on_toolButton_Open_Scripts_clicked();
|
||||
|
|
|
@ -171,7 +171,7 @@
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Editor</p><p><span style=" font-weight:600;">Click</span> and drag to draw on the map.</p><p><span style=" font-weight:600;">Right-click</span> and drag to select tiles.</p></body></html></string>
|
||||
<string><html><head/><body><p>Pencil</p><p><span style=" font-weight:600;">Click</span> and drag to draw on the map.</p><p><span style=" font-weight:600;">Right-click</span> and drag to select tiles.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Paint</string>
|
||||
|
@ -214,7 +214,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="toolButton_Fill">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Flood Fill</p><p>Fills all similar tiles in a region with the selected metatiles or collision attributes</p></body></html></string>
|
||||
<string><html><head/><body><p>Bucket Fill</p><p>Fills all similar tiles in a region with the selected metatiles or collision attributes</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Fill</string>
|
||||
|
@ -231,7 +231,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="toolButton_Dropper">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Eye Dropper</p><p><span style=" font-weight:600;">Click</span> to select a metatile or collision attribute.</p></body></html></string>
|
||||
<string><html><head/><body><p>Eyedropper</p><p><span style=" font-weight:600;">Click</span> to select a metatile or collision attribute.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Dropper</string>
|
||||
|
@ -256,7 +256,7 @@
|
|||
<property name="icon">
|
||||
<iconset resource="resources/images.qrc">
|
||||
<normaloff>:/icons/move.ico</normaloff>:/icons/move.ico</iconset>
|
||||
</property>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -378,7 +378,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>442</width>
|
||||
<width>469</width>
|
||||
<height>620</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -761,7 +761,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>302</width>
|
||||
<width>275</width>
|
||||
<height>86</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -867,7 +867,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>352</width>
|
||||
<width>325</width>
|
||||
<height>405</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -2128,9 +2128,21 @@
|
|||
<addaction name="actionZoom_Out"/>
|
||||
<addaction name="actionBetter_Cursors"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuTools">
|
||||
<property name="title">
|
||||
<string>Tools</string>
|
||||
</property>
|
||||
<addaction name="actionPencil"/>
|
||||
<addaction name="actionPointer"/>
|
||||
<addaction name="actionFlood_Fill"/>
|
||||
<addaction name="actionEyedropper"/>
|
||||
<addaction name="actionMove"/>
|
||||
<addaction name="actionMap_Shift"/>
|
||||
</widget>
|
||||
<addaction name="menuFile"/>
|
||||
<addaction name="menuEdit"/>
|
||||
<addaction name="menuView"/>
|
||||
<addaction name="menuTools"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
<action name="action_Save_Project">
|
||||
|
@ -2219,6 +2231,54 @@
|
|||
<string><html><head/><body><p>Use reticule-styled cursors with icon showing currently selected tool.</p></body></html></string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPencil">
|
||||
<property name="text">
|
||||
<string>Pencil</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>N</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFlood_Fill">
|
||||
<property name="text">
|
||||
<string>Bucket Fill</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>B</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionEyedropper">
|
||||
<property name="text">
|
||||
<string>Eyedropper</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>E</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionMove">
|
||||
<property name="text">
|
||||
<string>Move</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>M</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionMap_Shift">
|
||||
<property name="text">
|
||||
<string>Map Shift</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>S</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPointer">
|
||||
<property name="text">
|
||||
<string>Pointer</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>P</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
|
|
Loading…
Reference in a new issue