Closed kotcrab closed 8 years ago
If you add support for initial null actor (Table) and add an actor setter in VisUI, we can create a similar tag to container
: it basically begins empty and allows to eventually add one actor. Then it could be used like this: <collapsible><table>(...actors...)</table></collapsible>
. Or we could extend TableLmlTag
, create the table in the tag class and return it as the main widget (allowing children to access table tags), but it would need some extra "hacks" during attaching - we'd need to replace the original actor with our collapsible. I think the first solution would require less work overall.
Extend VisTableLmlTag
, return FloatRangeLmlActorBuilder
for initial value, min, max and step size support, cast the builder to create a new instance. Add precision
attribute. Pretty straightforward, you can try to do this.
Extend VisLabelLmlTag
, initiate LinkLabel
with text from TextLmlActorBuilder
and an empty URL. Add an attribute (link, url, uri, ?) that uses setUrl(CharSequence)
. No need for a new builder. Easy one.
The actor itself is trivial to add (extend VisTextFieldLmlTag
, no additional attributes), but I'd need to add validators as tags or macros.
It can be an attachable tag, kind of like tooltips were implemented. I'll need to look into this.
Simple non-parental actor, extend AbstractNonParentalActorLmlTag
. Use AlignedLmlActorBuilder
for initial vertical/horizontal status. However, separators do not use the usual style name schema (default-horizontal
/default-vertical
), so we might need to do some magic before using a custom style (extending AlignedLmlActorBuilder
, returning different style names?).
Up to you. If you think it adds additional functionalities that are worth the extra effort, we can support these.
Should be based on one of existing group tags (Table, VerticalGroup, Stack
, etc.). Appends children to itself. Might need a custom LmlActorBuilder
extension to support constructor params.
These look complex, I'll need to take a better look at these. I'll probably end up implementing them.
Well, I'm not a huge fan of "native" LibGDX tooltips. I actually implemented my own LML tooltips as well (before they were introduced in LibGDX), but they were removed in LML 0. I think we can support Vis tooltips with visTooltip
tag, especially if their behaviour varies from the original ones. But let's leave them for now.
We can add default actions to the parser. Instead of new attributes, you could use old ones to display these - onClick=showFileChooser
. Default parser's I18NBundle
would be used to support dialog's i18n. This should be pretty trivial, let's focus on other widgets first.
OK, to sum up: I think you can look into NumberSelector
, LinkLabel
, Separator
, ColumnGroup
and GridGroup
, if you want to. These should be pretty straightforward to implement.
ColumnGroup
VerticalGroup
has more features. To be honest I don't remember why it exists. It's either that I didn't know scene2d has it already implemented and made my own or I had problems with VerticalGroup
.
Alright, I'll update CollapsibleWidget and look into the 'easy' ones.
CollapsibleWidget
now supports creation with null table.
I don't think we're going to support all FormValidator
methods (files management) for now, because of lack of GWT support. Though, if they don't cause any problems (when present and unused), adding them would be pretty straightforward - see current validator tags.
I think that constructing simple error or input dialogs is easy enough in LML - actually, if you need to display these very often, you can easily create powerful and more flexible macros, invocable with a single tag. DialogUtils
might still be useful when managing UI in Java, but there's pretty much no point in adding separate tags/attributes for these.
FormValidator
class is completely excluded from GWT. Trying to use it anywhere would cause missing class error during gwt compile.
I see. I guess we can add yet another syntax (extending VisLmlSyntax
) with some additional validators for files (that's what it comes down to: SimpleFormValidator
should be handle these just fine), but I don't think that's necessary for now. Let's focus on core widgets and their examples.
Since file chooser is excluded on GWT, we might have to add a separate non-GWT utility that registers extra attributes (file chooser) and tags (file validators). Standard syntax will not support file chooser.
All relevant GWT-compatible features are supported; example templates are present in the tests project. Closing the issue.
I will list all features unique for VisUI so we can discuss what will be added to lml-vis.
FormValidator (missing file validators - not supported on GWT)- not supported on GWT, moved to separate issue.btw VisTable has)addSeparator()
, is it supported?VerticalGroup
which is already supported by LMLDIalogs
File chooser - will (probably) be added as an attribute.- not supported on GWT, moved to separate issue.DialogUtils- not supported; LML is already great at constructing simple dialogs, no need to replicate this functionality when you have more flexible macros.