Tonegod GUI tutorial videos

I realized that I would be making a few videos on Tonegod’s GUI library in 3.1 so… yeah, documentation topic time. That … and I realized the first one I made was a bit off-topic on the thread for which I originally posted.

So, post 'em, like 'em, and request 'em.


A Quickstart with Tonegod GUI video

Important Parts:
4:00 - Getting Tonegod Library up and running for 3.1
12:00 - Quickstart coding project
20:30 - The example in action

9 Likes

A Skinning Example featuring Horrible Taste

Important Parts:
0:40 - Activating Sound and Custom Cursors
2:10 - The structure of a Skin
3:36 - Correctly Referencing Assets in jME 3.1
8:22 - Custom Cursors notes (Windows)
10:42 - Audio notes *video glitched(?) oops
11:54 - Working with Fonts and making a font atlas
15:24 - The result of cow skinning

8 Likes

Nice to see you back!

2 Likes

Just replying to share.

These videos are more valuable than the forum would make them appear. We can all see this topic and have nothing to say on the topic.

Youtube videos bring more people and get more eyes on the project and more knowledge is always good.

2 Likes

i already subscribed, im waiting for the chatbox, table, and others not mentioned in the documentation, because i just started jme. hope it will be quick, thanks in advance…

1 Like

Projecting GUI elements onto 3D surfaces

Important Bits:

1:40 - Workflow: Art in Blender
6:40 - Workflow: Importing to Scene
9:28 - Spaghetti coding of concepts
17:56 - Results and analysis

Yeppers, Holopanels are one of my great obsessions. I… got sidetracked because I wanted to play a video on my Holopanel… and then I had to cut code. It was too… “not the point I wanted to make” so… yeah. :smile:

Oh so, this tip is probably good for people wanting to have working buttons and GUI controls on their 3D models. The VR crew “might” be able to use some of the info, but they’d have to look at the structure and raytracing linkages in the screen → bridge ->subscreen code.

4 Likes

Nice video Mr Anderson. Keep up the good work. I have a few projects with TG_Gui, so it’s nice to get some new takes on how to use it. And …

Yes … Holopanels are cool … very cool. Some games that have some nice examples are Pulsar and Interstellar Rift. I think you showed … without a doubt … that TG Gui can do the same hi quality 3D interface. And …

Yes … I too am looking forward to tables and other Wot-Nots done with TG Gui … as mentioned above by another user

Keep rollin’ out dem videos.

And Kudos to you for the Dark Monkey theme. Really nice to work with.

2 Likes

can i ask here, im confused, how to add mouse event to other elements like windows or panels. events like press and hover. and also i have a problem how to get element uid when i click an element. thanks in advance. sorry for my english.

1 Like

Well, let’s see if I can help by showing where the important tidbits are.

First off, let’s go over “hovering”
The tonegod.gui.core.Screen class handles all the raw inputs with the
com.jme3.input and com.jme3.input.event libraries (Note: and to subscreens with rays, and collision results… ). It forwards the events on to the various Elements that match various “Listener” criteria.

The Listener for “hovering” is tonegod.gui.listeners.MouseFocusListener. You can look at the code in tonegod.gui.controls.Button to see that when a button receives the focus event, it starts an effect and sound (if sound is enabled) and signals for the effect to stop when it loses focus.

Windows in tonegod don’t naturally have this functionality, but you can extend the class and implement the listener. Also, don’t forget that “dragbar” and “contentArea” can be altered if you wish to target those elements.

Otherwise, just have your game to do stuff with the normal buttons’ onButtonMouseLeftUp(MouseButtonEvent evt, boolean toggled) method override. You can easily send a quick this.getUID() to somewhere.

and finally, you want the UID of a mouseclicked element, like every single one? Try this:
You will have to extend the Screen class and override the onMouseButtonEvent method. The code will be the same (just copy and paste) but add a String lastElementClickedUID and then set it to eventElement.getUID() somewhere in the if(evt.isReleased()) section under case 0 for left click. I just recommend the isReleased() section because tonegod cued off of that event for recognizing a click. As a bonus, the magic method for actual collision results is: getEventElement(). I’m only suggesting this because you are in the “playing with it” phase of using it.

So to review:

  1. we can change it at the Button/Window/Element level (with Listeners), yes.
  2. we can change it at the Screen level (where dispatch happens), yes.

But Really,

Big tip: It’s not necessary to know the name of what you are clicking on most of the time, it is necessary for whatever you click on to be able do things. As in: If you are needing for a button or element to affect some other button or window… make use of setUID() to uniquely name your stuff during construction/initialization phase. That way… you know how to correctly reference your target, and you are just a Screen.getElementByID or Element.getChildElementByID away from getting things done.
edit: Whoohoo! so… some elements are marked private by the advanced controls (which also have children) so Troll lol no lol access is typically granted… said advanced controls might need tweaking in source, what say?

and… this really isn’t the place for this question (should’ve started a new topic in troubleshooting or something), but whatever :laughing:

Game On,
Charles

4 Likes

Usage of Table, ChatBox, LoginBox, ToggleButton, and a poorly done Fake Server

Important Bits:
1:52 - Looking at Source for Components
11:33 - Looking at Coded application of all that “Stuff”
29:57 - Viewing Results

So, yeah, by request: this video. I think I’ll drop this whole thing for a bit… I kinda want to play around with making a small game or something for a while.

3 Likes

Great video … thanks for the depth to the explanation and the example code and app.

1 Like