mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Also fixes drag-n-drop behavior from the AB into the image and shape fields to ensure they update as expected.
42 lines
1 KiB
C++
42 lines
1 KiB
C++
#pragma once
|
|
|
|
#include "ImageAsset.h"
|
|
|
|
#ifndef _GUI_INSPECTOR_TYPES_H_
|
|
#include "gui/editor/guiInspectorTypes.h"
|
|
#endif
|
|
#include <gui/controls/guiBitmapCtrl.h>
|
|
|
|
#ifdef TORQUE_TOOLS
|
|
class GuiInspectorTypeImageAssetPtr : public GuiInspectorTypeFileName
|
|
{
|
|
typedef GuiInspectorTypeFileName Parent;
|
|
public:
|
|
|
|
GuiTextCtrl* mLabel;
|
|
GuiBitmapButtonCtrl* mPreviewBorderButton;
|
|
GuiBitmapCtrl* mPreviewImage;
|
|
GuiButtonCtrl* mEditButton;
|
|
|
|
DECLARE_CONOBJECT(GuiInspectorTypeImageAssetPtr);
|
|
static void consoleInit();
|
|
|
|
virtual GuiControl* constructEditControl();
|
|
virtual bool updateRects();
|
|
bool renderTooltip(const Point2I& hoverPos, const Point2I& cursorPos, const char* tipText = NULL);
|
|
|
|
virtual void updateValue();
|
|
|
|
void updatePreviewImage();
|
|
void setPreviewImage(StringTableEntry assetId);
|
|
};
|
|
|
|
class GuiInspectorTypeImageAssetId : public GuiInspectorTypeImageAssetPtr
|
|
{
|
|
typedef GuiInspectorTypeImageAssetPtr Parent;
|
|
public:
|
|
|
|
DECLARE_CONOBJECT(GuiInspectorTypeImageAssetId);
|
|
static void consoleInit();
|
|
};
|
|
#endif
|