update chinese UI
							parent
							
								
									3c1b0b8451
								
							
						
					
					
						commit
						dc58fbad2b
					
				| 
						 | 
					@ -1688,9 +1688,9 @@ PlumageRender::PlumageRender()
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if(gui->beginMainMenuBar()) {
 | 
							if(gui->beginMainMenuBar()) {
 | 
				
			||||||
			if (gui->beginMenu("file"))
 | 
								if (gui->beginMenu(chineseUI.menuFile))
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				if (gui->menuItem("open"))
 | 
									if (gui->menuItem(chineseUI.menuOpenNewModel))
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					std::wstring filename = L"";
 | 
										std::wstring filename = L"";
 | 
				
			||||||
					wchar_t buffer[MAX_PATH];
 | 
										wchar_t buffer[MAX_PATH];
 | 
				
			||||||
| 
						 | 
					@ -1719,9 +1719,9 @@ PlumageRender::PlumageRender()
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				gui->endMenu();
 | 
									gui->endMenu();
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			if (gui->beginMenu("environment"))
 | 
								if (gui->beginMenu(chineseUI.menuEnvironment))
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				if (gui->beginMenu("config"))
 | 
									if (gui->beginMenu(chineseUI.menuEnvironmentConfig))
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					if (gui->combo(chineseUI.environmentMap, selectedEnvironment, environments)) {
 | 
										if (gui->combo(chineseUI.environmentMap, selectedEnvironment, environments)) {
 | 
				
			||||||
						vkDeviceWaitIdle(device);
 | 
											vkDeviceWaitIdle(device);
 | 
				
			||||||
| 
						 | 
					@ -1729,7 +1729,7 @@ PlumageRender::PlumageRender()
 | 
				
			||||||
						setupDescriptors();
 | 
											setupDescriptors();
 | 
				
			||||||
						updateCBs = true;
 | 
											updateCBs = true;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					if (gui->checkbox("Background", &displayBackground)) {
 | 
										if (gui->checkbox(chineseUI.environmentBackGround, &displayBackground)) {
 | 
				
			||||||
						updateShaderParams = true;
 | 
											updateShaderParams = true;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					if (gui->slider("Exposure", &shaderData.exposure, 0.1f, 10.0f)) {
 | 
										if (gui->slider("Exposure", &shaderData.exposure, 0.1f, 10.0f)) {
 | 
				
			||||||
| 
						 | 
					@ -1747,7 +1747,7 @@ PlumageRender::PlumageRender()
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			if (gui->beginMenu("debug")) 
 | 
								if (gui->beginMenu("debug")) 
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				if (gui->beginMenu("input"))
 | 
									if (gui->beginMenu(chineseUI.menuDebugInput))
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					const std::vector<std::string> debugNamesInputs = {
 | 
										const std::vector<std::string> debugNamesInputs = {
 | 
				
			||||||
				"none", "Base color", "Normal", "Occlusion", "Emissive", "Metallic", "Roughness"
 | 
									"none", "Base color", "Normal", "Occlusion", "Emissive", "Metallic", "Roughness"
 | 
				
			||||||
| 
						 | 
					@ -1769,23 +1769,23 @@ PlumageRender::PlumageRender()
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					gui->endMenu();
 | 
										gui->endMenu();
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				if (gui->beginMenu("frame rate"))
 | 
									if (gui->beginMenu(chineseUI.menuDebugFrameRate))
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					gui->text("%.1d fps (%.2f ms)", lastFPS, (1000.0f / lastFPS));
 | 
										gui->text("%.1d fps (%.2f ms)", lastFPS, (1000.0f / lastFPS));
 | 
				
			||||||
					gui->endMenu();
 | 
										gui->endMenu();
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				gui->endMenu();
 | 
									gui->endMenu();
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			if (gui->beginMenu("animation"))
 | 
								if (gui->beginMenu(chineseUI.menuAnimation))
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				if (models.scene.animations.size() > 0) 
 | 
									if (models.scene.animations.size() > 0) 
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					if (gui->beginMenu("activation"))
 | 
										if (gui->beginMenu(chineseUI.menuAnimationActivation))
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						gui->checkbox(chineseUI.pauseAnimation, &animate);
 | 
											gui->checkbox(chineseUI.pauseAnimation, &animate);
 | 
				
			||||||
						gui->endMenu();
 | 
											gui->endMenu();
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					if (gui->beginMenu("anmation sequence"))
 | 
										if (gui->beginMenu(chineseUI.menuAnimationAnimationSequence))
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						std::vector<std::string> animationNames;
 | 
											std::vector<std::string> animationNames;
 | 
				
			||||||
						for (auto animation : models.scene.animations) {
 | 
											for (auto animation : models.scene.animations) {
 | 
				
			||||||
| 
						 | 
					@ -1797,7 +1797,7 @@ PlumageRender::PlumageRender()
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				else
 | 
									else
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					gui->text("no animation in loaded model");
 | 
										gui->text(chineseUI.menuAnimationNoAnimation);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				gui->endMenu();
 | 
									gui->endMenu();
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -65,14 +65,27 @@ public:
 | 
				
			||||||
	struct ChinesesUI
 | 
						struct ChinesesUI
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		const char * model = "模型";
 | 
							const char * model = "模型";
 | 
				
			||||||
		const char* openNewModel = "打开新gltf模型";
 | 
							
 | 
				
			||||||
		const char* environmentMap = "环境贴图";
 | 
							const char* environmentMap = "环境贴图";
 | 
				
			||||||
		const char* environment = "环境光照";
 | 
							//const char* environment = "环境光照";
 | 
				
			||||||
		const char* debugInput = "输入";
 | 
							const char* debugInput = "输入";
 | 
				
			||||||
		const char* debugPBREquation = "PBR计算参数";
 | 
							const char* debugPBREquation = "PBR计算参数";
 | 
				
			||||||
		const char* animation = "动画";
 | 
							const char* animation = "动画";
 | 
				
			||||||
		const char* pauseAnimation = "启用动画";
 | 
							const char* pauseAnimation = "启用动画";
 | 
				
			||||||
		const char* animationSeq = "动画序列";
 | 
							const char* animationSeq = "动画序列";
 | 
				
			||||||
 | 
					// menu item
 | 
				
			||||||
 | 
							const char* menuFile = "文件";
 | 
				
			||||||
 | 
							const char* menuOpenNewModel = "新模型..";
 | 
				
			||||||
 | 
							const char* menuEnvironment = "环境光照";
 | 
				
			||||||
 | 
							const char* menuEnvironmentConfig = "设置";
 | 
				
			||||||
 | 
							const char* menuAnimation = "动画";
 | 
				
			||||||
 | 
							const char* menuDebugFrameRate = "帧率";
 | 
				
			||||||
 | 
							const char* menuDebugInput = "输入";
 | 
				
			||||||
 | 
							const char* menuAnimationNoAnimation = "当前模型没有动画!";
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							const char* menuAnimationActivation = "开关";
 | 
				
			||||||
 | 
							const char* menuAnimationAnimationSequence = "动画序列";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	}chineseUI;
 | 
						}chineseUI;
 | 
				
			||||||
	struct UniformBufferSet {
 | 
						struct UniformBufferSet {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue