Ludeon Forums

Ludeon Forums

  • October 18, 2021, 12:39:25 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Nested Scroll windows?  (Read 426 times)

LWM

  • Planetologist
  • ****
  • Posts: 1083
  • Little White Mouse
    • View Profile
Nested Scroll windows?
« on: April 25, 2021, 10:43:27 PM »

Hey, everyone!  UI question here:

I have a Listing_Standard with a ScrollView, and inside that scroll view I get a Rect and inside that Rect I do the ThingFilter UI.  The problem is that the ThingFilter's scroll bars do not appear!  Only the ScrollView scroll bars appear...

Does anyone know if this problem will go away if I rewrite everything without the Listing_Standard?
Logged

LWM

  • Planetologist
  • ****
  • Posts: 1083
  • Little White Mouse
    • View Profile
Re: Nested Scroll windows?
« Reply #1 on: April 26, 2021, 02:21:45 AM »

Answer: it works when it's not a ThingFiter UI (with scroll bars) inside a Listing_Standard.

I got around the problem by using something like this:
Code: [Select]
Widgets.ScrollView(...);//use height to make Rects
var l = new Listing_Standard();
l.Begin(innerRect);
...
height=l.CurHeight; //height is an object field
l.End();
var filterRect = new Rect(...);
ThingFilterUI.DoThingFilterConfigWidnow(...);
Widgets.EndScrollView();
It works for now, anyway :)  But listing standards seem hard to use if you want to do anything slightly complicated.  :P
Logged

LWM

  • Planetologist
  • ****
  • Posts: 1083
  • Little White Mouse
    • View Profile
Listing_Standard no longer has ScrollView; fix
« Reply #2 on: July 12, 2021, 03:31:54 PM »

For 1.3, Listing_Standard no longer has a scroll view, so this workaround is a general way to fix any mod that use Listing_Standard's BeginScrollView &c.
Logged