### guiDynamicTexture (GuiTextureCanvas) revisited

Scripts and codes that enhances or changes the GUI in the engine.

#### Re: guiDynamicTexture (GuiTextureCanvas) revisited

PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
@
Azaezel
:

Perhaps I missed something in the engine code merge...

If I put a little echo comment in my default.bind, within the mousefire command, under the if statement for gui interact, and it never displays the echo in the console.

So... My gui interact stuff is not functioning or something.

I will look again at the merge, but I really feel I got it right. Is there something perhaps I should be looking at specifically in the engine code to make sure that clicking portion works?

Thanks
P

#### Re: guiDynamicTexture (GuiTextureCanvas) revisited

Azaezel
Posts: 385
Joined: Tue Feb 03, 2015 9:50 pm

Check https://github.com/Azaezel/Torque3D/com ... 15a6b5R152 if it's not detecting interaction period.

#### Re: guiDynamicTexture (GuiTextureCanvas) revisited

PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
Thanks, just double-checked the merge and I have all your code in there correctly.

I see the LOS mask, you added StaticShapeObjectType, I had done that so am not sure what I'm missing...

The object I'm placing is a StaticShape, has a datablock, it comes up properly showing the gui I want, I just have no mouse control and the cursor/reticle doesn't change or anything.

I'm running the latest 3.7 AFX Full build from GitHub as my base, all that stuff works great, anything that AFX could be doing that would be disabling this somehow perhaps? I can't think of anything else, as I have set it all up identically to how you had it in the guionobject github repo.

Thanks!

#### Re: guiDynamicTexture (GuiTextureCanvas) revisited

Azaezel
Posts: 385
Joined: Tue Feb 03, 2015 9:50 pm

nah, have afx rolled in this end as well... StaticShape, Not TSStatic like that dynamic_cast check? The UV detection end of things kind of falls apart if it's not wysywig/nonanimated. (Could cook up a custom class, but left that off for simplicity of tracking what was going on.). We got around that limitation this end by hotswapping an animated shape out via the following:

sometriggercallback

Code: Select all

         %owner.screenAnimation.setHidden(false);         %owner.screenAnimation.playThread( 0, "open" );

+

Code: Select all

function monitorData::onOpen(%this,%obj){   %obj.owner.screen.setHidden(false);   %obj.schedule(300,"setHidden",true);}//see: https://github.com/GarageGames/Torque3D/pull/682

where .screenAnimation is a staticshape reference with an animation and .screen is a tsstatic with visible mesh flipped on for the collision end of things.

#### Re: guiDynamicTexture (GuiTextureCanvas) revisited

PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
Oh oops, you mean I should just straight TSStatic this sucker instead of going with the datablock StaticShape? That's no problem, they don't have to be StaticShapes, I can easily swap them out for TSStatics and see if that helps.

Should have noticed that in the dynamic cast that it was looking for TSStatic when I have StaticShapes I'm trying to do this with. Duh!

Thanks, will try and see if that does it.

#### Re: guiDynamicTexture (GuiTextureCanvas) revisited

PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
Yep that did it

Have interaction being detected now! Although it does not seem to be actioning when I click... That doMouseClick function i see in the default bind, is that something that is in the engine or that I have to add in script somewhere?

Close!

#### Re: guiDynamicTexture (GuiTextureCanvas) revisited

Azaezel
Posts: 385
Joined: Tue Feb 03, 2015 9:50 pm

PaulWeston wrote: That doMouseClick function i see in the default bind, is that something that is in the engine or that I have to add in script somewhere?

https://github.com/Azaezel/Torque3D/com ... 8560d7R304

#### Re: guiDynamicTexture (GuiTextureCanvas) revisited

PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
I got this working finally after just a bit more tinkering...

Works great, thanks much for the help!

One thing I am curious about though - when I pop into Oculus Rift mode it does not detect the interaction, I get no mouse cursor or any control, clicking just fires my weapon. My crosshair just stays normal as I pan across the Gui, like it doesn't recognize it.

Anything you can think of that I have to tweak to make this work? I know it is possible to have dual-cursor for the Rift, as we see it in the Awesomium kit we have

#### Re: guiDynamicTexture (GuiTextureCanvas) revisited

Azaezel
Posts: 385
Joined: Tue Feb 03, 2015 9:50 pm

Afraid I don't have a working knowledge of occulous there, though to be clear, is this with the latest revamp or an older version? (It's been refactored in development.)

#### Re: guiDynamicTexture (GuiTextureCanvas) revisited

PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
I'm using the code from your GuiOnObject GitHub repo...

Cool that it's still being tweaked in development - what has changed between that version and the one I have?

I will keep looking at the Oculus issue - it looks like it just has something to do with when the raycast is firing, like it is not firing when in Oculus mode. Perhaps by looking at how Stefan did it in the Awesomium kit will point me in the right direction.

Thanks!

#### Who is online

Users browsing this forum: No registered users and 0 guests