Fix properties sidebar

master
rubenwardy 2014-05-27 17:35:04 +01:00
parent d0626b606b
commit 1c386f2c61
2 changed files with 15 additions and 0 deletions

View File

@ -14,6 +14,20 @@ void fillTB(IGUIElement* sidebar, int parentId, int id, int value){
}
}
void fillTB(IGUIElement* sidebar, int parentId, int id, float value){
IGUIElement* element = sidebar->getElementFromId(parentId)->getElementFromId(id);
if (element) {
IGUIEditBox* editbox = static_cast<IGUIEditBox*>(element);
if (!editbox) {
return;
}
editbox->setText(stringw(value).c_str());
}
}
void addBox(IGUIElement* parent, IGUIEnvironment* guienv, vector2di pos, int index, const wchar_t* label){
guienv->addStaticText(label,

View File

@ -4,6 +4,7 @@
#include "common.hpp"
extern void fillTB(IGUIElement* sidebar, int parentId, int id, int value);
extern void fillTB(IGUIElement* sidebar, int parentId, int id, float value);
extern void addBox(IGUIElement* parent, IGUIEnvironment* guienv, vector2di pos, int index, const wchar_t* label);
extern void addXYZ(IGUIElement* parent, IGUIEnvironment* guienv, vector2di pos, int startIndex);