Opened 9 years ago

Last modified 8 years ago

#3038 new enhancement

Add scrollbars to non-list GUI objects

Reported by: leper Owned by:
Priority: Should Have Milestone: Backlog
Component: Core engine Keywords:
Cc: Patch:

Description

Currently we only support scrollbars for lists or text boxes, but not for any other GUI objects. Having a GUI object where only a small part of the content can be displayed due to the window size/element size prevents a user from seeing anything else in that GUI object.

This is for example an issue with the structree on the minimum supported resolution of 1024x768, but it would be nice to have for other things too (options screen, though that could be tabbed, but for hotkeys it would be nice).

Attachments (1)

t3038_rename_vertical_scrollbar_add_sprites_wip_v1.patch (44.7 KB ) - added by elexis 8 years ago.
Renames "scrollbar" to "scrollbar_vertical", introduces "scrollbar_horizontal" in few but not all places, contains like 15% of the changes needed.

Download all attachments as: .zip

Change History (3)

comment:1 by leper, 9 years ago

In 16276:

Import s0600204's structree.

Taken from https://github.com/s0600204/0ad-structree-mod with some improvements from my fork.
On small resolutions some buildings might not be fully visible (see #3038).

comment:2 by elexis, 8 years ago

  • Adding horizontal scrollbars to GUI objects without children (text, list, image) is easy.
  • Changing all GUI object types (empty, button, image, text, checkbox, radiobutton, progressbar, minimap, input, list, olist, dropdown, tooltip) to offset and clip is the more painful task and involves most if not all GUI files, as that isn't implemented for vertical scrollbars either.
  • Horizontal and vertical scrollbars may not overlap
  • Sprites / images for disabled / hovered / pressed buttons are also missing
  • Linebreaking needs to be disabled if the horizontal scrollbar is enabled

by elexis, 8 years ago

Renames "scrollbar" to "scrollbar_vertical", introduces "scrollbar_horizontal" in few but not all places, contains like 15% of the changes needed.

Note: See TracTickets for help on using tickets.