@@ -15,6 +15,7 @@ std::vector<FileEntity*> m_selected_files;
1515
1616static const char * m_selected_width = " 800" ;
1717static const char * m_selected_quality = " 5" ;
18+ static const char * m_selected_fps = " 20" ;
1819
1920std::atomic<bool > is_convertion_running (false );
2021
@@ -95,6 +96,13 @@ void MainScene::init()
9596// Convert command so we can attach it to another thread
9697void convert_command (const std::string& strCmdText) {
9798 system ((" CMD.exe " + strCmdText).c_str ());
99+
100+ if (m_folder_path != " " ){
101+ // open the folder path
102+ std::string command = " explorer " + m_folder_path;
103+ system (command.c_str ());
104+ }
105+
98106 is_convertion_running = false ;
99107}
100108
@@ -105,7 +113,7 @@ void convert_file(std::string file){
105113 std::string filenameWithoutExtension = filename.substr (0 , filename.find_last_of (" ." ));
106114
107115
108- std::string command = " -w " + std::string (m_selected_width) + " -q " + m_selected_quality + " -o \" " + m_folder_path + " \\ " + filenameWithoutExtension + " .gif\" " ; // Default command
116+ std::string command = " -w " + std::string (m_selected_width) + " -f " + m_selected_fps + " - q " + m_selected_quality + " -o \" " + m_folder_path + " \\ " + filenameWithoutExtension + " .gif\" " ; // Default command
109117
110118 // std::string command = "-w 1024 -q 6 -o \"" + m_folder_path + "\\" + filenameWithoutExtension + ".gif\""; // Default command
111119 std::cout << command << std::endl;
@@ -221,6 +229,7 @@ void video_settings(){
221229 ImGui::Text (" Video Settings" );
222230 const char * width[] = { " 200" , " 400" , " 600" , " 800" , " 1024" };
223231 const char * quality[] = { " 1" , " 2" , " 3" , " 4" , " 5" , " 6" };
232+ const char * fps[] = { " 10" , " 15" , " 20" , " 25" , " 30" , " 35" , " 40" , " 45" };
224233 ImGui::Text (" Gif Width:" );
225234 if (ImGui::BeginCombo (" ##select_width" , m_selected_width)) // The second parameter is the label previewed before opening the combo.
226235 {
@@ -247,6 +256,19 @@ void video_settings(){
247256 }
248257 ImGui::EndCombo ();
249258 }
259+ ImGui::Text (" Gif FPS:" );
260+ if (ImGui::BeginCombo (" ##select_fps" , m_selected_fps)) // The second parameter is the label previewed before opening the combo.
261+ {
262+ for (int n = 0 ; n < IM_ARRAYSIZE (fps); n++)
263+ {
264+ bool is_selected = (m_selected_fps == fps[n]); // You can store your selection however you want, outside or inside your objects
265+ if (ImGui::Selectable (fps[n], is_selected))
266+ m_selected_fps = fps[n];
267+ if (is_selected)
268+ ImGui::SetItemDefaultFocus (); // You may set the initial focus when opening the combo (scrolling + for keyboard navigation support)
269+ }
270+ ImGui::EndCombo ();
271+ }
250272 ImGui::End ();
251273
252274}
0 commit comments