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 - Ruckamongus

#1
Sounds good. That's kind of what I thought, but I figured it doesn't hurt to get your opinion on it first. I'll send a PR whenever I get around to making it work the way I want. Thanks, Texus!
#2
Hey Texus,

I was wondering about your thoughts on the best approach to adding a button to the child window. In a project I'm porting to C++ I had a nice little GUI effect I liked. Some child windows could be closed or mildly hidden. For example:



The image on the right is what happens when the leftmost button is pressed. I'd like to add that button conditionally to some TGUI child windows. Would I be better off modifying the child window class directly or inheriting from it and adding it in? I don't foresee having more buttons than the two (so 0, 1, or 2 at most). Thoughts?
#3
I just tried it out, thanks a ton! It's a bit odd that the titlebar isn't included and as you said it needs large borders. Nonetheless, it gives me a good foundation to tweak some things to my project. I really appreciate your help, Texus!

I do have another question related to the ListBox widget. I'm trying to size it automatically:


void rightClickMenuCreate(tgui::Gui& gui, sf::Vector2f position, tgui::Theme::Ptr& theme, std::vector<std::string>&& options)
{
    popumMenu = theme->load("ListBox");
    std::size_t Max = 0;
    for (const auto& i: options)
    {
         popumMenu->addItem(i);
         Max = std::max(Max, WIDTH_OF_I);//<-------
    }

    popumMenu->setItemHeight(25);
    popumMenu->setPosition(position);
    popumMenu->setOpacity(0.8f);
    popumMenu->setSize(Max, popumMenu->getItemHeight() * popumMenu->getItemCount() + popumMenu->getRenderer()->getPadding().top * 2);
    popumMenu->connectEx("MouseReleased", [&](const tgui::Callback& e){rightClickMenuHandle(e.text); gui.remove(popumMenu); popumMenu = nullptr;});
    popumMenu->showWithEffect(tgui::ShowAnimationType::Fade, sf::milliseconds(275));
    gui.add(popumMenu);
}


How would you go about determining "WIDTH_OF_I"? I figured I'd create a sf::Text before the loop and set it's font to the ListBox's renderer's font. Then set the text in the loop and get its bounds. Is there a better way to do this?
#4
I'm a G++ guy, so no worries. I just tried it, and it works great! I can definitely work with this. Thanks so much!
#5
Texus,

I appreciate the timely reply!

I can definitely understand wanting to wait for the cursor changing thing. I just hope that out friends on the SFML side can get a decision made (hopefully itit doesn't turn into a clipboard scenario, haha). Perhaps I'll look into doing something makeshift for the time being.

As for the menu, that sounds perfect. I really don't need anything fancy at all; a list box would be sufficient as long as I can guarantee it stays within the view and has the correct depth (Imagine right clicking just under a window; the menu should draw over everything). Definitely don't set yourself back on this, but I'd be extremely grateful if you could whip up something for now; the right click menu is pretty integral in my interface and one main reason I haven't been motivated enough to port my project to C++ (prototyping in GameMaker... Eh).

As for the textbox thing, thanks for looking into it. Definitely no rush. I haven't updated my source for a couple of weeks either, so you may have fixed it since then.

Thanks a ton!
#6
Hey Texus,

Great GUI! I'd like to make two requests (one of which I made quite a while ago, I'm hoping to hear your more recent thoughts).

First, would you allow child windows to be resized like this:

I realize there is a setSize() function, but it feels limited not being able to drag the borders dynamically.


Second, can we have a right-click menu for the mouse? Even if it's super simple (doesn't even have to have sub-menus, icons, or dividers) for now?


Also, an unrelated bug report, it seems that the TextBox widget doesn't obey setOpacity() (0.7dev).

Thanks for your time!!
#7
Texus, it compiles now, thank you!
#8
Hello, all. I've ran into some issues when compiling the latest 0.7 source. I've been using 0.7 for a while now (5 months or more I believe, and this was on GCC 4.8; I haven't updated since that time). Unfortunately, when calling make after configuring with cmake, I'm getting some static assert errors about invalid point-to-member function stuff. Here's a pastebin: https://pastebin.com/VxJXXfKJ

Part of the error:
Code (cpp) Select

In instantiation of 'struct std::_Bind_check_arity<void (tgui::ComboBox::*)(), tgui::ComboBox*&, int>':
(SNIP template redundancy stuff)
required from 'unsigned int tgui::SignalWidgetBase::connect(const string&, Func, Args ...) [with Func = void (tgui::ComboBox::*)(); Args = {tgui::ComboBox*}; std::__cxx11::string = std::__cxx11::basic_string<char>]'
C:\Users\Cody\Downloads\TGUI-0.7-dev\TGUI-0.7-dev\src\TGUI\ComboBox.cpp:505:92:   required from here
c:\mingw\mingw\include\c++\5.1.0\functional:1426:7: error: static assertion failed: Wrong number of arguments for pointer-to-member
       static_assert(_Varargs::value


I've used a great deal of 0.7 stuff in my project so I'd rather not go back to 0.6 if it can be avoided. Any help you can provide would be much appreciated!
#9
Feature requests / PopupMenu
01 October 2014, 22:24:46
Hey is the PopupMenu widget (right-clicking menu) in the works yet? Just curious if there has been any progress? I assume it'll be a version 0.7 thing.
#10
General Discussion / Re: Textbox Pasting Error
18 September 2014, 20:15:15
Excellent! Thank you for the speedy fix!
#11
General Discussion / Textbox Pasting Error
18 September 2014, 19:57:40
Hey Texus,

It seems that the first linebreak (\n) being pasted into a textbox is ignored. All subsequent occurrences work as expected. I'm using the most recent master version (6, not 7) on GitHub.
#12
Feature requests / Re: Treeview Element
05 August 2013, 23:55:24
Okay, sounds good. Where should I look for the new version, GitHub?
#13
Feature requests / Re: Treeview Element
05 August 2013, 23:37:32
That doesn't seem too bad actually. A few of those sound like quick things, while others sound massive. Is it safe to start building a semi-large project with the current repository version, or do you anticipate many API changes soon? I haven't used TGUI since v0.5 first came out, but I've kept an eye on it. I understand a lot has changed since v0.5 but will there be more large changes soon?
#14
Feature requests / Re: Treeview Element
05 August 2013, 23:28:11
Sounds good, thanks for considering throwing it into the mix. What all still needs to be done before your satisfied with v0.6? Is there a place I can see a working to-do list?
#15
Feature requests / Treeview Element
05 August 2013, 23:15:56
Hey Texus, I love TGUI! I really appreciate the work you put into it! I was wondering if you've considered implementing a tree view element in the future. Something like this:



Thanks!