Page 1 of 1

scroll_policy 'never' should not focus on scrolling

Posted: Mon Apr 08, 2019 12:08 pm
by WIZ4
If I choose scroll_policy - never, I will not be able to scroll the scroll panel using the mouse wheel. But the scroll pane still takes care of the focus, not allowing the parent scroll to be used.
ignored_by_interaction does not suit me, since I cannot use the child elements of the panel.

Re: scroll_policy 'never' should not focus on scrolling

Posted: Mon Apr 08, 2019 2:16 pm
by Bilka
Why are you using scroll pane if you don't want it to scroll? Wouldn't a frame work instead?

Re: scroll_policy 'never' should not focus on scrolling

Posted: Mon Apr 08, 2019 3:01 pm
by WIZ4
Bilka wrote: Mon Apr 08, 2019 2:16 pm Why are you using scroll pane if you don't want it to scroll? Wouldn't a frame work instead?
Unfortunately, I could not find list_box_frame in prototypes/style.lua.
Having of this frame would also solve my problem.
Screenshot_13.jpg
Screenshot_13.jpg (150.93 KiB) Viewed 2405 times

Re: scroll_policy 'never' should not focus on scrolling

Posted: Mon Apr 08, 2019 5:06 pm
by Bilka
Just make your own frame style that looks like the scroll pane, this one works for me:

Code: Select all

data.raw["gui-style"].default.list_box_frame =
{
  type = "frame_style",
  padding = 0,
  graphical_set =
  {
    base =
    {
      position = {17, 0},
      corner_size = 8,
      center = {position = {42, 8}, size = 1},
      draw_type = "outer"
    },
    shadow = default_inner_shadow
  },
  background_graphical_set =
  {
    position = {282, 17},
    corner_size = 8,
    overall_tiling_vertical_size = 20,
    overall_tiling_vertical_spacing = 8,
    overall_tiling_vertical_padding = 4,
    overall_tiling_horizontal_padding = 4
  }
}

Re: scroll_policy 'never' should not focus on scrolling

Posted: Mon Apr 08, 2019 5:18 pm
by WIZ4
Bilka wrote: Mon Apr 08, 2019 5:06 pm Just make your own frame style that looks like the scroll pane, this one works for me:

Code: Select all

data.raw["gui-style"].default.list_box_frame =
{
  type = "frame_style",
  padding = 0,
  graphical_set =
  {
    base =
    {
      position = {17, 0},
      corner_size = 8,
      center = {position = {42, 8}, size = 1},
      draw_type = "outer"
    },
    shadow = default_inner_shadow
  },
  background_graphical_set =
  {
    position = {282, 17},
    corner_size = 8,
    overall_tiling_vertical_size = 20,
    overall_tiling_vertical_spacing = 8,
    overall_tiling_vertical_padding = 4,
    overall_tiling_horizontal_padding = 4
  }
}
But I do not want to make a mod. I use only scenario

Re: scroll_policy 'never' should not focus on scrolling

Posted: Mon Apr 08, 2019 9:07 pm
by Rseding91
WIZ4 wrote: Mon Apr 08, 2019 5:18 pm But I do not want to make a mod. I use only scenario
In this case you have to make a mod if you want the behavior you're after.