void ScriptTextureCube::internal_setPixels(ScriptTextureCube* thisPtr, MonoObject* data, UINT32 face, UINT32 mipLevel) { ScriptPixelData* scriptPixelData = ScriptPixelData::toNative(data); if (scriptPixelData != nullptr) { HTexture texture = thisPtr->getHandle(); texture->writeData(scriptPixelData->getInternalValue(), face, mipLevel, false); } }
void ScriptCursor::internal_setCursorIcon(CursorType cursor, MonoObject* iconData, Vector2I* hotspot) { ScriptPixelData* scriptPixelData = ScriptPixelData::toNative(iconData); if (scriptPixelData != nullptr) { SPtr<PixelData> pixelData = scriptPixelData->getInternalValue(); Cursor::instance().setCursorIcon(cursor, *pixelData, *hotspot); } else Cursor::instance().clearCursorIcon(cursor); }
void ScriptCursor::internal_setCursorIconStr(MonoString* name, MonoObject* iconData, Vector2I* hotspot) { String nameStr = MonoUtil::monoToString(name); ScriptPixelData* scriptPixelData = ScriptPixelData::toNative(iconData); if (scriptPixelData != nullptr) { SPtr<PixelData> pixelData = scriptPixelData->getInternalValue(); Cursor::instance().setCursorIcon(nameStr, *pixelData, *hotspot); } else Cursor::instance().clearCursorIcon(nameStr); }