Chat UI - A UI toolkit for the vanilla chat box

He’s mind-blown.

3 Likes

Renamed to Chat UI
I have updated the original post with more up-to-date details.

Also, version 0.1.0 is released!
Early access downloads on the Releases page

This is a early-access build and is not completely polished.
I’d like to get some feedback on things that are broken, could be improved or new ideas. I’d also like to know how well it works with other plugins.

Note: The current SpongeForge and SpongeVanilla doesn’t support capturing messages sent from the server to the player, so it won’t look as good as some of the demos (as I used a custom built SpongeForge)
It will be fixed when this PR is merged: https://github.com/SpongePowered/SpongeCommon/pull/823

I’ve been working on expanding the UI toolkit. I’ve taken ideas from both JavaFX and Swing in order to make things more general purpose and to join many small components together to make an interface.

Here is an example of that:

To show each individual component, here is an annotated diagram:
component-ui

Window and Tab work as they always have done before, but now, most elements implement UIComponent, and UIPanes display their children according to their rules.
Similar to JavaFX, a HBoxUI will layout it’s children horizontally and VBoxUI lays them out vertically.
The canvas and table are now general purpose components that can be added anywhere that components are allowed, in the above example the canvas is added to the HBoxUI, and another one added to the cell of a table.

With these new features, designing GUIs will now be much easier.

12 Likes

New early access release, version 0.3.0. Download here

Notable changes:

  • Complete UI API refactor, as seen in my previous reply
  • Improved force-unicode support
  • Interface can be disabled
  • Permissions manager GUI

Permissions Manager GUI

has basic support for all permission plugins. Enhanced support for PEX

Main screen shows buttons for each type of subject

List of subjects in category

Permissions

  • add/remove parents
  • change permission value (true/false)
  • add and remove permissions
  • set default value (PEX only)
  • set subject options
5 Likes

Are you able to create language chat tabs.
So having like a french chat etc based on tabs. If this is possible, I am most definitely interested.
I know you can’t enforce the chat, but creating these channels would be great for my server and would love to give it a shot.
Please support PEX chat formatting (prefix, etc).

So basically you’re after “chat groups” for multiple people. This is definitely possible and was one of the things I actually wanted to do. When I first thought about that idea I was thinking group chat plugins could provide hooks for this, but for a better out-of-the-box experience I will provide a basic system for it.

I wouldn’t say I’m directly after chat groups, but the way it could be implemented with your very nice chat ui, you could easily start allowing servers the option of creating multi-language servers.
Most servers limit chat to english or whatever their base language is, which could be completely done away with if their were like, a chatbox below 4 tabs, with each tab being a different language.
A global option would need to be implemented, or some way to distinguish messages being sent to every chat while keeping messages in the chat they are apart of.

Obviously in the past there have been plugins that do this, and their will probably be a version created in sponge, but its always command base and very ugly/overcomplicated.
ChatUI has a chance to change multi-language servers.

1 Like

This is amazing!
Just curious though, would something like this even be possible in servers other than Sponge, or does the Sponge API have certain things that are essential for ChatUI?

There’s nothing specific to sponge, other than a nice Text API.
One thing that’s massively convenient is the ability to bind callback functions to click actions
(a feature of vanilla allows executing a command when you click a piece of text)

It’s all done (internally) using the vanilla JSON format (see: http://wiki.vg/Chat)

1 Like

Anything new here? :slight_smile:

Maybe soon… :stuck_out_tongue:

4 Likes

I’ve re-written the text editor and implemented a basic “chat group” feature.

Anything I should add before moving to the release phase?

2 Likes

Update to sponge api 5.1.0.

Edit: What should a plugin do if Chat UI isn’t loaded/installed and the user doesn’t want the whole chat to be modified. Is there a thing to only print a table to the player? And maybe getting text input?

It’s fully 5.x.x compatible, coincidentally also compatible with the current API 6 snapshots (though cannot say it’s API 6 compatible until we get a proper release of API 6)

Each user has the ability to disable Chat UI (through the Settings menu). Though there isn’t currently a system-wide option for that.
I think it would be a good idea to make Chat UI able to load as a library for other plugins without presenting the whole Window/Tab system to players. I’ll look into making that possible.

1 Like

Maybe split up the library and the plugin. So you can keep new API features and new plugin functionality on separate update paths as well.

New early access version, 0.4.0 released, Download here

There are not many player-facing changes in this version, but there has been a lot of code changes

2 New features:

  • Chat groups - Players with the admin permission can create and delete groups. Any player can join any group. Group chats are organised into separate tabs
  • Disable the interface (load as a service).
    Set interfaceEnabled=false in the config to disable the interface for all users and leave the chat alone (requires restart). This is primarily if another plugins wishes to use the UI component system but the server admin doesn’t want the front-facing interface.

The text editor that I demoed previously has been re-written to address some shortcomings. I’ve left the “Demo Content” button on the New Tab page so you can test out the editor.
I’m thinking of adding a “notepad” for players to jot down notes (e.g coords).

I would like to separate the GUI library and the plugin features as @pie_flavor suggested, 0.4.0 refactored a lot of code to ease the separation but it’s still quite tightly ingrained.

A lot of the refactoring was to make all the displayed parts of the window a “Component” and to use generalised containers for layout management. This reduced code duplication and made it more robust (e.g. to different chatbox sizes). The containers are largely based off of JavaFX, e.g. The main UI you see is an AnchorPaneUI with the tab bar fixed to the top and status bar fixed to the bottom.

This will probably be the last early access release before 1.0.0, (though I might do some Release Candidates first). It’s pretty stable, if you’re thinking about trying out Chat UI then I encourage test-driving 0.4.0.
I’d like to know of any major issues with other chat plugins before release too.

Things I’d like to do before 1.0.0:

  • Notepad
  • Finer control of permissions for the various actions
  • UI tidy-up (layout, colors, tooltips)

Things for after 1.0.0:

  • Texture pack support (currently assumes vanilla font)
  • Lite mode - A less “intrusive” mode (will make support for non-English languages possible)
    Because all text is computed server-side, the server must be aware of all language packs (by default it only ships with en_us.lang). Lite mode will not encapsulate the chat window with a border, but instead just append a footer to all text and leave it as-is.
  • Proper layout management (currently it’s very rough)

There have been some great ideas from other people after having seen the potential for Chat UI. While I can make these myself it may take as long as it’s taken to develop Chat UI (see: first post Dec 2015).
I encourage plugin developers to try out the UI API and perhaps create an extension that adds a new feature.

List of suggested features:

  • Entity Radar
  • Region Manager
  • Spam hiding / spoilers
  • Book-based GUI (similar to inventory based GUIs)
  • Maps - (e.g. height map)
3 Likes

something something release something something very soon something something

3 Likes

something something can’t wait something something so excited something something

1 Like

Subscribe to this topic for future updates: