[studio] Make rename file accept input upon pressing Enter if text input is focused
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Build / build (push) Successful in 3m36s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Build / build (push) Successful in 3m36s
				
			This commit is contained in:
		@@ -50,8 +50,10 @@ void RenameFile::draw(StudioContext &ctx) noexcept {
 | 
			
		||||
					ImGui::SetKeyboardFocusHere();
 | 
			
		||||
				}
 | 
			
		||||
				ig::InputText("Name", m_name);
 | 
			
		||||
				auto const nameInputFocused = ImGui::IsItemFocused();
 | 
			
		||||
				ImGui::Text("%s%s", m_path.c_str(), m_name.c_str());
 | 
			
		||||
				if (ig::PopupControlsOkCancel(m_open) == ig::PopupResponse::OK) {
 | 
			
		||||
				if (ig::PopupControlsOkCancel(m_open) == ig::PopupResponse::OK ||
 | 
			
		||||
				    (nameInputFocused && ImGui::IsKeyPressed(ImGuiKey_Enter))) {
 | 
			
		||||
					moveFile.emit(m_oldPath, m_path + m_name);
 | 
			
		||||
					close();
 | 
			
		||||
				}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user