summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textfield.h
AgeCommit message (Collapse)AuthorFilesLines
2025-03-24Expanded GUI theming capabilitiesThorbjørn Lindeijer1-13/+17
* Moved previously hardcoded values for frame size, padding and title bar height to the Skin. * Added support for rendering colored rectangles (used for scroll bar background). * Scroll bar width is now determined by its skin. * Added separate skins for horizontal and vertical scroll bars and horizontal and vertical scroll markers and added a skin for the shortcut box. * Added support for hovered state on window close button.
2025-03-14Moved widget drawing code into ThemeThorbjørn Lindeijer1-11/+0
This is cleaner overall since now each widget type no longer needs to keep track of its own instances and updating of the GUI alpha. It also introduces a single point from where the GUI theme support can be enhanced. Theme is no longer a singleton, though for now there is a single instance owned by the Gui singleton. Widgets adjusted to delegate their painting to the Theme: * Button * Tab * TextField * CheckBox * RadioButton * Slider * DropDown * ProgressBar * ScrollArea * ResizeGrip * PlayerBox (by subclassing ScrollArea) The Window and Popup widgets already use the theme through the Skin class. They can actually use a different skin per instance, though this feature is only used by the SpeechBubble.
2025-01-21Replaced include guards with #pragma onceThorbjørn Lindeijer1-4/+1
Thanks to https://github.com/cgmb/guardonce and a follow-up replace to remove duplicated newlines at end of file: find src -type f -name '*.h' -exec \ sed --in-place -e :a -e '/^\n*$/{$d;N;};/\n$/ba' {} \; Source: https://unix.stackexchange.com/questions/81685/how-to-remove-multiple-newlines-at-eof Fixes compile on macOS, which appears to have been due to the EVENT_H include guard.
2024-03-12General code cleanupsThorbjørn Lindeijer1-5/+2
* Use default member initializers * Use range-based for loops * Avoid needless pointer references for ShopItem::mDuplicates * Removed type aliases that are only used once or twice * Removed more unused includes * Removed some unused functions * Removed superfluous .c_str() * Rely on default copy and assignment operators for Vector class * Use std::unique_ptr in some places * Removed duplicated mPlayerMoney updating in SellDialog * Removed duplicated Game::handleInput call * Removed unused SDLInput::mMouseInWindow * Removed remnant of manual widget positioning in HelpWindow * Removed superfluous initialization of static pointers
2024-02-22General code cleanupsThorbjørn Lindeijer1-2/+3
* Use default member initializers * Use range-based loops * Don't use 'else' after 'return' * Removed some unused includes * Construct empty strings with std::string() instead of "" * Clear strings with .clear() instead of assigning "" * Check whether strings are empty with .empty() instead of comparing to "" * Removed redundant initializations
2024-02-13General code cleanupsThorbjørn Lindeijer1-5/+6
* Removing unused includes * Use member initialization * Use range-based for loops * Use nullptr * Removed no longer used aliases * Use override * Don't use else after return * Use '= delete' to remove implicit members * Use std::string::empty instead of comparing to ""
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-6/+6
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2024-01-25Ported to SDL2Thorbjørn Lindeijer1-0/+6
2012-05-05Fixed compilation errors and warnings with GCC 4.7Thorbjørn Lindeijer1-0/+1
Also, since GCC 4.7 there is a binary compatibility issue when linking with a Guichan that was not compiled in C++11 mode. This commit also allows compiling with GCC 4.7 with C++11 mode turned off. Reviewed-by: Erik Schilling
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2010-08-31Fixing auto complete and chat historyStefan Dombrowski1-2/+2
Reviewed-by: Jaxad0127
2010-08-29Move handling of autocomplete and input history into TextFieldJared Adams1-5/+63
Reviewed-by: Freeyorp
2010-08-25Adding autoComplete for inviteStefan Dombrowski1-0/+11
Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2010-02-25Handle Ctrl+v for pasting in text fieldsThorbjørn Lindeijer1-0/+2
Reviewed-by: Jared Adams
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
2010-02-07Updated Copyright year to 2010!Bertram1-1/+1
Also added the update copyright tool from the Wormux Team. ( And not forgetting credit's due. :P )
2010-01-07Chat auto completingAndrei Karas1-2/+2
2009-09-03Resolved Mantis #847: Login stage Windows won't go less than the default gui ↵Bertram1-0/+5
opacity. Of course, in-game, the wanted opacity still shows up.
2009-05-08Got rid of the non-functional TextFieldListenerBjørn Lindeijer1-18/+7
Pointed out by Jaxad0127. We might want to enable its intended functionality in a different way later.
2009-04-07Moved basic widgets into the gui/widgets directoryBjørn Lindeijer1-0/+109
In an attempt to make the GUI code a little more structured, basic widgets are now put in gui/widgets. Many includes were also cleaned up.