Minor fixes

This commit is contained in:
Henrik Rydgard committed 2013-06-09 12:40:53 +02:00
1 parent bc2a18eeee
commit 976ef3b714
2 files changed
+4 -1

No files matched your search

+1
View File
@@ -274,6 +274,7 @@ size_t getFilesInDir(const char *directory, std::vector<FileInfo> *files, const
info.fullName = std::string(directory) + "/" + virtualName;
info.isDirectory = isDirectory(info.fullName);
info.exists = true;
info.size = 0;
if (!info.isDirectory) {
std::string ext = getFileExtension(info.fullName);
if (filter) {
+3 -1
View File
@@ -185,8 +185,9 @@ public:
// This is suggested for use in most cases. Autobinds, allowing for neat syntax.
template<class T>
void Handle(T *thiz, EventReturn (T::* theCallback)(EventParams &e)) {
T *Handle(T *thiz, EventReturn (T::* theCallback)(EventParams &e)) {
Add(std::bind(theCallback, thiz, placeholder::_1));
return thiz;
}
// Sometimes you have an already-bound function<>, just use this then.
@@ -474,6 +475,7 @@ public:
virtual void GetContentDimensions(const UIContext &dc, float &w, float &h) const;
virtual void Draw(UIContext &dc);
virtual void SetText(const std::string &text) { text_ = text; }
private:
int font_;
std::string text_;