godot icon indicating copy to clipboard operation
godot copied to clipboard

[RTL] Add more list control options.

Open bruvzg opened this issue 1 year ago • 6 comments
trafficstars

Follow up to https://github.com/godotengine/godot/pull/92745, add some extra control for list:

  • Adds support for custom ordered list elements, and custom prefixes/suffixes:

  • Adds option to customize specific sublevel indentation size:

  • Adds option to break ordered list sublevels:

bruvzg avatar Jun 04 '24 08:06 bruvzg

The quote got into the suffix: image I assume it's not expected?

[ol suffix=", "]
item 1
item 2
item 3
[ol]
lol
lo2
[/ol]
tiem 4
[/ol]

Also I don't get how suffix work. E.g. I tried a suffix with dot and space, but it doesn't do what I'd expect:

https://github.com/godotengine/godot/assets/2223172/967f8614-cc71-45e2-8330-bfaaf1ce9d90

Though I also tried the different list types and their behavior is overall somewhat buggy >_>

KoBeWi avatar Jun 09 '24 16:06 KoBeWi

Though I also tried the different list types and their behavior is overall somewhat buggy >_>

The indent (tab size) is too small, and lists are not actually taking bullet size into account (will check it and do a separate PR since it's not directly related to this change).

bruvzg avatar Jun 09 '24 19:06 bruvzg

The quote got into the suffix

Parsing space in the quotes seems to be issues with for all tags as well. Updated PR to use OptionMap instead of split and will do a separate PR to take it into account in the OptionMap (as well as move the rest of tags using split to OptionMap).

bruvzg avatar Jun 09 '24 20:06 bruvzg

I wonder if the prefix and suffix arguments are really necessary, or if it would make more sense to pass a single String, which would then be formatted (e.g. [ol format="prefix_%s_suffix"]). Although, as far as I know, nothing in the Godot API ever does something like I described.

Mickeon avatar Jun 09 '24 21:06 Mickeon

Well there is my old proposal for SpinBox https://github.com/godotengine/godot-proposals/issues/4478

KoBeWi avatar Jun 09 '24 22:06 KoBeWi

Which I also have happened to like already. Maybe the idea can be jumpstarted from here which is guaranteed to not break any compatibility.

Mickeon avatar Jun 10 '24 06:06 Mickeon