Skip to content

Commit 8762587

Browse files
authored
Merge pull request #9 from bigasdev/dev
v1.1
2 parents 3063407 + b7ace49 commit 8762587

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ bld/
4444
# Uncomment if you have tasks that create the project's static files in wwwroot
4545
#wwwroot/
4646

47+
*.zip
48+
4749
# Visual Studio 2017 auto generated files
4850
Generated\ Files/
4951

config.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ relative_name=null
6565
relative_x=340
6666
relative_y=160
6767
[config]
68-
lastWriteTime=-4721858902000000000
68+
lastWriteTime=-4720830621000000000
6969
[file]
7070
fileName=config.ini
7171
name=file

src/Scenes/MainScene.cpp

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ std::vector<FileEntity*> m_selected_files;
1515

1616
static const char* m_selected_width = "800";
1717
static const char* m_selected_quality = "5";
18+
static const char* m_selected_fps = "20";
1819

1920
std::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
9697
void 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

Comments
 (0)