Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sors

Pages: [1]
1
Help requests / Re: 0.8 Button ToolTips
« on: 30 September 2018, 16:21:36 »
tnx!

2
Help requests / Re: 0.8 Button ToolTips
« on: 30 September 2018, 16:04:14 »
Thanks for the answer.
i have ToolTips in .txt gui file:
Code: [Select]
    Button."Delete" {
        Position = (0, 0);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 0, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 64, 64, 64);
texturefocused =  "data/gui/tiles/panels/ZonesPanel.png" Part(384, 0, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 128, 64, 64);
}

        ToolTip {
            DistanceToMouse = (5,20);
            TimeToDisplay = 0.5;
       
            Label {
                AutoSize = true;
                Size = (0, 0);
                Text = "Tooltip text";
                TextSize = 13;
           
                Renderer {
                    backgroundcolor = #00000000;
                    bordercolor = #3C3C3C;
                    borders = (0, 0, 0, 0);
                    textcolor = #3C3C3C;
                }
            }
        }
    }
Then I will not need to assign a button ToolTips ?
setToolTip 

3
Help requests / 0.8 Button ToolTips
« on: 30 September 2018, 15:50:07 »
Hi, why does this code give an error ?
Code: [Select]
    tgui::Button::Ptr button{tgui::Button::create("MyButton")};
    button->getToolTip()->setText("Hello world");
Quote
error: 'tgui::Widget::Ptr {aka class std::shared_ptr<tgui::Widget>}' has no member named 'setText'|

4
Help requests / Re: 0.8 Many Buttons on Grid
« on: 30 September 2018, 15:48:45 »
tnx!

5
Help requests / 0.8 Many Buttons on Grid
« on: 29 September 2018, 13:52:33 »
Hi, I create the table like this:
Quote
grid = tgui::Grid::create();
            for(int i = 0; i < 100; ++i)
                {
                    auto h = tgui::HorizontalLayout::create({ tgui::bindWidth(scrollablePanel), tgui::bindHeight(scrollablePanel) / 10 });
                    auto b = tgui::Button::create("Button");
                    h->add(tgui::Label::create("Label"));
                    h->add(tgui::Label::create("Label"));
                    h->add(tgui::Label::create("Label"));
                    h->add(tgui::Label::create("Label"));
                    h->add(b);
                    grid->addWidget(h, i, 0);
                }
how to find out which button in the table was pressed?

6
Help requests / Re: High memory consumption
« on: 09 September 2018, 18:31:14 »
Strangely enough, but now everything is in order, I rebuilt the project on another PC, and now everything is fine.
I'll try a couple more tests, and if this situation repeats, I'll send you my data/gui and txt file

7
Help requests / High memory consumption
« on: 09 September 2018, 17:55:03 »
Hi, I keep my gui in a txt file.
Load my gui:
Code: [Select]
tgui::Gui gui;
gui.loadWidgetsFromFile("MyTxtFile.txt")
my "MyTxtFile.txt":
Code: [Select]
///Top Panel
Panel."TopLeftPanel" {
    Position = (0, 0);
    Size = (385, 80);
    Visible = true;

    Renderer {
        BackgroundColor = Transparent;
    }

    Picture {
//Size = (500, 500);
Renderer {
texture = "data/gui/tiles/panels/LeftTopPanel.png";
transparenttexture = false;
}
    }
}

Panel."TopPanel" {
    Position = ("parent.width * 0.5 - 125", "0");
    Size = (270, 140);
    Visible = true;

    Renderer {
        BackgroundColor = Transparent;
    }

    Picture {
//Size = (500, 500);
Renderer {
texture = "data/gui/tiles/panels/TopPanel.png";
transparenttexture = false;
}
    }

    Label."Time" {
        AutoSize = true;
        Position = ("parent.width * 0.5 - 25", 10);
Text = "11:23";
        TextSize = 23;
   
        Renderer {
            BackgroundColor = Transparent;
            BorderColor = Black;
            Borders = (0, 0, 0, 0);
            Padding = (0, 0, 0, 0);
            TextColor = #BEBEBE;
        }
}

    Label."Date" {
        AutoSize = true;
        Position = ("parent.width * 0.5 - 35", 35);
Text = "01.01.1950";
        TextSize = 15;
   
        Renderer {
            BackgroundColor = Transparent;
            BorderColor = Black;
            Borders = (0, 0, 0, 0);
            Padding = (0, 0, 0, 0);
            TextColor = #BEBEBE;
        }
}

    Label."GameSpeed" {
        AutoSize = true;
        Position = ("parent.width * 0.5 - 5", 55);
Text = "1x";
        TextSize = 15;
   
        Renderer {
            BackgroundColor = Transparent;
            BorderColor = Black;
            Borders = (0, 0, 0, 0);
            Padding = (0, 0, 0, 0);
            TextColor = #BEBEBE;
        }
}
}

