[FEATURE REQUEST] - Adding other alignment to the inventory window + text

Started by Gal Shemesh, Wed 03/07/2024 12:41:42

Previous topic - Next topic

Gal Shemesh

The default behavior of the built-in inventory window is to present the added items from top left to the right, and when there's no more room it goes down a line.

It would be very nice if we could set it to either start from right to left, or even from top left / top right to bottom, and then to set its borders how we like and the items would be presented accordingly.

For example, a 2 lines inventory window where you want that the first item will go to the top left slot, the second to the bottom left slot, the third to the right of the top left slot, and so on.

In addition, for texed based games like an AGI-style, it would be nice if we could also make the items show as text by showing their names instead of their icons, or even both. The text should have an option to select a font to presenting it, and also have listboxes properties such as alignments and highlighted background and highlighted text.

* Instead of rasing another thread for this as this is of the same matter, the alignment behavior should also be added to listbox items which basically works the same way of storing items in them. So we could either have list boxes that show items in the current form of top to bottom, or to have them showing from left to right, right to left, or even in reverse order from bottom to top.

Crimson Wizard

I don't think that it is a good idea to mix InventoryWindow with texts. InventoryWindow is a specialized control for displaying inventory items using their graphics. For lists of strings there's already a ListBox. Filling ListBox with inventory names is a rather trivial thing to script, this may be a good option for a script module.

In regards to displaying ListBox items horizontally, that's an curious idea, but I am not certain if it's good thing to force this unorthodox behavior into the ListBox. First of all, such behavior would require a property which defines an item's width limit, as it cannot be limited with the control's width in such case.
Which in turn makes ListBox akin to a table.
Perhaps designing a completely new Table control would be a better choice.

SMF spam blocked by CleanTalk