Added scroll to sliders

This commit is contained in:
Ryzerth
2021-02-07 12:30:25 +01:00
parent c26855d07e
commit 9def1843b2
10 changed files with 198 additions and 16 deletions

View File

@@ -0,0 +1,34 @@
#pragma once
#include <imgui.h>
#include <imgui_internal.h>
#include <stdint.h>
#include <string>
#ifdef _WIN32
#include <Windows.h>
#include <thread>
#endif
class FileSelect {
public:
FileSelect(std::string defaultPath, char* filter = "All\0*.*");
void render(std::string id);
bool pathIsValid();
bool pathChanged();
std::string expandString(std::string input);
std::string path = "";
private:
#ifdef _WIN32
void windowsWorker();
std::thread workerThread;
#endif
char _filter[2048];
bool pathValid = false;
bool dialogOpen = false;
char strPath[2048];
bool _pathChanged = false;
};