///MiniMap
Panel."MiniMap" {
    Position = ("parent.width - 300", "0");
    Size = (300, 300);
    Visible = true;

    Renderer {
        BackgroundColor = Transparent;
    }

    Picture {
//Size = (500, 500);
Renderer {
texture = "data/gui/tiles/panels/MiniMap.png";
transparenttexture = false;
}
    }

Canvas."MiniMapCanvas" {
Position = (44, 9);
Size = (250, 250);
}
}

Button."Bastion" {
    Position = (16, parent.height - 80);
    Size = (64, 64);
    Text = "";
    TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/ui.png" Part(0, 192, 64, 64);
texturedown = "data/gui/tiles/ui.png" Part(0, 256, 64, 64);
texturefocused =  "data/gui/tiles/ui.png" Part(0, 192, 64, 64);
texturehover = "data/gui/tiles/ui.png" Part(0, 320, 64, 64);
}
}

Button."Manager" {
    Position = (96, parent.height - 80);
    Size = (64, 64);
    Text = "";
    TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/ui.png" Part(64, 192, 64, 64);
texturedown = "data/gui/tiles/ui.png" Part(64, 256, 64, 64);
texturefocused =  "data/gui/tiles/ui.png" Part(64, 192, 64, 64);
texturehover = "data/gui/tiles/ui.png" Part(64, 320, 64, 64);
}
}

Button."Walls" {
    Position = (176, parent.height - 80);
    Size = (64, 64);
    Text = "";
    TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/ui.png" Part(128, 192, 64, 64);
texturedown = "data/gui/tiles/ui.png" Part(128, 256, 64, 64);
texturefocused =  "data/gui/tiles/ui.png" Part(128, 192, 64, 64);
texturehover = "data/gui/tiles/ui.png" Part(128, 320, 64, 64);
}
}

Button."Floor" {
    Position = (256, parent.height - 80);
    Size = (64, 64);
    Text = "";
    TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/ui.png" Part(192, 192, 64, 64);
texturedown = "data/gui/tiles/ui.png" Part(192, 256, 64, 64);
texturefocused =  "data/gui/tiles/ui.png" Part(192, 192, 64, 64);
texturehover = "data/gui/tiles/ui.png" Part(192, 320, 64, 64);
}
}

Button."Objects" {
    Position = (336, parent.height - 80);
    Size = (64, 64);
    Text = "";
    TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/ui.png" Part(256, 192, 64, 64);
texturedown = "data/gui/tiles/ui.png" Part(256, 256, 64, 64);
texturefocused =  "data/gui/tiles/ui.png" Part(256, 192, 64, 64);
texturehover = "data/gui/tiles/ui.png" Part(256, 320, 64, 64);
}
}

Button."Zones" {
    Position = (416, parent.height - 80);
    Size = (64, 64);
    Text = "";
    TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/ui.png" Part(320, 192, 64, 64);
texturedown = "data/gui/tiles/ui.png" Part(320, 256, 64, 64);
texturefocused =  "data/gui/tiles/ui.png" Part(320, 192, 64, 64);
texturehover = "data/gui/tiles/ui.png" Part(320, 320, 64, 64);
}
}

