scroll_policy 'never' should not focus on scrolling

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
WIZ4
Fast Inserter
Fast Inserter
Posts: 209
Joined: Thu Apr 07, 2016 1:36 pm
Contact:

scroll_policy 'never' should not focus on scrolling

Post 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.
My native language is russian. Sorry if my messages are difficult to read.

Bilka
Factorio Staff
Factorio Staff
Posts: 3127
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: scroll_policy 'never' should not focus on scrolling

Post by Bilka »

Why are you using scroll pane if you don't want it to scroll? Wouldn't a frame work instead?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
WIZ4
Fast Inserter
Fast Inserter
Posts: 209
Joined: Thu Apr 07, 2016 1:36 pm
Contact:

Re: scroll_policy 'never' should not focus on scrolling

Post 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 1695 times
My native language is russian. Sorry if my messages are difficult to read.

Bilka
Factorio Staff
Factorio Staff
Posts: 3127
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: scroll_policy 'never' should not focus on scrolling

Post 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
  }
}
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
WIZ4
Fast Inserter
Fast Inserter
Posts: 209
Joined: Thu Apr 07, 2016 1:36 pm
Contact:

Re: scroll_policy 'never' should not focus on scrolling

Post 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
My native language is russian. Sorry if my messages are difficult to read.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13198
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: scroll_policy 'never' should not focus on scrolling

Post 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.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Modding interface requests”