فهرست منبع

Editor: Prettified shortcuts. (#28466)

mrdoob 1 سال پیش
والد
کامیت
10d442fdaf
3فایلهای تغییر یافته به همراه27 افزوده شده و 13 حذف شده
  1. 11 0
      editor/css/main.css
  2. 4 1
      editor/js/Menubar.Edit.js
  3. 12 12
      editor/js/Strings.js

+ 11 - 0
editor/css/main.css

@@ -377,6 +377,17 @@ select {
 			line-height: 16px;
 		}
 
+		#menubar .menu .key {
+			position: absolute;
+			right: 10px;
+			color: #ccc;
+			border: 1px solid #ccc;
+			border-radius: 4px;
+			font-size: 9px;
+			padding: 2px 4px;
+			right: 10px;
+		}
+
 		#menubar .menu .options {
 			position: fixed;
 			z-index: 1; /* higher than resizer */

+ 4 - 1
editor/js/Menubar.Edit.js

@@ -1,6 +1,6 @@
 import { Box3, Vector3 } from 'three';
 
-import { UIPanel, UIRow, UIHorizontalRule } from './libs/ui.js';
+import { UIPanel, UIRow, UIHorizontalRule, UIText } from './libs/ui.js';
 
 import { AddObjectCommand } from './commands/AddObjectCommand.js';
 import { RemoveObjectCommand } from './commands/RemoveObjectCommand.js';
@@ -28,6 +28,7 @@ function MenubarEdit( editor ) {
 	const undo = new UIRow();
 	undo.setClass( 'option' );
 	undo.setTextContent( strings.getKey( 'menubar/edit/undo' ) );
+	undo.add( new UIText( 'CTRL+Z' ).setClass( 'key' ) );
 	undo.onClick( function () {
 
 		editor.undo();
@@ -40,6 +41,7 @@ function MenubarEdit( editor ) {
 	const redo = new UIRow();
 	redo.setClass( 'option' );
 	redo.setTextContent( strings.getKey( 'menubar/edit/redo' ) );
+	redo.add( new UIText( 'CTRL+SHIFT+Z' ).setClass( 'key' ) );
 	redo.onClick( function () {
 
 		editor.redo();
@@ -122,6 +124,7 @@ function MenubarEdit( editor ) {
 	option = new UIRow();
 	option.setClass( 'option' );
 	option.setTextContent( strings.getKey( 'menubar/edit/delete' ) );
+	option.add( new UIText( 'DEL' ).setClass( 'key' ) );
 	option.onClick( function () {
 
 		const object = editor.selected;

+ 12 - 12
editor/js/Strings.js

@@ -52,11 +52,11 @@ function Strings( config ) {
 			'menubar/file/export': 'Export',
 
 			'menubar/edit': 'Edit',
-			'menubar/edit/undo': 'Undo (Ctrl+Z)',
-			'menubar/edit/redo': 'Redo (Ctrl+Shift+Z)',
+			'menubar/edit/undo': 'Undo',
+			'menubar/edit/redo': 'Redo',
 			'menubar/edit/center': 'Center',
 			'menubar/edit/clone': 'Clone',
-			'menubar/edit/delete': 'Delete (Del)',
+			'menubar/edit/delete': 'Delete',
 
 			'menubar/add': 'Add',
 			'menubar/add/group': 'Group',
@@ -441,11 +441,11 @@ function Strings( config ) {
 			'menubar/file/export': 'Exporter',
 
 			'menubar/edit': 'Edition',
-			'menubar/edit/undo': 'Annuler (Ctrl+Z)',
-			'menubar/edit/redo': 'Refaire (Ctrl+Shift+Z)',
+			'menubar/edit/undo': 'Annuler',
+			'menubar/edit/redo': 'Refaire',
 			'menubar/edit/center': 'Center',
 			'menubar/edit/clone': 'Cloner',
-			'menubar/edit/delete': 'Supprimer (Supp)',
+			'menubar/edit/delete': 'Supprimer',
 
 			'menubar/add': 'Ajouter',
 			'menubar/add/group': 'Groupe',
@@ -830,11 +830,11 @@ function Strings( config ) {
 			'menubar/file/export': '导出',
 
 			'menubar/edit': '编辑',
-			'menubar/edit/undo': '撤销 (Ctrl+Z)',
-			'menubar/edit/redo': '重做 (Ctrl+Shift+Z)',
+			'menubar/edit/undo': '撤销',
+			'menubar/edit/redo': '重做',
 			'menubar/edit/center': '居中',
 			'menubar/edit/clone': '拷贝',
-			'menubar/edit/delete': '删除 (Del)',
+			'menubar/edit/delete': '删除',
 
 			'menubar/add': '添加',
 			'menubar/add/group': '组',
@@ -1219,11 +1219,11 @@ function Strings( config ) {
 			'menubar/file/export': 'エクスポート',
 
 			'menubar/edit': '編集',
-			'menubar/edit/undo': '元に戻す(Ctrl+Z)',
-			'menubar/edit/redo': 'やり直す(Ctrl+Shift+Z)',
+			'menubar/edit/undo': '元に戻す',
+			'menubar/edit/redo': 'やり直す',
 			'menubar/edit/center': '中央揃え',
 			'menubar/edit/clone': '複製',
-			'menubar/edit/delete': '削除(Del)',
+			'menubar/edit/delete': '削除',
 
 			'menubar/add': '追加',
 			'menubar/add/group': 'グループ',