#Change scroll bar texture on scrolling_panel

1 messages · Page 1 of 1 (latest)

novel kettle
#

I'm using a @common.scrolling_panel. To change the scroll bar texture I found that I need to fill the variable "$scroll_box_mouse_image_control" but I can't find with what. I tried a classic image type element but nothing is rendering

opaque crystal
#

Have you taken a look at what the default value is for the variable and apply that to your use?

novel kettle
#

ok so if anybody one day is looking for the answer, I added

"$scroll_box_mouse_image_control": "custom_ui.scroll_bar"```
in the variables of my scrolling panel and it refers to:
```json
"scroll_bar": {
    "type": "image",
    "texture": "textures/ui/custom/scroll_bar"
  }```
As simple as that but you must not forget the little file with the same name as the scroll_bar image with the dimensions like that for a good rendering:
```json
{
  "nineslice_size": 1,
  "base_size": [ width, height ]
}```