示例#1
0
	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);
		}
	}
示例#2
0
	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);
	}
示例#3
0
	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);
	}