fixed file select and folder select widget bug

This commit is contained in:
Ryzerth
2021-02-11 15:29:51 +01:00
parent c90772666e
commit 3422998bd1
4 changed files with 29 additions and 11 deletions

View File

@ -11,8 +11,8 @@ FileSelect::FileSelect(std::string defaultPath) {
bool FileSelect::render(std::string id) {
bool _pathChanged = false;
#ifdef _WIN32
float menuColumnWidth = ImGui::GetContentRegionAvailWidth();
#ifdef _WIN32
float buttonWidth = ImGui::CalcTextSize("...").x + 20.0f;
bool lastPathValid = pathValid;
if (!lastPathValid) {

View File

@ -9,8 +9,8 @@ FolderSelect::FolderSelect(std::string defaultPath) {
bool FolderSelect::render(std::string id) {
bool _pathChanged = false;
#ifdef _WIN32
float menuColumnWidth = ImGui::GetContentRegionAvailWidth();
#ifdef _WIN32
float buttonWidth = ImGui::CalcTextSize("...").x + 20.0f;
bool lastPathValid = pathValid;
if (!lastPathValid) {