瀏覽代碼

Use the Unicode multiplication symbol for the viewport size display

Hugo Locurcio 4 年之前
父節點
當前提交
8592620a8e
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      editor/plugins/spatial_editor_plugin.cpp

+ 3 - 3
editor/plugins/spatial_editor_plugin.cpp

@@ -2456,6 +2456,7 @@ void SpatialEditorViewport::_notification(int p_what) {
 		}
 		}
 
 
 		if (show_info) {
 		if (show_info) {
+			const String viewport_size = vformat(String::utf8("%d × %d"), viewport->get_size().x, viewport->get_size().y);
 			String text;
 			String text;
 			text += "X: " + rtos(current_camera->get_translation().x).pad_decimals(1) + "\n";
 			text += "X: " + rtos(current_camera->get_translation().x).pad_decimals(1) + "\n";
 			text += "Y: " + rtos(current_camera->get_translation().y).pad_decimals(1) + "\n";
 			text += "Y: " + rtos(current_camera->get_translation().y).pad_decimals(1) + "\n";
@@ -2465,9 +2466,8 @@ void SpatialEditorViewport::_notification(int p_what) {
 
 
 			text += TTR("Size") +
 			text += TTR("Size") +
 					vformat(
 					vformat(
-							": %dx%d (%.1fMP)\n",
-							viewport->get_size().x,
-							viewport->get_size().y,
+							": %s (%.1fMP)\n",
+							viewport_size,
 							viewport->get_size().x * viewport->get_size().y * 0.000'001);
 							viewport->get_size().x * viewport->get_size().y * 0.000'001);
 			text += TTR("Objects Drawn") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_OBJECTS_IN_FRAME)) + "\n";
 			text += TTR("Objects Drawn") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_OBJECTS_IN_FRAME)) + "\n";
 			text += TTR("Material Changes") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_MATERIAL_CHANGES_IN_FRAME)) + "\n";
 			text += TTR("Material Changes") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_MATERIAL_CHANGES_IN_FRAME)) + "\n";