mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 22:54:34 +00:00
Replaced a ton of ConsoleMethods with the DefineConsoleMethod Macro.
This commit is contained in:
parent
378a933894
commit
acb192e2a5
133 changed files with 1716 additions and 2087 deletions
39
Engine/source/gui/game/GuiChunkedBitmapCtrl.h
Normal file
39
Engine/source/gui/game/GuiChunkedBitmapCtrl.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#include "platform/platform.h"
|
||||
|
||||
#include "console/console.h"
|
||||
#include "console/consoleTypes.h"
|
||||
#include "gfx/bitmap/gBitmap.h"
|
||||
#include "gui/core/guiControl.h"
|
||||
#include "gfx/gfxDevice.h"
|
||||
#include "gfx/gfxTextureHandle.h"
|
||||
#include "gfx/gfxDrawUtil.h"
|
||||
#include "console/engineAPI.h"
|
||||
|
||||
class GuiChunkedBitmapCtrl : public GuiControl
|
||||
{
|
||||
private:
|
||||
typedef GuiControl Parent;
|
||||
void renderRegion(const Point2I &offset, const Point2I &extent);
|
||||
|
||||
protected:
|
||||
StringTableEntry mBitmapName;
|
||||
GFXTexHandle mTexHandle;
|
||||
bool mUseVariable;
|
||||
bool mTile;
|
||||
|
||||
public:
|
||||
//creation methods
|
||||
DECLARE_CONOBJECT(GuiChunkedBitmapCtrl);
|
||||
DECLARE_CATEGORY( "Gui Images" );
|
||||
|
||||
GuiChunkedBitmapCtrl();
|
||||
static void initPersistFields();
|
||||
|
||||
//Parental methods
|
||||
bool onWake();
|
||||
void onSleep();
|
||||
|
||||
void setBitmap(const char *name);
|
||||
|
||||
void onRender(Point2I offset, const RectI &updateRect);
|
||||
};
|
||||
|
|
@ -31,35 +31,8 @@
|
|||
#include "gfx/gfxDrawUtil.h"
|
||||
#include "console/engineAPI.h"
|
||||
|
||||
#include "GuiChunkedBitmapCtrl.h"
|
||||
|
||||
class GuiChunkedBitmapCtrl : public GuiControl
|
||||
{
|
||||
private:
|
||||
typedef GuiControl Parent;
|
||||
void renderRegion(const Point2I &offset, const Point2I &extent);
|
||||
|
||||
protected:
|
||||
StringTableEntry mBitmapName;
|
||||
GFXTexHandle mTexHandle;
|
||||
bool mUseVariable;
|
||||
bool mTile;
|
||||
|
||||
public:
|
||||
//creation methods
|
||||
DECLARE_CONOBJECT(GuiChunkedBitmapCtrl);
|
||||
DECLARE_CATEGORY( "Gui Images" );
|
||||
|
||||
GuiChunkedBitmapCtrl();
|
||||
static void initPersistFields();
|
||||
|
||||
//Parental methods
|
||||
bool onWake();
|
||||
void onSleep();
|
||||
|
||||
void setBitmap(const char *name);
|
||||
|
||||
void onRender(Point2I offset, const RectI &updateRect);
|
||||
};
|
||||
|
||||
IMPLEMENT_CONOBJECT(GuiChunkedBitmapCtrl);
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include "console/console.h"
|
||||
#include "console/consoleTypes.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "gfx/gfxDrawUtil.h"
|
||||
|
||||
|
||||
|
|
@ -176,13 +177,13 @@ ConsoleDocClass( GuiIdleCamFadeBitmapCtrl,
|
|||
"This is going to be deprecated, and any useful code ported to FadeinBitmap\n\n"
|
||||
"@internal");
|
||||
|
||||
ConsoleMethod(GuiIdleCamFadeBitmapCtrl, fadeIn, void, 2, 2, "()"
|
||||
DefineConsoleMethod(GuiIdleCamFadeBitmapCtrl, fadeIn, void, (), , "()"
|
||||
"@internal")
|
||||
{
|
||||
object->fadeIn();
|
||||
}
|
||||
|
||||
ConsoleMethod(GuiIdleCamFadeBitmapCtrl, fadeOut, void, 2, 2, "()"
|
||||
DefineConsoleMethod(GuiIdleCamFadeBitmapCtrl, fadeOut, void, (), , "()"
|
||||
"@internal")
|
||||
{
|
||||
object->fadeOut();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue