Optimized Button class. Added IsPressed and GetPressed methods.
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
#include "ehs/system/System_LNX.h"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "ehs/system/Thread.h"
|
||||
#include "ehs/Log.h"
|
||||
|
||||
@@ -19,4 +22,22 @@ namespace ehs
|
||||
xdg.Start(XDG_Thread, (void*)&uri);
|
||||
xdg.Detach();
|
||||
}
|
||||
}
|
||||
|
||||
Str_8 System::OpenFileDialog(const Str_8 &dir, const Str_8 &filters)
|
||||
{
|
||||
FILE *file = popen("kdialog --getopenfilename " + dir + " \'" + filters + "\'", "r");
|
||||
|
||||
Str_8 result;
|
||||
|
||||
char array[128];
|
||||
while(fgets(array, sizeof(array), file))
|
||||
result.Push(array);
|
||||
|
||||
pclose(file);
|
||||
|
||||
if (result.Size())
|
||||
result.Pop();
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user