-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae10018
commit 4e05710
Showing
52 changed files
with
6,724 additions
and
13,268 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#ifndef PATHWORK | ||
#define PATHWORK | ||
|
||
#include "../GUI/feathergui.h" | ||
|
||
std::string getCurrentPath(); | ||
|
||
std::string getNormalizedPath(); | ||
|
||
#ifdef WINDOWS_SO | ||
std::string browseFile(HWND hwnd); | ||
std::string browseFolder(HWND hwnd, int _option); | ||
#endif | ||
|
||
#ifdef LINUX_SO | ||
std::string browse(); | ||
#endif | ||
|
||
|
||
#endif |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#include "../feathergui.h" | ||
|
||
void FeatherGUI::BuildConfigMenu() { | ||
//PLACEMENT CONFIG WINDOW | ||
ImGui::Begin("Placement Config", &this->placementConfig, ImGuiWindowFlags_AlwaysAutoResize); | ||
//Create a slider for the toolsPanelPercentage | ||
ImGui::SliderInt("Tools Panel Pixels", &this->toolsPanelPixels, 32, 128); | ||
//Create a slider for the propertiesPanelPercentage | ||
ImGui::SliderInt("Properties Panel Pixels", &this->propertiesPanelPixels, 128, 512); | ||
|
||
float color[4] = { GetBackGroundColor().r,GetBackGroundColor().g, GetBackGroundColor().b, 1.0F }; | ||
//Change background color | ||
ImGui::ColorEdit3("Background Color", color); | ||
SetBackGroundColor(color[0], color[1], color[2]); | ||
|
||
//Separator | ||
ImGui::Separator(); | ||
ImGui::Text("Rounding Options"); | ||
ImGui::SliderFloat("windowRounding", &this->windowRounding, 0.0F, 10.0F); | ||
ImGui::SameLine(); | ||
HelpMarker("Disable rounding by setting this to 0.0"); | ||
//Disable options rounding | ||
ImGui::Checkbox("Options Rounding", &this->disableOptionsRounding); | ||
if (this->disableOptionsRounding) { | ||
ImGui::GetStyle().FrameRounding = 0.0F; | ||
} | ||
else | ||
{ | ||
ImGui::GetStyle().FrameRounding = 5.0F; | ||
} | ||
//Enable/disable sync | ||
bool tempsync = this->Vsync; | ||
ImGui::Checkbox("Vertical Sync", &tempsync); | ||
if (tempsync != this->Vsync) { | ||
this->SetSync(tempsync); | ||
} | ||
ImGui::End(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#include "../feathergui.h" | ||
|
||
void FeatherGUI::BuildConsoleDebugMenu() { | ||
//DEBUG CONSOLE WINDOW | ||
//Set max size of the window to 1/4 of the screen | ||
ImGui::SetNextWindowSize(ImVec2(this->io->DisplaySize.x / 4, this->io->DisplaySize.y / 2), ImGuiCond_Always); | ||
ImGui::Begin("Debug Console", &this->debugConsole, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_AlwaysAutoResize); | ||
//FPS | ||
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate); | ||
//Print the mouse | ||
ImGui::Text("Mouse Position: (%d, %d)", this->MouseImagePositionX, this->MouseImagePositionY); | ||
//Slider int | ||
ImGui::Text("Movement X: %d", this->imageShiftX); | ||
ImGui::Text("Movement Y: %d", this->imageShiftY); | ||
//Print the zoom | ||
ImGui::Text("Zoom: %.2f", this->zoom); | ||
//Print the maximun zoom | ||
ImGui::Text("Max Zoom: %.2f", this->maxZoom); | ||
//Print the minimun zoom | ||
ImGui::Text("Min Zoom: %.2f", this->minZoom); | ||
|
||
|
||
ImGui::Separator(); | ||
|
||
//if (ss.str().c_str() != NULL) { | ||
// //Get time and add a time mark using localtime_s | ||
// time_t rawtime; | ||
// struct tm now; | ||
// char timeMark[80]; | ||
// time(&rawtime); | ||
// localtime_s(&now, &rawtime); | ||
// strftime(timeMark, 80, "%H:%M:%S", &now); | ||
//} | ||
|
||
|
||
ImGui::Text("%s", ss.str().c_str()); | ||
ImGui::End(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include "../feathergui.h" | ||
|
||
void FeatherGUI::ErrorWindowCreateImage() { | ||
if (this->errorWindowCreateImage) { | ||
ImGui::OpenPopup("Error Creating Image"); | ||
// Always center this window when appearing | ||
ImVec2 center = ImGui::GetMainViewport()->GetCenter(); | ||
ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f)); | ||
|
||
//Show a BeginPopupModal dialog with error message "The size of the Image must be greater than 0. Also it need to have a name!\n\n" | ||
if (ImGui::BeginPopupModal("Error Creating Image", NULL, ImGuiWindowFlags_AlwaysAutoResize)) | ||
{ | ||
ImGui::SetItemDefaultFocus(); | ||
ImGui::Text("Some of the following things were wrong: \n\n-> The size of the Image must be greater than 0.\n-> It need to have a name.\n\n"); | ||
//ImGui::Separator(); | ||
|
||
if (ImGui::Button("OK")) { | ||
this->errorWindowCreateImage = false; | ||
ImGui::CloseCurrentPopup(); | ||
} | ||
ImGui::EndPopup(); | ||
} | ||
} | ||
} |
Oops, something went wrong.