mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 15:43:38 +00:00
35 lines
1.2 KiB
C++
35 lines
1.2 KiB
C++
#include "UIControl_BitmapIcon.h"
|
|
|
|
#include "app/common/UI/Controls/UIControl.h"
|
|
#include "app/common/UI/UIScene.h"
|
|
#include "app/linux/Iggy/include/iggy.h"
|
|
#ifndef _ENABLEIGGY
|
|
#include "app/linux/Stubs/iggy_stubs.h"
|
|
#endif
|
|
#include "util/StringHelpers.h"
|
|
|
|
bool UIControl_BitmapIcon::setupControl(UIScene* scene, IggyValuePath* parent,
|
|
const std::string& controlName) {
|
|
UIControl::setControlType(UIControl::eBitmapIcon);
|
|
bool success = UIControl::setupControl(scene, parent, controlName);
|
|
|
|
// SlotList specific initialisers
|
|
m_funcSetTextureName = registerFastName("SetTextureName");
|
|
|
|
return success;
|
|
}
|
|
|
|
void UIControl_BitmapIcon::setTextureName(const std::string& iconName) {
|
|
IggyDataValue result;
|
|
IggyDataValue value[1];
|
|
|
|
IggyStringUTF8 stringVal;
|
|
stringVal.string = const_cast<char*>(iconName.c_str());
|
|
stringVal.length = iconName.length();
|
|
value[0].type = IGGY_DATATYPE_string_UTF8;
|
|
value[0].string8 = stringVal;
|
|
IggyResult out = IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
|
|
getIggyValuePath(),
|
|
m_funcSetTextureName, 1, value);
|
|
}
|