class hiro::modules::ImageResource — HIRO 0.7.0 documentation

# class hiro::modules::ImageResource

## Overview

    #include <ImageResource.h>

    class ImageResource: public hiro::Resource {
    public:
        // construction

        ImageResource(const std::string& name, const glw::PTexture2D& tex);

        // methods

        virtual PGadget CreateGadget();
        void SetImage(const glw::PTexture2D& image_texture);
        void LoadImageFile(const std::string& image_file);
        hiro::draw::PImageRenderer GetObjectPtr() const;
    };

### Inherited Members

    public:
        // fields

        const hiro::ResourceId ID;

        // methods

        virtual hiro::PGadget CreateGadget() = 0;
        void ResetGadgets();
        virtual void Update(float delta_time);

    protected:
        // methods

        void DrawOnNextUpdate() const;

## Detailed Documentation

### Methods

    virtual PGadget CreateGadget()

Override this method to create custom Gadget type objects.