Wheel Tree and Bubble Chat

Wheel Tree is a widget for player to select a command from a tree structure (displayed in a wheel).
Bubble Chat uses Wheel Tree to display “command”, in this case, short phrases, as bubbles in the game world. You are not required to use Bubble Chat. I included it as a demo on how WheelTree may be integrated with other systems.

It has been tested in a semi popular game for about a week, and no complaints from players so far.

User guide

With these default settings, you should get a working chat function.

Configurations

  • The commands may be set either statically in Javascript widget or dynamically in Lua.
  • Static setting may be the more straightforward. Go to wheelTreeWidget, and update the snippets variable. Note that value of name field is rendered onto the screen, and sub menus are nested in the children field. The tree can have arbitrary depth. The demo only go 1 level deep.
  • Use dynamic setting if the entire tree needs to be updated. You can use the WheelTree:UpdateTree(tree) method. This method is untested :stuck_out_tongue:
  • To use WheelTree as a standalone widget without chat, you can hook up a listener to WheelTree.properties.onSelect event. It emits the player’s selected string (i.e. the name field in snippets) for the leaf nodes. Here’s how bubble chat uses it:
3 Likes