ScrollablePanel 0.8 arrow texture

Started by sors, 02 September 2018, 16:54:27

sors

Hi, please tell me how to change the texture ScrollablePanel arrow
My ScrollablePanel in txt:
QuoteScrollablePanel."MyScrollablePanel" {
    ContentSize = (0, 0);
    Position = (0, parent.height - 528);
    Size = (280, 448);

    Renderer {
        BackgroundColor = Transparent;
    }
}

texus

Inside the Renderer section you can add a "Scrollbar" section where the renderer properties for the scrollbar are placed.

It should look like this:
Code (ini) Select
ScrollablePanel {
    ContentSize = (0, 0);
    Size = (&.size, &.size);

    Renderer {
        backgroundcolor = white;
        bordercolor = black;
   
        scrollbar {
            texturearrowdown = "TGUI/themes/Black.png" Part(163, 174, 20, 20) Middle(0, 1, 20, 19);
            texturearrowdownhover = "TGUI/themes/Black.png" Part(183, 174, 20, 20) Middle(0, 1, 20, 19);
            texturearrowup = "TGUI/themes/Black.png" Part(163, 154, 20, 20) Middle(0, 0, 20, 19);
            texturearrowuphover = "TGUI/themes/Black.png" Part(183, 154, 20, 20) Middle(0, 0, 20, 19);
            texturethumb = "TGUI/themes/Black.png" Part(143, 154, 20, 20);
            texturethumbhover = "TGUI/themes/Black.png" Part(143, 174, 20, 20);
            texturetrack = "TGUI/themes/Black.png" Part(123, 154, 20, 20);
            texturetrackhover = "TGUI/themes/Black.png" Part(123, 174, 20, 20);
        }
    }
}


I generated the above by just running the following:
Code (cpp) Select
auto panel = tgui::ScrollablePanel::create();
tgui::Theme theme("TGUI/themes/Black.txt");
panel->getRenderer()->setScrollbar(theme.getRenderer("Scrollbar"));
gui.add(panel);
gui.saveWidgetsToFile("temp.txt");