forked from Mirrors/openclonk
Editor: Add more shortcut keys
parent
e67e429fef
commit
2490ef4584
|
@ -941,7 +941,7 @@
|
|||
<string comment="res">IDS_TEXT_MAP_STATIC</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>F3</string>
|
||||
<string>F8</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionExactLandscape">
|
||||
|
@ -1109,7 +1109,7 @@
|
|||
<string comment="res">IDS_TEXT_MAP_STATICFLAT</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Shift+F3</string>
|
||||
<string>Shift+F8</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDeleteObject">
|
||||
|
@ -1169,6 +1169,30 @@
|
|||
<string>F12</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFocusGlobalScriptBox">
|
||||
<property name="text">
|
||||
<string>FocusGlobalScriptBox</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>F4</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFocusObjectScriptBox">
|
||||
<property name="text">
|
||||
<string>FocusObjectScriptBox</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Shift+F4</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOpenMaterialSelection">
|
||||
<property name="text">
|
||||
<string>OpenMaterialSelection</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>F9</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="resource.qrc"/>
|
||||
|
@ -1814,6 +1838,54 @@
|
|||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>actionFocusGlobalScriptBox</sender>
|
||||
<signal>triggered()</signal>
|
||||
<receiver>MainWindow</receiver>
|
||||
<slot>FocusGlobalScriptBox()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>477</x>
|
||||
<y>312</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>actionFocusObjectScriptBox</sender>
|
||||
<signal>triggered()</signal>
|
||||
<receiver>MainWindow</receiver>
|
||||
<slot>FocusObjectScriptBox()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>477</x>
|
||||
<y>312</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>actionOpenMaterialSelection</sender>
|
||||
<signal>triggered()</signal>
|
||||
<receiver>MainWindow</receiver>
|
||||
<slot>OpenMaterialSelection()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>477</x>
|
||||
<y>312</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>PlayPressed(bool)</slot>
|
||||
|
@ -1855,5 +1927,8 @@
|
|||
<slot>SelectionEjectContents()</slot>
|
||||
<slot>HelpToggle(bool)</slot>
|
||||
<slot>FileReInitScenario()</slot>
|
||||
<slot>FocusGlobalScriptBox()</slot>
|
||||
<slot>FocusObjectScriptBox()</slot>
|
||||
<slot>OpenMaterialSelection()</slot>
|
||||
</slots>
|
||||
</ui>
|
||||
|
|
|
@ -513,6 +513,29 @@ void C4ConsoleQtMainWindow::SelectionEjectContents()
|
|||
::Console.EditCursor.GrabContents();
|
||||
}
|
||||
|
||||
void C4ConsoleQtMainWindow::FocusGlobalScriptBox()
|
||||
{
|
||||
state->ui.logDockWidget->show();
|
||||
state->ui.logDockWidget->raise();
|
||||
state->ui.consoleInputBox->setFocus();
|
||||
}
|
||||
|
||||
void C4ConsoleQtMainWindow::FocusObjectScriptBox()
|
||||
{
|
||||
state->ui.propertyDockWidget->show();
|
||||
state->ui.propertyDockWidget->raise();
|
||||
state->ui.propertyInputBox->setFocus();
|
||||
}
|
||||
|
||||
void C4ConsoleQtMainWindow::OpenMaterialSelection()
|
||||
{
|
||||
if (state->ui.foregroundMatTexComboBox->isEnabled())
|
||||
{
|
||||
state->ui.foregroundMatTexComboBox->setFocus();
|
||||
state->ui.foregroundMatTexComboBox->showPopup();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Common C4ConsoleGUI interface */
|
||||
|
||||
|
@ -649,6 +672,11 @@ bool C4ConsoleGUIState::CreateConsoleWindow(C4AbstractApp *app)
|
|||
window->tabifyDockWidget(ui.objectListDockWidget, ui.creatorDockWidget);
|
||||
ui.propertyDockWidget->raise();
|
||||
|
||||
// Some keyboard shortcut actions
|
||||
window->addAction(ui.actionFocusGlobalScriptBox);
|
||||
window->addAction(ui.actionFocusObjectScriptBox);
|
||||
window->addAction(ui.actionOpenMaterialSelection);
|
||||
|
||||
// Welcome page
|
||||
InitWelcomeScreen();
|
||||
ShowWelcomeScreen();
|
||||
|
|
|
@ -166,6 +166,10 @@ public slots:
|
|||
void SelectionDelete();
|
||||
void SelectionDuplicate();
|
||||
void SelectionEjectContents();
|
||||
// Shortcut actions
|
||||
void FocusGlobalScriptBox();
|
||||
void FocusObjectScriptBox();
|
||||
void OpenMaterialSelection();
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue