Editor: Add shortcuts, menu items, tooltips

console-destruction
Sven Eberhardt 2016-09-08 01:56:01 -04:00
parent 0e02bad837
commit 53b365a6d2
5 changed files with 215 additions and 40 deletions

View File

@ -322,10 +322,8 @@ IDS_DLG_COPY=Kopieren
IDS_DLG_CUT=Ausschneiden
IDS_DLG_DEFINITION=Objektdefinition
IDS_DLG_DEFINITIONS=Objektdefinitionen
IDS_DLG_DYNAMIC=Dynamische Landschaft
IDS_DLG_EDITOR=Editor
IDS_DLG_ERROR=Fehler
IDS_DLG_EXACT=Exakte Landschaft
IDS_DLG_EXIT=&Beenden
IDS_DLG_GAME=Spiel
IDS_DLG_GAMEGO=&Starten
@ -363,9 +361,6 @@ IDS_DLG_SCENARIOTITLE=Geladenes Szenario
IDS_DLG_SELALL=Alles markieren
IDS_DLG_SOUND=Sound
IDS_DLG_STARTGAME=&Spiel starten
IDS_DLG_STATIC=Statische Landschaft
IDS_DLG_STATICFLAT=Statische Landschaft mit geraden Kanten
IDS_DLG_TOOLS=Landschaftswerkzeuge
IDS_DLG_VERSION=Version %s
IDS_DLG_VOTING=Abstimmung
IDS_DLG_YES=&Ja
@ -512,6 +507,14 @@ IDS_MNU_CLONKNAMES=Clonk-Namen
IDS_MNU_CLOSE=Schließen
IDS_MNU_COMPONENTS=Komponenten
IDS_MNU_CONTENTS=Inhalt nehmen
IDS_MNU_CURSOR_CREATOR=Cursor: Objekte erstellen
IDS_MNU_CURSOR_DRAWFILL=Cursor: Material streuen
IDS_MNU_CURSOR_DRAWLINE=Cursor: Landschaft Linie
IDS_MNU_CURSOR_DRAWPEN=Cursor: Landschaft zeichnen
IDS_MNU_CURSOR_DRAWPICKER=Cursor: Material Pipette
IDS_MNU_CURSOR_DRAWRECT=Cursor: Landschaft Rechteck
IDS_MNU_CURSOR_GAME=Spielcursor
IDS_MNU_CURSOR_SELECT=Cursor: Objektauswahl
IDS_MNU_DEFAULTRESOLUTION=Bildschirm
IDS_MNU_DELETE=Löschen
IDS_MNU_DUPLICATE=Duplizieren
@ -519,6 +522,10 @@ IDS_MNU_EXPLOREUSERPATH=Benutzerpfad anzeigen
IDS_MNU_FILE=Datei
IDS_MNU_FPS=FPS-Anzeige
IDS_MNU_JOIN=Beitritt
IDS_MNU_MAP_DYNAMIC=Landschaft: Dynamisch
IDS_MNU_MAP_EXACT=Landschaft: Exakt
IDS_MNU_MAP_STATIC=Landschaft: Statisch (Standard)
IDS_MNU_MAP_STATICFLAT=Landschaft: Statisch flach
IDS_MNU_MUSIC=Musik
IDS_MNU_NET=Host
IDS_MNU_NETCLIENT_DEACTIVATE=Client %s (%i) deaktivieren
@ -530,6 +537,8 @@ IDS_MNU_OPEN=Öffnen...
IDS_MNU_OPENWPLRS=Öffnen mit Spielern...
IDS_MNU_OPTIONS=Optionen
IDS_MNU_OPTIONSINFO=Einstellungen ändern.
IDS_MNU_PAUSE=Spiel pausieren
IDS_MNU_PLAY=Spiel starten
IDS_MNU_PLAYER=Spieler
IDS_MNU_PLAYERNAMES=Spielernamen
IDS_MNU_QUIT=Beenden
@ -544,6 +553,7 @@ IDS_MNU_START=Start
IDS_MNU_SWITCHRESOLUTION=Bildschirmauflösung ändern
IDS_MNU_SWITCHRESOLUTION_LIKEIT=Neue Auflösung gewählt. Zufrieden?
IDS_MNU_SWITCHRESOLUTION_UNDO=Alte Einstellung wird in %d Sekunden wiederhergestellt...
IDS_MNU_TOOLS=Werkzeuge
IDS_MNU_UPPERBOARD=Titelleiste
IDS_MNU_VIEWPORT=Sichtfenster
IDS_MNU_WINDOWS=Fenster
@ -963,6 +973,14 @@ IDS_TEXT_COMMANDSAVAILABLEDURINGGA=Verfügbare Befehle während des Spiels:
IDS_TEXT_COMMANDSAVAILABLEDURINGLO=Verfügbare Befehle in der Lobby:
IDS_TEXT_COMPUTER=Computer
IDS_TEXT_CONTROLMODE=Netzwerkmodus
IDS_TEXT_CURSOR_CREATOR=Schaltet den Mauszeiger auf Objekte Erstellen. Die Definition kann in der Defintionsliste gewählt und durch Klicken in ein Sichtfenster platziert werden. Mit 'Strg' koennen Objekte als Inhaltsobjekte erstellt werden.
IDS_TEXT_CURSOR_DRAWFILL=Schaltet den Mauszeiger auf Material Streuen. Nur verfuegbar im exakten Landschaftsmodus.
IDS_TEXT_CURSOR_DRAWLINE=Schaltet den Mauszeiger auf Linien im Landschaftsmodus. Das Zeichenmaterial kann in der Werkzeugleiste (linke Liste) ausgewählt werden.
IDS_TEXT_CURSOR_DRAWPEN=Schaltet den Mauszeiger auf Landschaftsmodus. Das Zeichenmaterial kann in der Werkzeugleiste (linke Liste) oder durch Halten von 'Alt' beim Klick in die Landschaft ausgewählt werden.
IDS_TEXT_CURSOR_DRAWPICKER=Schaltet den Mauszeiger auf Material-Pipette. Erlaubt das Auswählen von Materialien direkt in der Landschaft. Kann auch durch Halten von 'Alt' während Benutzung des Landschaftspinsels erreicht werden.
IDS_TEXT_CURSOR_DRAWRECT=Schaltet den Mauszeiger auf Rechtecke im Landschaftsmodus. Das Zeichenmaterial kann in der Werkzeugleiste (linke Liste) ausgewählt werden.
IDS_TEXT_CURSOR_GAME=Schaltet den Mauszeiger auf Spielmodus. Nur benutzbar in Spieler-Viewports.
IDS_TEXT_CURSOR_SELECT=Schaltet den Mauszeiger auf Objektasuwahl. Erlaubt das Auswaehlen, Verschieben, Drehen und Skalieren von Objekten.
IDS_TEXT_DESKTOP=Desktop
IDS_TEXT_DETERMINEPLAYERVIEWTOFOLL=Sichtmodus wählen.
IDS_TEXT_DISCONNECTTHEGAMEFROMTHES=Verbindung zum Host trennen und alleine weiterspielen.
@ -981,6 +999,10 @@ IDS_TEXT_KICKCERTAINCLIENTSFROMTHE=Bestimmte Clients aus dem Spiel entfernen.
IDS_TEXT_KICKTHESPECIFIEDCLIENT=Den entsprechenden Client entfernen.
IDS_TEXT_LEAGUEWAITINGFOREVALUATIO=Warte auf Liga-Auswertung...
IDS_TEXT_LOCATION=Suchen in:
IDS_TEXT_MAP_DYNAMIC=Wechselt den Landschaftsmodus auf scriptgeneriert Karte. Erlaubt kein Zeichnen in der Landschaft.
IDS_TEXT_MAP_EXACT=Wechselt den Landschaftsmodus auf exakte, pixelgenau gespeicherte Karte. Nicht empfohlen fuer Szenarien, da Materialkanten nicht automatisch korrekt gezoomt werden.
IDS_TEXT_MAP_STATIC=Wechselt den Landschaftsmodus auf statische Karte. Die Karte wird in Bloecken gespeichert und Materialkantne automatisch nach Materialoberflaeche gezoomt.
IDS_TEXT_MAP_STATICFLAT=Wechselt den Landschaftsmodus auf statische Karte mit flachen Kanten. Nuetzlich, um ungewollte Loecher mit falschen Materialien zu schliessen oder zum Beispiel Tore in Mauern einfacher zu setzen.
IDS_TEXT_MYDOCUMENTS=Eigene Dateien
IDS_TEXT_MYPICTURES=Eigene Bilder
IDS_TEXT_PAUSETHEGAME=anhalten

View File

@ -322,10 +322,8 @@ IDS_DLG_COPY=Copy
IDS_DLG_CUT=Cut
IDS_DLG_DEFINITION=Object Definition
IDS_DLG_DEFINITIONS=Object Definitions
IDS_DLG_DYNAMIC=Dynamic landscape
IDS_DLG_EDITOR=Editor
IDS_DLG_ERROR=Error
IDS_DLG_EXACT=Exact landscape
IDS_DLG_EXIT=E&xit
IDS_DLG_GAME=Game
IDS_DLG_GAMEGO=&Start
@ -363,9 +361,6 @@ IDS_DLG_SCENARIOTITLE=Loaded scenario
IDS_DLG_SELALL=Select all
IDS_DLG_SOUND=Sound
IDS_DLG_STARTGAME=&Start Game
IDS_DLG_STATIC=Static landscape
IDS_DLG_STATICFLAT=Static landscape with flat borders
IDS_DLG_TOOLS=Landscape tools
IDS_DLG_VERSION=Version %s
IDS_DLG_VOTING=Voting
IDS_DLG_YES=&Yes
@ -512,6 +507,14 @@ IDS_MNU_CLONKNAMES=Clonk names
IDS_MNU_CLOSE=Close
IDS_MNU_COMPONENTS=Components
IDS_MNU_CONTENTS=Grab contents
IDS_MNU_CURSOR_CREATOR=Cursor: Object creation
IDS_MNU_CURSOR_DRAWLINE=Cursor: Landscape line
IDS_MNU_CURSOR_DRAWFILL=Cursor: Cast material
IDS_MNU_CURSOR_DRAWPEN=Cursor: Landscape free drawing
IDS_MNU_CURSOR_DRAWPICKER=Cursor: Material picker
IDS_MNU_CURSOR_DRAWRECT=Cursor: Landscape rectangle
IDS_MNU_CURSOR_GAME=Cursor: Game
IDS_MNU_CURSOR_SELECT=Cursor: Object selection
IDS_MNU_DEFAULTRESOLUTION=Screen
IDS_MNU_DELETE=Delete
IDS_MNU_DUPLICATE=Duplicate
@ -519,6 +522,10 @@ IDS_MNU_EXPLOREUSERPATH=Open user path
IDS_MNU_FILE=File
IDS_MNU_FPS=FPS Display
IDS_MNU_JOIN=Join
IDS_MNU_MAP_DYNAMIC=Landscape: Dynamic
IDS_MNU_MAP_EXACT=Landscape: Exact
IDS_MNU_MAP_STATIC=Landscape: Static (default)
IDS_MNU_MAP_STATICFLAT=Landscape: Static flat
IDS_MNU_MUSIC=Music
IDS_MNU_NET=Host
IDS_MNU_NETCLIENT_DEACTIVATE=Deactivate client %s (%i)
@ -530,6 +537,8 @@ IDS_MNU_OPEN=Open...
IDS_MNU_OPENWPLRS=Open with players...
IDS_MNU_OPTIONS=Options
IDS_MNU_OPTIONSINFO=Change program options.
IDS_MNU_PAUSE=Pause game
IDS_MNU_PLAY=Play game
IDS_MNU_PLAYER=Player
IDS_MNU_PLAYERNAMES=Player names
IDS_MNU_QUIT=Quit
@ -544,6 +553,7 @@ IDS_MNU_START=Start
IDS_MNU_SWITCHRESOLUTION=Switch resolution
IDS_MNU_SWITCHRESOLUTION_LIKEIT=This is your new resolution. Do you like it?
IDS_MNU_SWITCHRESOLUTION_UNDO=Original resolution will be restored in %d seconds...
IDS_MNU_TOOLS=Tools
IDS_MNU_UPPERBOARD=Title board
IDS_MNU_VIEWPORT=Viewport
IDS_MNU_WINDOWS=Windows
@ -963,6 +973,14 @@ IDS_TEXT_COMMANDSAVAILABLEDURINGGA=Commands available during game:
IDS_TEXT_COMMANDSAVAILABLEDURINGLO=Commands available during lobby:
IDS_TEXT_COMPUTER=Computer
IDS_TEXT_CONTROLMODE=Control mode
IDS_TEXT_CURSOR_CREATOR=Switches the mouse cursor to object creation mode. Select a definition in the object creator window and click into a viewport to create objects. Hold down 'Control' to put objects into contents.
IDS_TEXT_CURSOR_DRAWFILL=Switches the mouse cursor to material casting in landscape drawing. Only available in exact landscape mode.
IDS_TEXT_CURSOR_DRAWLINE=Switches the mouse cursor to lines in landscape drawing. The drawing material can be selected in the tool bar (left list) or by holding 'Alt' to switch to the material picker.
IDS_TEXT_CURSOR_DRAWPEN=Switches the mouse cursor to free landscape drawing. The drawing material can be selected in the tool bar (left list) or by holding 'Alt' to switch to the material picker.
IDS_TEXT_CURSOR_DRAWPICKER=Switches the mouse cursor to material picking from the landscape. Can also be achieved by holding 'Alt' while using a drawing tool.
IDS_TEXT_CURSOR_DRAWRECT=Switches the mouse cursor to rectangles in landscape drawing. The drawing material can be selected in the tool bar (left list) or by holding 'Alt' to switch to the material picker.
IDS_TEXT_CURSOR_GAME=Switches the mouse cursor to game mode. Only usable in player viewports.
IDS_TEXT_CURSOR_SELECT=Switches the mouse cursor to object mode. Allows selection, movement, rotation and scaling of objects. Hold down 'Control' to move objects into other objects.
IDS_TEXT_DESKTOP=Desktop
IDS_TEXT_DETERMINEPLAYERVIEWTOFOLL=Select view mode.
IDS_TEXT_DISCONNECTTHEGAMEFROMTHES=Disconnect the game from the host.
@ -981,6 +999,10 @@ IDS_TEXT_KICKCERTAINCLIENTSFROMTHE=Kick certain clients from the game.
IDS_TEXT_KICKTHESPECIFIEDCLIENT=Kick the specified client.
IDS_TEXT_LEAGUEWAITINGFOREVALUATIO=League: waiting for evaluation...
IDS_TEXT_LOCATION=Location:
IDS_TEXT_MAP_DYNAMIC=Switches the landscape mode to script-generated map. Does not allow drawing in the landscape.
IDS_TEXT_MAP_EXACT=Switches the landscape mode to exact, pixel-perfect map. Allows free drawing, but is not recommended for scenarios because it does not draw correctly shaped material surfaces automatically.
IDS_TEXT_MAP_STATIC=Switches the landscape mode to static map. The map is saved in blocks and material borders are drawn automatically.
IDS_TEXT_MAP_STATICFLAT=Switches the landscape mode to static map with flat borders. This mode is useful to fix errors such as small holes in the map or properly place doors in castle maps.
IDS_TEXT_MYDOCUMENTS=My Documents
IDS_TEXT_MYPICTURES=My Pictures
IDS_TEXT_PAUSETHEGAME=pause the game

View File

@ -402,7 +402,29 @@
<string comment="res">IDS_MNU_NET</string>
</property>
</widget>
<widget class="QMenu" name="menuTools">
<property name="title">
<string comment="res">IDS_MNU_TOOLS</string>
</property>
<addaction name="actionPlay"/>
<addaction name="actionPause"/>
<addaction name="separator"/>
<addaction name="actionCursorGame"/>
<addaction name="actionCursorSelect"/>
<addaction name="actionCursorCreateObj"/>
<addaction name="actionCursorDrawPen"/>
<addaction name="actionCursorDrawLine"/>
<addaction name="actionCursorDrawRect"/>
<addaction name="actionCursorFill"/>
<addaction name="actionCursorPicker"/>
<addaction name="separator"/>
<addaction name="actionDynamicLandscape"/>
<addaction name="actionStaticLandscape"/>
<addaction name="actionStaticFlatLandscape"/>
<addaction name="actionExactLandscape"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuTools"/>
<addaction name="menuPlayers"/>
<addaction name="menuWindows"/>
<addaction name="menuNet"/>
@ -727,7 +749,10 @@
<normalon>:/editor/res/Play_Trans.png</normalon>:/editor/res/Play_Trans.png</iconset>
</property>
<property name="text">
<string>PLAY</string>
<string comment="res">IDS_MNU_PLAY</string>
</property>
<property name="iconText">
<string comment="res">IDS_MNU_PLAY</string>
</property>
<property name="toolTip">
<string comment="res">IDS_TEXT_UNPAUSETHEGAME</string>
@ -742,11 +767,17 @@
<normaloff>:/editor/res/Halt_Trans.png</normaloff>:/editor/res/Halt_Trans.png</iconset>
</property>
<property name="text">
<string>PAUSE</string>
<string comment="res">IDS_MNU_PAUSE</string>
</property>
<property name="iconText">
<string comment="res">IDS_MNU_PAUSE</string>
</property>
<property name="toolTip">
<string comment="res">IDS_TEXT_PAUSETHEGAME</string>
</property>
<property name="shortcut">
<string>Pause</string>
</property>
</action>
<action name="actionCursorGame">
<property name="checkable">
@ -757,10 +788,16 @@
<normaloff>:/editor/res/Mouse_Trans.png</normaloff>:/editor/res/Mouse_Trans.png</iconset>
</property>
<property name="text">
<string>CURSOR_GAME</string>
<string comment="res">IDS_MNU_CURSOR_GAME</string>
</property>
<property name="iconText">
<string comment="res">IDS_MNU_CURSOR_GAME</string>
</property>
<property name="toolTip">
<string>CURSOR_GAME_TIP</string>
<string comment="res">IDS_TEXT_CURSOR_GAME</string>
</property>
<property name="shortcut">
<string>1</string>
</property>
</action>
<action name="actionCursorSelect">
@ -772,10 +809,16 @@
<normaloff>:/editor/res/Cursor_Trans.png</normaloff>:/editor/res/Cursor_Trans.png</iconset>
</property>
<property name="text">
<string>CURSOR_SELECT</string>
<string comment="res">IDS_MNU_CURSOR_SELECT</string>
</property>
<property name="iconText">
<string comment="res">IDS_MNU_CURSOR_SELECT</string>
</property>
<property name="toolTip">
<string>CURSOR_SELECT_TIP</string>
<string comment="res">IDS_TEXT_CURSOR_SELECT</string>
</property>
<property name="shortcut">
<string>2</string>
</property>
</action>
<action name="actionCursorDrawPen">
@ -787,10 +830,16 @@
<normaloff>:/editor/res/Brush_Trans.png</normaloff>:/editor/res/Brush_Trans.png</iconset>
</property>
<property name="text">
<string>CURSOR_DRAWPEN</string>
<string comment="res">IDS_MNU_CURSOR_DRAWPEN</string>
</property>
<property name="iconText">
<string comment="res">IDS_MNU_CURSOR_DRAWPEN</string>
</property>
<property name="toolTip">
<string>CURSOR_DRAWPEN_TIP</string>
<string comment="res">IDS_TEXT_CURSOR_DRAWPEN</string>
</property>
<property name="shortcut">
<string>4</string>
</property>
</action>
<action name="actionCursorDrawLine">
@ -802,10 +851,16 @@
<normaloff>:/editor/res/Line_Trans.png</normaloff>:/editor/res/Line_Trans.png</iconset>
</property>
<property name="text">
<string>CURSOR_DRAWLINE</string>
<string comment="res">IDS_MNU_CURSOR_DRAWLINE</string>
</property>
<property name="iconText">
<string comment="res">IDS_MNU_CURSOR_DRAWLINE</string>
</property>
<property name="toolTip">
<string>CURSOR_DRAWLINETIP</string>
<string comment="res">IDS_TEXT_CURSOR_DRAWLINE</string>
</property>
<property name="shortcut">
<string>5</string>
</property>
</action>
<action name="actionCursorDrawRect">
@ -817,10 +872,16 @@
<normaloff>:/editor/res/Rect_Trans.png</normaloff>:/editor/res/Rect_Trans.png</iconset>
</property>
<property name="text">
<string>CURSOR_DRAWRECT</string>
<string comment="res">IDS_MNU_CURSOR_DRAWRECT</string>
</property>
<property name="iconText">
<string comment="res">IDS_MNU_CURSOR_DRAWRECT</string>
</property>
<property name="toolTip">
<string>CURSOR_DRAWRECT_TIP</string>
<string comment="res">IDS_TEXT_CURSOR_DRAWRECT</string>
</property>
<property name="shortcut">
<string>6</string>
</property>
</action>
<action name="actionCursorPicker">
@ -832,10 +893,16 @@
<normaloff>:/editor/res/Picker_Trans.png</normaloff>:/editor/res/Picker_Trans.png</iconset>
</property>
<property name="text">
<string>CURSOR_DRAWPICKER</string>
<string comment="res">IDS_MNU_CURSOR_DRAWPICKER</string>
</property>
<property name="iconText">
<string comment="res">IDS_MNU_CURSOR_DRAWPICKER</string>
</property>
<property name="toolTip">
<string>CURSOR_DRAWPICKER_TIP</string>
<string comment="res">IDS_TEXT_CURSOR_DRAWPICKER</string>
</property>
<property name="shortcut">
<string>8</string>
</property>
</action>
<action name="actionDynamicLandscape">
@ -847,10 +914,13 @@
<normaloff>:/editor/res/Dynamic_Trans.png</normaloff>:/editor/res/Dynamic_Trans.png</iconset>
</property>
<property name="text">
<string>MAP_DYNAMIC</string>
<string comment="res">IDS_MNU_MAP_DYNAMIC</string>
</property>
<property name="iconText">
<string comment="res">IDS_MNU_MAP_DYNAMIC</string>
</property>
<property name="toolTip">
<string>MAP_DYNAMIC_TIP</string>
<string comment="res">IDS_TEXT_MAP_DYNAMIC</string>
</property>
</action>
<action name="actionStaticLandscape">
@ -862,10 +932,16 @@
<normaloff>:/editor/res/Static_Trans.png</normaloff>:/editor/res/Static_Trans.png</iconset>
</property>
<property name="text">
<string>MAP_STATIC</string>
<string comment="res">IDS_MNU_MAP_STATIC</string>
</property>
<property name="iconText">
<string comment="res">IDS_MNU_MAP_STATIC</string>
</property>
<property name="toolTip">
<string>MAP_STATIC_TIP</string>
<string comment="res">IDS_TEXT_MAP_STATIC</string>
</property>
<property name="shortcut">
<string>F3</string>
</property>
</action>
<action name="actionExactLandscape">
@ -877,10 +953,13 @@
<normaloff>:/editor/res/Exact_Trans.png</normaloff>:/editor/res/Exact_Trans.png</iconset>
</property>
<property name="text">
<string>MAP_EXACT</string>
<string comment="res">IDS_MNU_MAP_EXACT</string>
</property>
<property name="iconText">
<string comment="res">IDS_MNU_MAP_EXACT</string>
</property>
<property name="toolTip">
<string>MAP_EXACT_TIP</string>
<string comment="res">IDS_TEXT_MAP_EXACT</string>
</property>
</action>
<action name="actionCursorFill">
@ -892,10 +971,16 @@
<normaloff>:/editor/res/Fill_Trans.png</normaloff>:/editor/res/Fill_Trans.png</iconset>
</property>
<property name="text">
<string>CURSOR_DRAWFILL</string>
<string comment="res">IDS_MNU_CURSOR_DRAWFILL</string>
</property>
<property name="iconText">
<string comment="res">IDS_MNU_CURSOR_DRAWFILL</string>
</property>
<property name="toolTip">
<string>CURSOR_DRAWFILL_TIP</string>
<string comment="res">IDS_TEXT_CURSOR_DRAWFILL</string>
</property>
<property name="shortcut">
<string>7</string>
</property>
</action>
<action name="actionViewportNew">
@ -910,6 +995,9 @@
<property name="toolTip">
<string>IDS_MNU_OPEN</string>
</property>
<property name="shortcut">
<string>Ctrl+O</string>
</property>
</action>
<action name="actionFileOpenWithPlayers">
<property name="text">
@ -928,11 +1016,17 @@
<property name="text">
<string comment="res">IDS_MNU_SAVESCENARIO</string>
</property>
<property name="shortcut">
<string>Ctrl+S</string>
</property>
</action>
<action name="actionFileSaveScenarioAs">
<property name="text">
<string comment="res">IDS_MNU_SAVESCENARIOAS</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+S</string>
</property>
</action>
<action name="actionFileSaveGameAs">
<property name="text">
@ -943,11 +1037,17 @@
<property name="text">
<string comment="res">IDS_MNU_CLOSE</string>
</property>
<property name="shortcut">
<string>Ctrl+W</string>
</property>
</action>
<action name="actionFileQuit">
<property name="text">
<string comment="res">IDS_MNU_QUIT</string>
</property>
<property name="shortcut">
<string>Ctrl+Q</string>
</property>
</action>
<action name="actionPlayerJoin">
<property name="text">
@ -968,10 +1068,16 @@
<normaloff>:/editor/res/CreateObj_Trans.png</normaloff>:/editor/res/CreateObj_Trans.png</iconset>
</property>
<property name="text">
<string>CURSOR_CREATEOBJ</string>
<string comment="res">IDS_MNU_CURSOR_CREATOR</string>
</property>
<property name="iconText">
<string comment="res">IDS_MNU_CURSOR_CREATOR</string>
</property>
<property name="toolTip">
<string>CURSOR_CREATEOBJ_TIP</string>
<string comment="res">IDS_TEXT_CURSOR_CREATOR</string>
</property>
<property name="shortcut">
<string>3</string>
</property>
</action>
<action name="actionFileNew">
@ -994,10 +1100,16 @@
<normaloff>:/editor/res/StaticFlat_Trans.png</normaloff>:/editor/res/StaticFlat_Trans.png</iconset>
</property>
<property name="text">
<string>MAP_STATICFLAT</string>
<string comment="res">IDS_MNU_MAP_STATICFLAT</string>
</property>
<property name="iconText">
<string comment="res">IDS_MNU_MAP_STATICFLAT</string>
</property>
<property name="toolTip">
<string>MAP_STATICFLAT_TIP</string>
<string comment="res">IDS_TEXT_MAP_STATICFLAT</string>
</property>
<property name="shortcut">
<string>Shift+F3</string>
</property>
</action>
<action name="actionDeleteObject">

View File

@ -121,7 +121,6 @@ public:
int ExecRecursionCheck::counter = 0;
/* Console main window */
C4ConsoleQtMainWindow::C4ConsoleQtMainWindow(C4AbstractApp *app, C4ConsoleGUIState *state)
@ -194,8 +193,8 @@ void C4ConsoleQtMainWindow::PausePressed(bool down)
{
if (down)
::Console.DoHalt();
else // cannot un-check by pressing again
state->ui.actionPause->setChecked(true);
else // can un-check by pressing again!
::Console.DoPlay();
}
void C4ConsoleQtMainWindow::CursorGamePressed(bool down)
@ -500,7 +499,7 @@ void C4ConsoleQtMainWindow::SelectionEjectContents()
C4ConsoleGUIState::C4ConsoleGUIState(C4ConsoleGUI *console) : viewport_area(NULL),
enabled(false), recording(false), net_enabled(false), landscape_mode(LandscapeMode::Dynamic), flat_chunk_shapes(false),
editcursor_mode(C4CNS_ModePlay), drawing_tool(C4TLS_Brush), is_object_selection_updating(0)
editcursor_mode(C4CNS_ModePlay), drawing_tool(C4TLS_Brush), is_object_selection_updating(0), disable_shortcut_filter(new C4DisableShortcutFilter(nullptr))
{
}
@ -589,6 +588,9 @@ bool C4ConsoleGUIState::CreateConsoleWindow(C4AbstractApp *app)
// Default action state
ui.actionHelp->setChecked(::Config.Developer.ShowHelp);
// Disable some shortcuts on actions that are handled internally
// (none right now)
// Property editor
property_delegate_factory.reset(new C4PropertyDelegateFactory());
ui.propertyTable->setItemDelegateForColumn(1, property_delegate_factory.get());

View File

@ -77,6 +77,22 @@ public:
void Execute();
};
/* Disable shortcut on some actions */
class C4DisableShortcutFilter : public QObject
{
Q_OBJECT
public:
C4DisableShortcutFilter(QObject *parent) : QObject(parent) {}
bool eventFilter(QObject *target, QEvent *event)
{
if (event->type() == QEvent::Shortcut) return true;
return QObject::eventFilter(target, event);
}
};
class C4ConsoleQtMainWindow : public QMainWindow
{
Q_OBJECT
@ -165,6 +181,7 @@ public:
std::unique_ptr<class C4PropertyNameDelegate> property_name_delegate;
std::unique_ptr<class C4ConsoleQtObjectListModel> object_list_model;
std::unique_ptr<class C4ConsoleQtDefinitionListModel> definition_list_model;
std::unique_ptr<class C4DisableShortcutFilter> disable_shortcut_filter;
std::list<class C4ConsoleQtViewportDockWidget *> viewports;
std::list<std::unique_ptr<C4ConsoleClientAction> > client_actions;
std::list<std::unique_ptr<C4ConsoleRemovePlayerAction> > player_actions;