Esempio n. 1
0
        bool CheckBox::handleGamepad(Event::Type type, const GamepadEvent& event, const VoidPtr& sender)
        {
            OUZEL_UNUSED(type);
            OUZEL_UNUSED(event);
            OUZEL_UNUSED(sender);

            return true;
        }
Esempio n. 2
0
        bool Shader::setVertexShaderConstant(uint32_t index, uint32_t size, uint32_t count, const float* value)
        {
            OUZEL_UNUSED(index);
            OUZEL_UNUSED(size);
            OUZEL_UNUSED(count);
            OUZEL_UNUSED(value);

            return true;
        }
Esempio n. 3
0
        bool Texture::initFromData(const void* data, const Size2& newSize, bool newDynamic, bool newMipmaps)
        {
            OUZEL_UNUSED(data);

            size = newSize;
            dynamic = newDynamic;
            mipmaps = newMipmaps;

            ready = true;

            return true;
        }
Esempio n. 4
0
        bool MeshBuffer::uploadVertices(const void* newVertices, uint32_t newVertexCount)
        {
            OUZEL_UNUSED(newVertices);

            if (!dynamicVertexBuffer)
            {
                return false;
            }

            vertexCount = newVertexCount;

            return true;
        }
Esempio n. 5
0
        bool MeshBuffer::uploadIndices(const void* newIndices, uint32_t newIndexCount)
        {
            OUZEL_UNUSED(newIndices);

            if (!dynamicIndexBuffer)
            {
                return false;
            }

            indexCount = newIndexCount;

            return true;
        }
Esempio n. 6
0
        bool MeshBuffer::initFromData(const void* newIndices, uint32_t newIndexSize,
                                      uint32_t newIndexCount, bool newDynamicIndexBuffer,
                                      const void* newVertices, uint32_t newVertexAttributes,
                                      uint32_t newVertexCount, bool newDynamicVertexBuffer)
        {
            OUZEL_UNUSED(newIndices);
            OUZEL_UNUSED(newIndexCount);
            OUZEL_UNUSED(newVertices);
            OUZEL_UNUSED(newVertexCount);

            indexCount = newIndexCount;
            indexSize = newIndexSize;
            dynamicIndexBuffer = newDynamicIndexBuffer;

            vertexCount = newVertexCount;
            vertexAttributes = newVertexAttributes;
            dynamicVertexBuffer = newDynamicVertexBuffer;
            updateVertexSize();

            ready = true;

            return true;
        }
Esempio n. 7
0
        bool Texture::upload(const void* data, const Size2& newSize)
        {
            OUZEL_UNUSED(data);

            if (!dynamic)
            {
                return false;
            }

            if (newSize.width <= 0.0f || newSize.height <= 0.0f)
            {
                return false;
            }

            return uploadData(data, newSize);
        }
Esempio n. 8
0
        bool CheckBox::handleUI(Event::Type type, const UIEvent& event, const VoidPtr& sender)
        {
            OUZEL_UNUSED(event);

            if (!enabled) return true;

            if (sender.get() == this)
            {
                if (type == Event::Type::UI_ENTER_NODE)
                {
                    pointerOver = true;
                    updateSprite();
                }
                else if (type == Event::Type::UI_LEAVE_NODE)
                {
                    pointerOver = false;
                    updateSprite();
                }
                else if (type == Event::Type::UI_PRESS_NODE)
                {
                    pressed = true;
                    updateSprite();
                }
                else if (type == Event::Type::UI_RELEASE_NODE)
                {
                    if (pressed)
                    {
                        pressed = false;
                        updateSprite();
                    }
                }
                else if (type == Event::Type::UI_CLICK_NODE)
                {
                    pressed = false;
                    checked = !checked;
                    updateSprite();

                    Event event;
                    event.sender = shared_from_this();
                    event.type = Event::Type::UI_WIDGET_CHANGE;
                    sharedEngine->getEventDispatcher()->dispatchEvent(event);
                }
            }

            return true;
        }
Esempio n. 9
0
        bool Button::handleUI(Event::Type type, const UIEvent& event, const VoidPtr& sender)
        {
            OUZEL_UNUSED(event);

            if (!enabled) return true;

            if (sender.get() == this)
            {
                if (type == Event::Type::UI_ENTER_NODE)
                {
                    pointerOver = true;
                    updateSprite();
                }
                else if (type == Event::Type::UI_LEAVE_NODE)
                {
                    pointerOver = false;
                    updateSprite();
                }
                else if (type == Event::Type::UI_PRESS_NODE)
                {
                    pressed = true;
                    updateSprite();
                }
                else if (type == Event::Type::UI_RELEASE_NODE)
                {
                    if (pressed)
                    {
                        pressed = false;
                        updateSprite();
                    }
                }
                else if (type == Event::Type::UI_CLICK_NODE)
                {
                    if (pressed)
                    {
                        pressed = false;
                        updateSprite();
                    }
                }
            }

            return true;
        }
Esempio n. 10
0
        bool Shader::initFromBuffers(const uint8_t* newPixelShader,
                                     uint32_t newPixelShaderSize,
                                     const uint8_t* newVertexShader,
                                     uint32_t newVertexShaderSize,
                                     uint32_t newVertexAttributes,
                                     const std::string& pixelShaderFunction,
                                     const std::string& vertexShaderFunction)
        {
            OUZEL_UNUSED(newPixelShader);
            OUZEL_UNUSED(newPixelShaderSize);
            OUZEL_UNUSED(newVertexShader);
            OUZEL_UNUSED(newVertexShaderSize);
            OUZEL_UNUSED(pixelShaderFunction);
            OUZEL_UNUSED(vertexShaderFunction);

            vertexAttributes = newVertexAttributes;

            ready = true;

            return  true;
        }
Esempio n. 11
0
 void Drawable::draw(const Matrix4& projectionMatrix, const Matrix4& transformMatrix, const graphics::Color& drawColor)
 {
     OUZEL_UNUSED(projectionMatrix);
     OUZEL_UNUSED(transformMatrix);
     OUZEL_UNUSED(drawColor);
 }