///ZonesPanel
ScrollablePanel."ZonesPanel" {
    ContentSize = (0, 0);
    Position = (0, parent.height - 528);
    Size = (280, 448);
Visible = false;

    Renderer {
        BackgroundColor = Transparent;
scrollbar {
texturearrowup = "data/gui/tiles/panels/ZonesPanel.png" Part(300, 0, 20, 20);
texturearrowuphover = "data/gui/tiles/panels/ZonesPanel.png" Part(320, 0, 20, 20);

texturearrowdown = "data/gui/tiles/panels/ZonesPanel.png" Part(300, 468, 20, 20);
texturearrowdownhover = "data/gui/tiles/panels/ZonesPanel.png" Part(320, 468, 20, 20);

texturethumb = "data/gui/tiles/panels/ZonesPanel.png" Part(340, 0, 20, 60) Middle(0, 20, 20, 20);
texturethumbhover = "data/gui/tiles/panels/ZonesPanel.png" Part(360, 0, 20, 60) Middle(0, 20, 20, 20);

texturetrack = "data/gui/tiles/panels/ZonesPanel.png" Part(300, 20, 20, 448);
texturetrackhover = "data/gui/tiles/panels/ZonesPanel.png" Part(320, 20, 20, 448);
}
    }

    Picture {
//Size = (500, 500);
Renderer {
texture = "data/gui/tiles/panels/ZonesPanel.png" Part(0, 0, 280, 800);
transparenttexture = false;
}
    }

    Button."Delete" {
        Position = (0, 0);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 0, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 64, 64, 64);
texturefocused =  "data/gui/tiles/panels/ZonesPanel.png" Part(384, 0, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 128, 64, 64);
}
    }

    Label."WarehouseGroup" {
        AutoSize = true;
        Position = (16, 80);
Text = "WarehouseGroup";
        TextSize = 15;
   
        Renderer {
            BackgroundColor = Transparent;
            BorderColor = Black;
            Borders = (0, 0, 0, 0);
            Padding = (0, 0, 0, 0);
            TextColor = #BEBEBE;
        }
}

    Button."Dump" {
        Position = (0, 96);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 192, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 256, 64, 64);
texturefocused =  "data/gui/tiles/panels/ZonesPanel.png" Part(384, 192, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 320, 64, 64);
}

    }

    Button."Warehouse" {
        Position = (64, 96);
        Size = (64, 64);
        Text = "";
        TextSize = 20;
   
Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(448, 192, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(448, 256, 64, 64);
texturefocused =  "data/gui/tiles/panels/ZonesPanel.png" Part(448, 192, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(448, 320, 64, 64);
}
    }

    Button."Barn" {
        Position = (128, 96);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(512, 192, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(512, 256, 64, 64);
texturefocused =  "data/gui/tiles/panels/ZonesPanel.png" Part(512, 192, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(512, 320, 64, 64);
}

    }

    Button."Armory" {
        Position = (192, 96);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(576, 192, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(576, 256, 64, 64);
texturefocused =  "data/gui/tiles/panels/ZonesPanel.png" Part(576, 192, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(576, 320, 64, 64);
}
   
    }

    Label."MiningGroup" {
        AutoSize = true;
        Position = (16, 176);
Text = "MiningGroup";
        TextSize = 15;
   
        Renderer {
            BackgroundColor = Transparent;
            BorderColor = Black;
            Borders = (0, 0, 0, 0);
            Padding = (0, 0, 0, 0);
            TextColor = #BEBEBE;
        }
}

    Button."Forestry" {
        Position = (0, 192);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 384, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 448, 64, 64);
texturefocused =  "data/gui/tiles/panels/ZonesPanel.png" Part(384, 384, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 512, 64, 64);
}

    }

    Button."Quarry" {
        Position = (64, 192);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(448, 384, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(448, 448, 64, 64);
texturefocused =  "data/gui/tiles/panels/ZonesPanel.png" Part(448, 384, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(448, 512, 64, 64);
}

    }

    Button."Energy" {
        Position = (128, 192);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(512, 384, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(512, 448, 64, 64);
texturefocused =  "data/gui/tiles/panels/ZonesPanel.png" Part(512, 384, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(512, 512, 64, 64);
}
   
    }

    Button."Engineering" {
        Position = (192, 192);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(576, 384, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(576, 448, 64, 64);
texturefocused =  "data/gui/tiles/panels/ZonesPanel.png" Part(576, 384, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(576, 512, 64, 64);
}
   
    }

    Button."MeatFarm" {
        Position = (0, 256);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 576, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 640, 64, 64);
texturefocused = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 576, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 704, 64, 64);
}

    }

    Button."VegetableFarm" {
        Position = (64, 256);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(448, 576, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(448, 640, 64, 64);
texturefocused = "data/gui/tiles/panels/ZonesPanel.png" Part(448, 576, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(448, 704, 64, 64);
}
   
    }

    Button."FruitFarm" {
        Position = (128, 256);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(512, 576, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(512, 640, 64, 64);
texturefocused = "data/gui/tiles/panels/ZonesPanel.png" Part(512, 576, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(512, 704, 64, 64);
}

    }

    Label."MilitaryGroup" {
        AutoSize = true;
        Position = (16, 336);
Text = "MilitaryGroup";
        TextSize = 15;
   
        Renderer {
            BackgroundColor = Transparent;
            BorderColor = Black;
            Borders = (0, 0, 0, 0);
            Padding = (0, 0, 0, 0);
            TextColor = #BEBEBE;
        }
}

    Button."Barracks" {
        Position = (0, 352);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 768, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 832, 64, 64);
texturefocused = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 768, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 896, 64, 64);
}
   
    }

    Label."RecreationGroup" {
        AutoSize = true;
        Position = (16, 432);
Text = "RecreationGroup";
        TextSize = 15;
   
        Renderer {
            BackgroundColor = Transparent;
            BorderColor = Black;
            Borders = (0, 0, 0, 0);
            Padding = (0, 0, 0, 0);
            TextColor = #BEBEBE;
        }
}

    Button."Bedroom" {
        Position = (0, 448);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 960, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 1024, 64, 64);
texturefocused = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 960, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 1088, 64, 64);
}

    }

    Label."HospitalGroup" {
        AutoSize = true;
        Position = (16, 528);
Text = "HospitalGroup";
        TextSize = 15;
   
        Renderer {
            BackgroundColor = Transparent;
            BorderColor = Black;
            Borders = (0, 0, 0, 0);
            Padding = (0, 0, 0, 0);
            TextColor = #BEBEBE;
        }
}

    Button."Hospital" {
        Position = (0, 544);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 1152, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 1216, 64, 64);
texturefocused = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 1152, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 1280, 64, 64);
}

    }

    Label."MarketGroup" {
        AutoSize = true;
        Position = (16, 624);
Text = "MarketGroup";
        TextSize = 15;
   
        Renderer {
            BackgroundColor = Transparent;
            BorderColor = Black;
            Borders = (0, 0, 0, 0);
            Padding = (0, 0, 0, 0);
            TextColor = #BEBEBE;
        }
}

    Button."Market" {
        Position = (0, 640);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 1344, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 1408, 64, 64);
texturefocused = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 1344, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 1472, 64, 64);
}

    }

    Label."CanteenGroup" {
        AutoSize = true;
        Position = (16, 720);
Text = "MarketGroup";
        TextSize = 15;
   
        Renderer {
            BackgroundColor = Transparent;
            BorderColor = Black;
            Borders = (0, 0, 0, 0);
            Padding = (0, 0, 0, 0);
            TextColor = #BEBEBE;
        }
}

    Button."Canteen" {
        Position = (0, 736);
        Size = (64, 64);
        Text = "";
        TextSize = 20;

Renderer {
textcolor = rgb(190, 190, 190);
textcolorhover = rgb(250, 250, 250);

texture = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 1536, 64, 64);
texturedown = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 1600, 64, 64);
texturefocused = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 1536, 64, 64);
texturehover = "data/gui/tiles/panels/ZonesPanel.png" Part(384, 1664, 64, 64);
}
   
    }
}
when rendering the interface is spent approximately 1 GB ?

I noticed that if I delete
Code: [Select]
ScrollablePanel."ZonesPanel"in "MyTxtFile.txt" then the memory is consumed much less, why so ?

8
Help requests / Re: Scrollbar and Panel
« on: 02 September 2018, 19:27:09 »
thx!

9
Help requests / ScrollablePanel 0.8 arrow texture
« on: 02 September 2018, 16:54:27 »
Hi, please tell me how to change the texture ScrollablePanel arrow
My ScrollablePanel in txt:
Quote
ScrollablePanel."MyScrollablePanel" {
    ContentSize = (0, 0);
    Position = (0, parent.height - 528);
    Size = (280, 448);

    Renderer {
        BackgroundColor = Transparent;
    }
}

10
Help requests / Re: Scrollbar and Panel
« on: 02 September 2018, 14:05:13 »
i using 0.7.7
My panel size is: 280, 448
My picture size: 280, 800

Scrollbar options:
Quote
    Scrollbar."Scrollbar" {
        ArrowScrollAmount: 1;
        AutoHide: false;
        LowValue: 1;
        Maximum: 10;
        Position: (256, 16);
        Size: (16, 424);
        Value: 0;
   
        Renderer {
            ArrowDownHoverImage: "Black.png" Part(183, 174, 20, 20) Middle(0, 1, 20, 19);
            ArrowDownImage: "Black.png" Part(163, 174, 20, 20) Middle(0, 1, 20, 19);
            ArrowUpHoverImage: "Black.png" Part(183, 154, 20, 20) Middle(0, 0, 20, 19);
            ArrowUpImage: "Black.png" Part(163, 154, 20, 20) Middle(0, 0, 20, 19);
            ThumbHoverImage: "Black.png" Part(143, 174, 20, 20);
            ThumbImage: "Black.png" Part(143, 154, 20, 20);
            TrackHoverImage: "Black.png" Part(123, 174, 20, 20);
            TrackImage: "Black.png" Part(123, 154, 20, 20);
        }
    }
The problem is that the picture does not completely disappear

11
Help requests / Scrollbar and Panel
« on: 02 September 2018, 13:34:10 »
Hi, I want to do that Scrollbar moving my Panel:
Quote
    scrollbar_ZonesPanel->connect("ValueChanged ", [&]()
                                        {
                                            int scrolbarValue = scrollbar_ZonesPanel->getValue();
                                            scrolbarValue = (scrolbarValue * 8 ) ? scrolbarValue * 8:8;

                                            for(auto& widget : panel_ZonesPanel->getWidgets())
                                                {
                                                    if(widget->getWidgetType() != "Scrollbar")
                                                        {
                                                            if(previousScrolbarValue < scrollbar_ZonesPanel->getValue())
                                                                {
                                                                    widget->setPosition(widget->getPosition().x, widget->getPosition().y - scrolbarValue);
                                                                }
                                                            else
                                                                {
                                                                    widget->setPosition(widget->getPosition().x, widget->getPosition().y + scrolbarValue);
                                                                }
                                                        }
                                                }
                                            previousScrolbarValue = scrollbar_ZonesPanel->getValue();
                                        });
This code works, but the problem is that in them it omits the panel, but on top in the original position is not, why?

12
Help requests / Re: v0.7.3 loadWidgetsFromFile - load child widget
« on: 26 February 2017, 13:45:20 »
thx!

13
Help requests / v0.7.3 loadWidgetsFromFile - load child widget
« on: 26 February 2017, 02:31:51 »
Hi,sorry for my bad english)

I had a problem loading widget.
For example, let it be this:
gui.txt
Code: [Select]
Panel."info" {
    Position: (0, 668);
    Size: (500, 300);
    Visible: false;

    Renderer {
        BackgroundColor: #967832;
        BorderColor: Black;
        Borders: (0, 0, 0, 0);
    }

    ProgressBar."info_health" {
        Maximum: 100;
        Minimum: 0;
        Position: (10, 40);
        Size: (200, 20);
        TextSize: 12;
        Value: 50;
   
        Renderer {
            BackImage: "data/GUI/theme/theme.png" Part(180, 64, 90, 40) Middle(20, 0, 50, 40);
            BorderColor: Black;
            Borders: (0, 0, 0, 0);
            FrontImage: "data/GUI/theme/theme.png" Part(180, 108, 90, 32) Middle(16, 0, 50, 32);
            TextColorBack: #BEBEBE;
            TextColorFront: #FAFAFA;
        }
    }
}

my code:
Code: [Select]
gui.loadWidgetsFromFile("gui.txt");
gui_panelInfo = gui.get<tgui::Panel>("info");
tgui::ProgressBar::Ptr  gui_ProgressBarHP;

tgui::ProgressBar::Ptr  gui_ProgressBarHP;
gui_ProgressBarHP = gui.get<tgui::ProgressBar>("info_health");
and everything seems to be OK, but when I write
Code: [Select]
gui.loadWidgetsFromFile("gui.txt");
gui_panelInfo = gui.get<tgui::Panel>("info");
tgui::ProgressBar::Ptr  gui_ProgressBarHP;

tgui::ProgressBar::Ptr  gui_ProgressBarHP;
gui_ProgressBarHP = gui.get<tgui::ProgressBar>("info_health");
gui_ProgressBarHP->setValue(50);
my app is crash, why ?

Pages: [1]