Labels + buttons ready
Windows platform executable
http://www.mediafire.com/file/6hr1gs6ecevpdv4/KitchenSink.rar/file
Windows platform executable
http://www.mediafire.com/file/6hr1gs6ecevpdv4/KitchenSink.rar/file
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 MenuQuoteWhat exactly do you want to me to look at with that gui?Nothing really. Just to take a look. I haven't used fairygui yet but i was looking for an alternative among other libraries if some project of mine wanted advance features for gui. In my programming years i have use wxWidgets, QT and dotnet. However the last years since i abandoned "MARMALADE" (in fact they abandoned us in first place) i am using sfml and tgui which tgui is great since i never had any problems.
picture = tgui::Picture::create(mFlagTextures[0]);
picture->setPosition(Settings::handler()->layoutWidth(flagXpos), Settings::handler()->layoutHeight(flagYpos));
picture->getRenderer()->setOpacityDisabled(0.3f);
picture->connect("MousePressed", [=]()
{
nextLang();
});
QuoteIf you were to set setRelativeTextPosition(0,0) there would still be some space next to the textI can't see why you bother about the space next to text or even in front of it or up or down if someone sets new relative position?
QuoteWhat should be optional exactly?maybe i misunderstand something here. I thought that you using setKeyRepeatEnabled with true parameter inside TGUI but that's is not happening. Correct?
QuotesetPressRepeat(sf::Time duration)that is how i imagined that. Great.
QuoteSo I think it might be better to add a function that prevents the button from gaining focus, instead of adding a function that disables space and return.I don't mind at all. Having a disableFocusEvent function is also good enough for me.
QuoteEvery text can have its own vertical and horizontal alignment on a given position inside the button. YES to position inside and YES to both alignments.
Quoteso it seems to work exactly like TGUI works now (with setKeyRepeatEnabled set to true)
QuoteAs far as I can tell it is the most common way to fire on mouse up events, all buttons that I come in contact with seem to work that way.
QuoteMaybe I should also add FocusedHover and FocusedDown states? Right now you can't tell that a button is focused when it is being hovered.
button->connect("MousePressed", [=]()
{
//mouse pressed event is triggering when mouse is up (after was down ok) correct?
});
Quote
Every text for every state can have its own outline border.
Quote
Do you mean outline color or also thickness? Colors I can agree with, but I feel like nobody would ever change the thickness per state even if I made it possible.
enum button_States
{
Normal,
Hover,
Down,
Disabled,
Focused
};
Sprite m_sprite[5];
Color m_borderColor[5];
Color m_backgroundColor[5];
Color m_TextColor[5];
void setBackgroundColor(button_States state, Color color);
void setTextColor(button_States state, Color color);