mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Merge branch 'PreviewAssets_UseAsset' into SoundAsset_Refactor
This commit is contained in:
commit
c6ec2fd6a1
24 changed files with 391 additions and 125 deletions
|
|
@ -690,6 +690,15 @@ bool GuiCanvas::processInputEvent(InputEventInfo &inputEvent)
|
|||
mConsumeLastInputEvent = true;
|
||||
mLastInputDeviceType = inputEvent.deviceType;
|
||||
|
||||
// If we have an active offscreen canvas, give it the input
|
||||
if (GuiOffscreenCanvas::sActiveOffscreenCanvas &&
|
||||
(GuiOffscreenCanvas::sActiveOffscreenCanvas != this) &&
|
||||
GuiOffscreenCanvas::sActiveOffscreenCanvas->processInputEvent(inputEvent))
|
||||
{
|
||||
GuiOffscreenCanvas::sActiveOffscreenCanvas = NULL;
|
||||
return mConsumeLastInputEvent;
|
||||
}
|
||||
|
||||
// First call the general input handler (on the extremely off-chance that it will be handled):
|
||||
if (mFirstResponder && mFirstResponder->onInputEvent(inputEvent))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
IMPLEMENT_CONOBJECT(GuiOffscreenCanvas);
|
||||
|
||||
GuiOffscreenCanvas* GuiOffscreenCanvas::sActiveOffscreenCanvas = NULL;
|
||||
Vector<GuiOffscreenCanvas*> GuiOffscreenCanvas::sList;
|
||||
|
||||
GuiOffscreenCanvas::GuiOffscreenCanvas()
|
||||
|
|
@ -33,7 +34,8 @@ void GuiOffscreenCanvas::initPersistFields()
|
|||
addField( "targetName", TypeRealString, Offset( mTargetName, GuiOffscreenCanvas ), "");
|
||||
addField( "dynamicTarget", TypeBool, Offset( mDynamicTarget, GuiOffscreenCanvas ), "");
|
||||
addField( "useDepth", TypeBool, Offset( mUseDepth, GuiOffscreenCanvas ), "");
|
||||
|
||||
addField("canInteract", TypeBool, Offset(mCanInteract, GuiOffscreenCanvas), "");
|
||||
addField("maxInteractDistance", TypeF32, Offset(mMaxInteractDistance, GuiOffscreenCanvas), "");
|
||||
Parent::initPersistFields();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ public:
|
|||
void _teardownTargets();
|
||||
|
||||
NamedTexTargetRef getTarget() { return &mNamedTarget; }
|
||||
bool canInteract() { return mCanInteract; }
|
||||
F32 getMaxInteractDistance() { return mMaxInteractDistance; }
|
||||
|
||||
void markDirty() { mTargetDirty = true; }
|
||||
|
||||
|
|
@ -59,9 +61,12 @@ protected:
|
|||
|
||||
bool mUseDepth;
|
||||
GFXTexHandle mTargetDepth;
|
||||
bool mCanInteract;
|
||||
F32 mMaxInteractDistance;
|
||||
|
||||
public:
|
||||
static Vector<GuiOffscreenCanvas*> sList;
|
||||
static GuiOffscreenCanvas* sActiveOffscreenCanvas;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -116,6 +116,10 @@ void GuiCursor::render(const Point2I &pos)
|
|||
{
|
||||
mExtent.set(getBitmap()->getWidth(), getBitmap()->getHeight());
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Render the cursor centered according to dimensions of texture
|
||||
S32 texWidth = getBitmap()->getWidth();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue