Main Menu
Menu

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.

Show posts Menu

Messages - wmbuRn

#26
It was sf::String. It should be: std::vector<tgui::EditBox::Ptr> Ime1napomene; So i changed it.

This is new error:  base operand of '->' has non-pointer type 'std::vector<tgui::SharedWidgetPtr<tgui::EditBox> >'

So i believe i havent used: Ime1napomene = Group1Napomene->get("Ime" + tgui::to_string(i));
// to get EditBoxes named "Ime" from Group1Napomene. Even if i add that i have same error i posted above.

#27
I want to transfer values from Panel1 EditBox 1 to Panel2 Editbox1.

This is how i get Values from editbox [its Texus code]:

// this works, i used same thing to get values and to write them on .txt file
tgui::Panel::Ptr Group1 = gui.get("Group1");
EditBoxNames[i] = Group1->get("Ime" + tgui::to_string(i)); // get EditboxNames
Group1Names.push_back(EditBoxNames[i]->getText());        // getText from editboxes
// but i cant transfer those values into another panel

tgui::Panel::Ptr Group1Napomene = gui.get("Group1Napomene");  // get Group1Napomene
                                                                                                            // which is another panel

Ime1napomene->setText(Group1Names));

The problem is Ime1napomene have error: base operand of '->' has non-pointer type 'sf::String' . I just need help with code, becouse i never learned std::vectors, and now i am asking for help. Need to finnish this fast so i can start learning things i missed.

Thank you in advance
wmbuRn



#28
Help requests / Re: arrays on 30 editBoxes
23 July 2013, 20:26:42
No core Dumped. Thanks. I will report back if its working when i start using

Group1Names.push_back(EditBoxNames[i]->getText());

for encrypting Values and then saving them to a file. And also for transfering values from one group to another [like from Group1 to Group1Notes]

Thank you
#29
Help requests / Re: arrays on 30 editBoxes
23 July 2013, 20:06:52
This is short version of Group1.hpp



// stuff like panel size, pictures bla bla bla

    // Begin editBox Ime
    for (unsigned int i = 1; i <= 30; ++i)
    {
        tgui::EditBox::Ptr Ime(*Group1, "Ime" + tgui::to_string(i));
        Ime->load("Data/Buttons/Black.conf");
        Ime->setMaximumCharacters(15);
        Ime->setSize(120, 15);
        Ime->setPosition(20, (i * 110) - 40);
        // i never used  EditBoxNames.push_back(editBox);
       }
    // End of editBox Ime;

// other EditBoxes Here, Labels, CheckBoxes
// all of them are shown when the program is compiled and they do what they are supossed to do :)
// then it comes this

std::vector<sf::String> Group1Names;
std::vector<tgui::EditBox::Ptr> EditBoxNames;
// Take Text from EditBoxes
for (unsigned int i = 1; i <= 30; ++i)
{
    tgui::Panel::Ptr Group1 = gui.get("Group1");
    EditBoxNames[i] = Group1->get("Ime" + tgui::to_string(i));
    Group1Names[i] = EditBoxNames[i]->getText();
}

So EditBoxes are created before "Take Text from EditBoxes".
#30
Help requests / Re: arrays on 30 editBoxes
23 July 2013, 16:42:35
So here is how code looks in the end:

std::vector<tgui::EditBox::Ptr> Group1Names;
std::vector<tgui::EditBox::Ptr> EditBoxNames;
for (unsigned int i = 1; i < 30; ++i)
{
    tgui::Panel::Ptr Group1 = gui.get("Group1");
    EditBoxNames[i] = Group1->get("Ime" + tgui::to_string(i));
    Group1Names[i]->setText(EditBoxNames[i]->getText());
}


After compiling and running i get: Segmentation fault (core dumped)
When i comment out [ with /*  */ that part of code program works]. So problem is with my program. I will seek to it. Thank you very much.

Edit:

std::vector<tgui::EditBox::Ptr> Group1Names;

Should not be EditBox it should be array variable [ 30 of them] that holds value from 30 editboxes.

edit2:
Here is how it should be:

std::vector<sf::String> Group1Names;
std::vector<tgui::EditBox::Ptr> EditBoxNames;
for (unsigned int i = 1; i <= 30; ++i)
{
    tgui::Panel::Ptr Group1 = gui.get("Group1");
    EditBoxNames[i] = Group1->get("Ime" + tgui::to_string(i));
    Group1Names[i] = EditBoxNames[i]->getText();
}

Group1Names is sf::String [also vector] that can hold values from EditBoxes. EditBoxNames holds values like Ime1, Ime2, ime3... Ime30. So at the end Group1Names take Text from EditBoxes. After compiling i get:  Segmentation fault (core dumped) which should not happend.

This is code for 1 EditBox:

tgui::Panel::Ptr Group1 = gui.get("Group1");
tgui::EditBox::Ptr Ime1 = Group1->get("Ime1");
sf::String Name = Ime1->getText();


This is for 30:


std::vector<sf::String> Group1Names;
std::vector<tgui::EditBox::Ptr> EditBoxNames;
for (unsigned int i = 1; i <= 30; ++i)
{
    tgui::Panel::Ptr Group1 = gui.get("Group1");
    EditBoxNames[i] = Group1->get("Ime" + tgui::to_string(i));
    Group1Names[i] = EditBoxNames[i]->getText();
}

Which is not working. :)
#31
Help requests / Re: arrays on 30 editBoxes
23 July 2013, 16:08:14

EditBoxNames[i] = Group1->get("Ime" + to_string(i));

I get error: 'to_string' was not declared in this scope. [ i #include <string>  in main file ]

to_string is part of std::

EditBoxNames[i] = Group1->get("Ime" + std::to_string(i));

i get error: 'to_string' is not a member of 'std'. So i can conclude i dont have c++11 support. Will chack that with my compiler.

So i tried:

EditBoxNames[i] = Group1->get("Ime" + tgui::to_string(i)); // tgui:: instead of std::

I get error  no match for 'operator=' in 'Group1Names.std::vector<_Tp, _Alloc>::operator[] [with _Tp = tgui::SharedWidgetPtr<tgui::EditBox>, _Alloc = std::allocator<tgui::SharedWidgetPtr<tgui::EditBox> >, std::vector<_Tp, _Alloc>::reference = tgui::SharedWidgetPtr<tgui::EditBox>&, std::vector<_Tp, _Alloc>::size_type = unsigned int](i) = tgui::EditBox::getText() const()'|

My gcc is version: gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
To have support for c++11 i need either 4.7 gcc or 4.8.1. Should i update my gcc or there is solution with 4.6.3? :)
#32
Help requests / arrays on 30 editBoxes
23 July 2013, 04:26:25
Basicly if i want to take value of a edit box i have to do this:

tgui::Panel::Ptr Group1 = gui.get("Group1");
tgui::EditBox::Ptr Ime1 = Group1->get("Ime1");
sf::String Name = Ime1->getText();

And it takes value of EditBox named "Ime1" and stores it to variable "Name". To do that for 30 editBoxes is a lot of code.. and i have 120 EditBoxes [in 1 group, having 18 groups in total is a lot lot lot lot of code] I can do that, dont have problem with that, but i am interested in using arrays. But arrays wont work. And i dont know why. I made test console application and arrays work there but in sfml and tgui they wont.
Here is  code:

sf::String Name[30];
sf::String Group1Ime[30];
for (unsigned int i = 1; i < 30; ++i) // 30 editboxes named Ime
{
Name[i] = "Group1->get(Ime[i])";
Group1Ime[i] = "Name[i]->getText()";
}

So nothing works, i changed code thousand times, and i get tons of different errors. And i know why this one doesnt work. Basicly i am doing this:

Group1Ime[i] = "Group1->get(Ime[i])->getText()";


I tried with std::vector

std::vector<tgui::EditBox::Ptr> Group1Names;
std::vector<tgui::EditBox::Ptr> EditBoxNames;
for (unsigned int i = 1; i < 30; ++i)
{
    tgui::Panel::Ptr Group1 = gui.get("Group1");
    EditBoxNames[i] = Group1->get("Ime" + "to_string(i)"); // error here becouse of "", even with Ime[i]
    Group1Names[i] = EditBoxNames[i]->getText();
}

No go. Nothing works. Any clues or hints ? :)
#33
Installation help / Re: gcc errors in linux
21 July 2013, 03:14:05
kk no problem :)
#34
Help requests / Re: scrollbar tutorials?
19 July 2013, 20:24:31
Container* works as it should. Thank you.

Scrollbar is part of (*Group1). Off to make more Groups and to continue working on this app :)

Added another group, another Scrollbar another scrollbarValueChangedGroup2, bindEx the new scrollbar and it is working. So thank you very much :)
#35
Help requests / Re: scrollbar tutorials?
19 July 2013, 20:10:42
I tried both, scrollbar being (gui, "Scrollbar) and being (*Group1, "Scrollbar).

With being

tgui::Scrollbar::Ptr scrollbar(gui, "Scrollbar");


I have plenty of output from

std::cout << "widgets[i].get(): " << widgets[i].get() << std::endl;

Thats becouse Scrollbar is working as it should.


with scrollbar being (*Group1, "Scrollbar")

Group1.get(): 0xa152a30
callback.widget: 0xa4ae058
callback.widget->getParent(): 0xa152af8
Swing Studio 0: /usr/local/include/TGUI/SharedWidgetPtr.hpp:271: T* tgui::SharedWidgetPtr<T>::operator->() const [with T = tgui::Panel]: Assertion `m_WidgetPtr != __null' failed.
Aborted (core dumped)


After adding your code, and scrollbar(*Group1, "Scrollbar")

std::cout << callback.widget->getParent()->get("Group1").get() << std::endl;

I have this output:

Group1.get(): 0x93e9b18
callback.widget: 0x9745140
callback.widget->getParent(): 0x93e9be0
getParent()->get(group1): 0
Swing Studio 0: /usr/local/include/TGUI/SharedWidgetPtr.hpp:271: T* tgui::SharedWidgetPtr<T>::operator->() const [with T = tgui::Panel]: Assertion `m_WidgetPtr != __null' failed.
Aborted (core dumped)


After adding your code, and scrollbar(gui, "Scrollbar")

std::cout << callback.widget->getParent()->get("Group1").get() << std::endl;

I have this output:

callback.widget: 0xa4d3010
callback.widget->getParent(): 0xbf94ed34
getParent()->get(group1): 0xa1779e8
widgets[i].get(): 0xa178cb0
widgets[i].get(): 0xa178f58
widgets[i].get(): 0xa171dd0
widgets[i].get(): 0xa172860
widgets[i].get(): 0xa1733e8
widgets[i].get(): 0xa173ec0
  // and more widgets[i] output here




With:

tgui::Panel* Group1 = callback.widget->getParent();

i get this error:

error: invalid conversion from 'tgui::Container*' to 'tgui::Panel*' [-fpermissive]


Do you want me to upload entire project? After its done it will be opensource anyway :) [except encryption will be removed] :)
#36
Help requests / Re: scrollbar tutorials?
19 July 2013, 19:42:04
std::cout << callback.widget->getParent()->get("Group1") << std::endl;

Is not working, i get this error >> error: no match for 'operator<<' in 'std::cout << tgui::Container::get(const sf::String&) const((* & sf::String(((const char*)"Group1"), (*(const std::locale*)(& std::locale())))))'

So i removed that line. I used these lines:

std::cout << "callback.widget: " << callback.widget << std::endl; // at the beggining of     
                                                                                                           //scrollbarValueChanged

std::cout << "callback.widget->getParent() : " << callback.widget->getParent() << std::endl;
std::cout << "widgets[i].get(): " << widgets[i].get() << std::endl; // this one is inside
                                                                                                           // for loop  scrollbarValueChanged

std::cout << "Group1.get(): " << Group1.get() << std::endl;    // before Scrollbar


Here is the output:

Group1.get(): 0x9858978
callback.widget: 0x985a990
callback.widget->getParent() : 0x9858a40
Swing Studio 0: /usr/local/include/TGUI/SharedWidgetPtr.hpp:271: T* tgui::SharedWidgetPtr<T>::operator->() const [with T = tgui::Panel]: Assertion `m_WidgetPtr != __null' failed.
Aborted (core dumped)

#37
Help requests / Re: scrollbar tutorials?
19 July 2013, 19:19:18
Quote- You make a different scrollbar inside every groups that need it. This will allow every scrollbar to have its own callback function and to do different things in every group.

Thats what i was thinking, except

tgui::Scrollbar::Ptr scrollbar(*Group1, "Scrollbar");
    scrollbar->load("Data/Buttons/Black.conf");
    scrollbar->setLowValue(600);
    scrollbar->setMaximum(3400);
    scrollbar->setSize(15, 530);
    scrollbar->setPosition(785, 0);
    scrollbar->bindCallbackEx(scrollbarValueChanged, tgui::Scrollbar::ValueChanged);


Crashes the program with:

/usr/local/include/TGUI/SharedWidgetPtr.hpp:271: T* tgui::SharedWidgetPtr<T>::operator->() const [with T = tgui::Panel]: Assertion `m_WidgetPtr != __null' failed.
Aborted (core dumped)


I am using your function for scrollbarValueChanged:

void scrollbarValueChanged(const tgui::Callback& callback)
{
tgui::Panel::Ptr Group1 = callback.widget->getParent()->get("Group1");

    // Reposition the object
    std::vector<tgui::Widget::Ptr> widgets = Group1->getWidgets();
    std::vector<sf::String> widgetNames = Group1->getWidgetNames();
    for (unsigned int i = 0; i < widgets.size(); ++i)
    {
            if (widgetNames[i] != "Scrollbar")  // even if i change this same thing happend.
            widgets[i]->move(0, scrollbarValue - callback.value);
    }

    scrollbarValue = callback.value;
}
#38
Help requests / Re: scrollbar tutorials?
19 July 2013, 14:35:52
Currently i have 3 panels. mainScreen, loginScreen, and Group1. With "tgui::Scrollbar::Ptr scrollbar(gui, "Scrollbar");" i see scrollbar in Group1, loginScreen and mainScreen and i dont need scrollbar on panels loginScreen and mainScreen. Will try autohide(). On each panel will access to scrollbar and will set value greater than max Value and hopefully scrolbar will be hidden on those 2 panels. A good chance to learn something new. :)

QuoteDo you have code like "gui->get("Scrollbar")" there or something like that?

No, i am still using your scrollbarValueChanged function. Need to change code inside it. I have some widgets i want to move and some i dont want to move. I know how to set some widgets to move and some not to move. So i will fix widgets, except for scrollbar.

Quotetgui::Scrollbar::Ptr scrollbar(*Group1, "Scrollbar");

Causes the crash with same code i posted before, and i have:

for (unsigned int i = 0; i < widgets.size(); ++i)
    {
            if (widgetNames[i] != "Scrollbar")
            widgets[i]->move(0, scrollbarValue - callback.value);
    }

Inside scrollbarValueChanged() . Thats what confuzed me. Everything from Group1 works except for scrollbar. i will work on it :)


Edit:
"tgui::EditBox::Ptr Name(*Group1, "EditBox" + tgui::to_string(i));" works, i can access to what is written in EditBox. Since i can access to whats is written inside EditBox i can store that information into .txt file, sql databases or object files. Also i can copy what is written inside one Group into another Group. 
I added 4th panel. Scrollbar is not working there. It is visible but it wont scroll widgets. so i def. need to set  "tgui::Scrollbar::Ptr scrollbar(*Group1);"
, "tgui::Scrollbar::Ptr scrollbar(*Group2);" In different panels.
#39
Help requests / Re: scrollbar tutorials?
19 July 2013, 02:03:46
More beer for me :)

So

tgui::Scrollbar::Ptr scrollbar(*Group1);

Doesnt work, when i change values of scrollbar [with mouse or mouse scroll] program crashes with

/usr/local/include/TGUI/SharedWidgetPtr.hpp:271: T* tgui::SharedWidgetPtr<T>::operator->() const [with T = tgui::Panel]: Assertion `m_WidgetPtr != __null' failed.
Aborted (core dumped)

So i will figure it out.

with

tgui::Scrollbar::Ptr scrollbar(gui, "Scrollbar");

works flawlesly, except i see scrollbar in panel where i dont need scrollbar :)

Also

for (unsigned int i = 1; i <= 40; ++i)
    {
        tgui::EditBox::Ptr Name(*Group1, tgui::to_string(i));
        Name->load("Data/Buttons/Black.conf");
        Name->setMaximumCharacters(15);
        Name->setSize(120, 15);
        Name->setPosition(20, (i * 110) - 40);
    }

Need to figure out how to access each editBoxes to read it values, and to modify them. Will learn it eventualy. Never used "to_string(i)" before, nor "c_str" since i never needed them. :)
#40
Help requests / Re: scrollbar tutorials?
18 July 2013, 22:53:56
yup it makes it to work. Thank you very much :) i owe you a beer :)
#41
Help requests / Re: scrollbar tutorials?
18 July 2013, 19:18:25

#include <TGUI/TGUI.hpp>

int scrollbarValue = 0;

void Group1( tgui::Gui& gui )
{
    tgui::Panel::Ptr Group1(gui, "Group1");
    Group1->setSize(800, 530);
    for (unsigned int i = 1; i <= 40; ++i)
    {
        tgui::Picture::Ptr pic(*Group1, tgui::to_string(i));
        pic->load("Data/Ucenik" + tgui::to_string(i) + ".png");
        pic->setSize(80, 80);
        pic->setPosition(20, i * 110.0f);
    }
        tgui::Button::Ptr button(*Group1);
        button->load("/home/xwm/Black.conf");
        button->setSize(80, 40);
        button->setText("Button");
        button->setPosition(150, 110);

        tgui::Button::Ptr button2(*Group1);
        button2->load("/home/xwm/Black.conf");
        button2->setSize(80, 40);
        button2->setText("Button");
        button2->setPosition(300, 220);

}
void scrollbarValueChanged(const tgui::Callback& callback)
{
tgui::Panel::Ptr panel = callback.widget->getParent()->get("Group1");

    // Reposition the object
    std::vector<tgui::Widget::Ptr> widgets = panel->getWidgets();
    std::vector<sf::String> widgetNames = panel->getWidgetNames();
    for (unsigned int i = 0; i < widgets.size(); ++i)
    {
            widgets[i]->move(0, scrollbarValue - callback.value);
    }
}



int main()
{
    sf::RenderWindow window(sf::VideoMode(800, 600), "TGUI window");
    tgui::Gui gui(window);
    window.setFramerateLimit(30);
    Group1(gui);



    // Create the scrollbar
    tgui::Scrollbar::Ptr scrollbar(gui, "Scrollbar");
    scrollbar->load("Black.conf");
    scrollbar->setLowValue(600); // 4 images fit inside the window
    scrollbar->setMaximum(4500); // 10 images in total
    scrollbar->setSize(15, 530);
    scrollbar->setPosition(785, 0);
    scrollbar->bindCallbackEx(scrollbarValueChanged, tgui::Scrollbar::ValueChanged);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();

            gui.handleEvent(event);
        }

        window.clear(sf::Color::White);
        gui.draw();
        window.display();
    }
}

I declared global variable even with variable.cpp and variable.h [ extern int scrollbarValue ] but things get worse than they were :)
#42
Help requests / Re: scrollbar tutorials?
18 July 2013, 00:25:43
Yes, when i switch tgui::Button::Ptr button(*Group1); into >> tgui::Button::Ptr button(gui); they dont scroll, they stick on given position. Which is great. But using your code [with buttons being (*Group1) cause all the widgets to change positions to X:0 , Y:0 and buttons come to the last place [after pictures] with same X:0 and Y:0 coordinates.

edit: I solved position changing, but buttons come to the last place. So i believe if i have more widgets they will all move after pictures. So only thing that changes position is this line :

for (unsigned int i = 0; i < widgets.size(); ++i)
    {
        // Don't move the scrollbar
        if (widgetNames[i] != "Scrollbar")
            widgets[i]->setPosition(20, i * 110.0f - callback.value);
    }


Also when program is loaded pictures are displayed as they should [including the button location] but when i scroll down after first picture and scroll back my 1st picture have X:20 and Y:0 position, and not as they had when the program loaded. They had [X:20, Y:110]
#43
Installation help / Re: gcc errors in linux
17 July 2013, 22:00:09
New build, no errors

https://pastebin.com/KwT9fuqJ


Downloaded TGUI-Master aabout 10 mins ago.
#44
Help requests / Re: scrollbar tutorials?
17 July 2013, 21:34:52
All widgets needs to move when scrollbar value changes. So i dont need diferent approach :) will test your code, and hopefully i will make to work what i planned :) . Thank you again. :)

Ok i make it

#include <TGUI/TGUI.hpp>


void scrollbarValueChanged(const tgui::Callback& callback)
{
    tgui::Container* gui = callback.widget->getParent();

    // Reposition the object
    std::vector<tgui::Widget::Ptr> widgets = gui->getWidgets();
    std::vector<sf::String> widgetNames = gui->getWidgetNames();
    for (unsigned int i = 0; i < widgets.size(); ++i)
    {
        // Don't move the scrollbar
        if (widgetNames[i] != "Scrollbar")
            widgets[i]->setPosition(0, i * 110.0f - callback.value);
    }
}

void Group1( tgui::Gui& gui )
{
    tgui::Panel::Ptr Group1(gui, "Group1");
    Group1->setSize(800, 4500);
   
// Create 40 images displayed below each other
    for (unsigned int i = 1; i <= 40; ++i)
    {
       
        tgui::Picture::Ptr pic(*Group1, tgui::to_string(i));
        pic->load("Data/Ucenik" + tgui::to_string(i) + ".png");
        pic->setSize(80, 80);
        pic->setPosition(20, i * 110);
    }

        tgui::Button::Ptr button(*Group1);
        button->load("/home/xwm/Black.conf");
        button->setSize(80, 40);
        button->setText("Button");
        button->setPosition(150, 110);

        tgui::Button::Ptr button2(*Group1);
        button2->load("/home/xwm/Black.conf");
        button2->setSize(80, 40);
        button2->setText("Button");
        button2->setPosition(300, 220);

}

int main()
{
    sf::RenderWindow window(sf::VideoMode(800, 600), "TGUI window");
    tgui::Gui gui(window);
    window.setFramerateLimit(30);
    Group1(gui);

    // Create the scrollbar
    tgui::Scrollbar::Ptr scrollbar(gui, "Scrollbar");
    scrollbar->load("Black.conf");
    scrollbar->setLowValue(600); // 4 images fit inside the window
    scrollbar->setMaximum(4500); // 10 images in total
    scrollbar->setSize(15, 600);
    scrollbar->setPosition(785, 0);
    scrollbar->bindCallbackEx(scrollbarValueChanged, tgui::Scrollbar::ValueChanged);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();

            gui.handleEvent(event);
        }

        window.clear(sf::Color::White);
        gui.draw();
        window.display();
    }
}

but here is the catch >  Group1->setSize(800, 4500);  [y is 4500 so it will display all 40 pictures]. I want that size to be >  Group1->setSize(800, 530); [ y = 530] so i have 800x70 pixels free to make buttons that wont move. But when i use code >  Group1->setSize(800, 530); only 4 pictures are shown and i scrolldown to emepty whitte screen. :) How to make scrollable area to be (800x530) and to have 800x70 free pixels for other buttons. :)
#45
Help requests / Re: scrollbar tutorials?
17 July 2013, 01:54:21
Managed to add scrollbar in screen with pictures. Managed to add space between pictures. But i cant add labels [ if i add labels pictures uses label->setPosition, and they change their position.] Cant add Buttons, checkboxes, editBoxes.. I cant add anything other than pictures.Please  point me to direction what to read to have container that holds everything. :)


why scrollbar?
- Lets say i need to display 40 "users", so every user have 4 editboxes, 12 checkboxes, and 1 picture. If 4 "users" can be displayed on screen, means i will need 10 screens. Lets say i need 10 groups (400 "users" in total). Thats abaout 100 screens. Which can be solved with scrollbar easily. That would be 10 screen, 40 "users" per screen. Without scrollbar i will need 28.900 lines of code to do what i planned. So please point me somewhere, 28k lines is something i can do in 2 days, but i am looking for better solution  :)

here is the pic that will explain better:
https://s11.postimg.org/ocjzs4c1f/Swing_studio_info.png

About Project:
Small project for my friend. He has dancing group [ one of best Europe] and he needs a simple program so he can writte down names and info about his crew members.And how much Training each of his member went to. I know i could do that in Excel in 15 mins but that wont help me to learn tGui and SFML. I will sell this program for money that doesnt exist in my country since 1999. :) Worth of that money in 1999 was about 0.01$ [yup that much] now is just 0$ becouse the money is worthless for the past 14 years :) Program will be able to save info into file, [.txt.] in the beggining until my C/SQL developer gets back from vacation. :)

with respect
wmbuRn
#46
Help requests / Re: scrollbar tutorials?
15 July 2013, 15:21:00
Thank you. Will writte tutorials after i learn tgui. Which will be a week. To master it will take some time. I will writte tutorial you just review the code and if its professional level post it or do whatet you feel like :)

Thank you for your answer :)
#47
Help requests / scrollbar tutorials?
15 July 2013, 03:46:29
Maybe i am becoming pain in the *** ? :) But there are no tutorials online that shows usage of scrollbar. Even code included in 0.6-dev [example "FulExample"] only displays scrollbar. Which i can do :). But lets say i want to display 10 pictures in a column. they are 80x80, so only about 4 or 5 fit on resolution 800x600. iI want to use scrollbar to scroll down to see other pictures. How to do that? Simple code :). Also after all these questions i asked, i will make tutorial code and if texus allow will be displayed on site or shipped with "examples" dir. So new users will have more tutorials nad wont ask questions like me :)

Thanks in advance
wmbuRn
#48
Maybe i will use sfeMovie after i master this gui :) Thanks for your help, i will stick with static images for now :) latter will do what you said [ image by image, and forget previous] but i am glad i learned something new. :)
#49
Most PC today can handle application that uses 500 mb of ram. Mine can too [ i hope so :) ] Give me a minute and i will tell you how much ram it will take for both apps when they handles 571 pics :)

Low memory one took more than 950 mb of ram [ cant take more since i have 1.3gb ddr1 ram
[and my desktop become useless, cant click on anything] [ i can post pictures if needed]

High memory program blocks my pc entirely. :)

I am a user, i will use whatever you made for using :)

Pictures are 48 mb all. [571 pics], taken from 720p mp4 file [ with "ffmpeg" program ] so their size is 720p. Will take new Frames out of source video (and will set destination width=800 height=530 ] and will check with your programs again. Will reply in few minutes

Tested with 150 pictures 5mb total.
size is 800x530

Low memory app 570 mb in ram.
High memory app 1gb in ram, my desktop becomes useless.


#50
Second code reduced memory usage [247 mb in ram]. I hate arrays btw, id rather put 530 frames myself then writtin 1 line of array :)

Will it matter if i resize original images to resolution 800x530?

High memory:
https://s24.postimg.org/uutj7elol/High_memory.png

Low memory:
https://s21.postimg.org/a306xmhef/Low_memory.png

Both taking 80-100% cpu [ there is no .setFramerateLimit(n) (n is any number). Even with 30 FPS its the same amount of memory, just cpu went down to 0% up to 3% :)