summaryrefslogtreecommitdiff
path: root/src/gui/widgets/chattab.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-01-21Fixed ConfigOptionChanged eventsThorbjørn Lindeijer1-1/+1
With the statically typed config we no longer get an event for each changed config value. Where relevant, this is now done through `setConfigValue`. The `Event` now uses a `std::any`, which for `ConfigOptionChanged` events is set to the changed `Config` member. This allows for a type-safe check on which config value was changed.
2025-01-20Made client config statically typedThorbjørn Lindeijer1-2/+2
This makes accessing the config values much faster, since it no longer needs to do a lookup nor string conversion, which means we could remove some needless copying of the values. Overall it makes it easier to find out where settings are used and it puts the defaults along with the declaration. Options with default values are no longer saved to the config file. This does not include unrecognized options, which are kept around to provide some compatibility with older clients. While most basic options have kept the same name, more complicated settings like window geometry, shortcuts, outfits, etc. now have their own XML elements. Older clients will ignore these and erase them when saving the configuration.
2024-10-26Fixed FPS limit being enabled by defaultThorbjørn Lindeijer1-1/+1
There were some inconsistencies between the values set up in `Client::initConfiguration` and those in `getConfigDefaults`. These duplicates have now been removed. For some of these settings the code getting the values had to be adjusted to use getBoolValue, to actually rely on the provided default instead of one provided as a parameter.
2024-10-18General code cleanupsThorbjørn Lindeijer1-3/+2
2024-09-28Removed getter/setter cruft from ItemInfoThorbjørn Lindeijer1-3/+3
Made the class and the code in general more readable by removing all the needless getters and setters.
2024-08-31Some margin and indentation tweaks in news and NPC dialogsThorbjørn Lindeijer1-0/+1
* Apply indentation after wrapping only in NPC dialogs and chat window, since we don't want this in the updater window / news. * Added some margin around the text in the updater window and NPC dialogs, using gcn::Widget::setFrameSize. * Cosmetic changes to BrowserBox implementation.
2024-06-25Fixed spaces getting added to chat every 50 charactersThorbjørn Lindeijer1-23/+2
This reverts part of 087babc2525ddb89e5b31f240a08739d9a3029a9. It's unclear to me why big words should be split (chat window force-wraps when necessary anyway) and it's causing issues by adding spaces in the middle of links, for example.
2024-02-22General code cleanupsThorbjørn Lindeijer1-4/+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-1/+0
* 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-02-09Optimized BrowserBoxThorbjørn Lindeijer1-4/+2
* Introduced a LayoutContext that conveniently allows for relayouting all rows, or just a single one when it is added. BrowserBox::addRow no longer relayouts all the rows. * BrowserLink and LinePart are now merged into a new TextRow struct, so they can be conveniently dropped when the row limit has been reached. * Removed "opaque" option, which was enabled by default but disabled for all BrowserBox instances. * Removed "always update" option, and instead start delaying relayouting automatically when there are a lot of rows (> 100 currently). * Update window now also has text wrapping enabled. Closes #50
2012-02-18Added notification sound on receiving whisperThorbjørn Lindeijer1-3/+20
One of the sound channels is reserved for notification sounds, of which the volume can be configured separately. Currently, the only notification sound that is played is for receiving whispers. That can be extended later. The newmessage.ogg sound used currently is the one for receiving a message with the Psi instant messenger. Parts of this patch are based on the new message notification in ManaPlus. Reviewed-by: Erik Schilling
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2012-01-20Made the ignore record parameter usefulErik Schilling1-1/+1
Reviewed-by: Bjorn.
2012-01-16Renamed some file names for consistency with the class namesThorbjørn Lindeijer1-1/+1
This was already done by ManaPlus. It's a good idea anyway and it makes comparing the code a little easier. Reviewed-by: Yohann Ferreira
2012-01-10player_node -> local_playerYohann Ferreira1-1/+1
Reviewed-by: Ablu
2012-01-09Made the chat text much more readable in every opacity case.Yohann Ferreira1-0/+37
I added text shadow and outline support to the browserbox, and made it adapt the text for the chattabs depending on the GUI opacity. Reviewed-by: Ablu.
2010-11-01Merge branch '0.5' of gitorious.org:mana/manaYohann Ferreira1-0/+1
Conflicts: src/being.cpp src/client.cpp src/commandhandler.cpp src/gui/setup_video.cpp src/gui/socialwindow.cpp src/gui/viewport.cpp src/gui/widgets/browserbox.cpp src/gui/widgets/itemcontainer.cpp src/imageparticle.cpp src/localplayer.cpp src/localplayer.h src/map.cpp src/net/tmwa/beinghandler.cpp src/particle.cpp src/particle.h src/player.cpp src/player.h
2010-09-29Improve chat speed.Andrei Karas1-0/+1
Parse chat lines in BrowserBox once after changes. Reviewed-by: Thorbjorn
2010-09-25Merge branch '1.0'Thorbjørn Lindeijer1-0/+6
Conflicts: src/actorspritemanager.h src/beingmanager.cpp src/game.cpp src/gui/beingpopup.cpp src/gui/chat.cpp src/gui/chat.h src/gui/inventorywindow.h src/gui/itempopup.cpp src/gui/socialwindow.cpp src/gui/statuswindow.cpp src/gui/widgets/chattab.cpp src/gui/widgets/chattab.h src/net/tmwa/inventoryhandler.cpp src/net/tmwa/partyhandler.cpp src/party.cpp src/sound.cpp src/utils/stringutils.cpp src/utils/stringutils.h
2010-08-29Move handling of autocomplete and input history into TextFieldJared Adams1-0/+6
Reviewed-by: Freeyorp
2010-08-26Merged testing branch into master.Yohann Ferreira1-1/+1
2010-07-28Centralized configuration default values using the VariableData system.Yohann Ferreira1-2/+2
Please note that I didn't turned all the getValue() call into new ones, simply because I have to have config object initiated which is not forcefully the case the branding file. Resolves: Manasource Mantis #170.
2010-06-29Make whisper responses from tmwAthena show up in correct tabsJared Adams1-1/+1
Reviewed-by: Bertram
2010-05-01Add chat logging.Andrei Karas1-0/+10
Add option in players setup page. Add command line option. Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2010-03-12Split Palette into Theme and UserPaletteJared Adams1-1/+1
Themes can now control the colors they use. Colors in the Viewport (being names, particles, etc) can still be changed by the user. Also make ProgressBars more easily colored. DyePalette was made more flexible in the process. Also fixes comparing strings of different lengths insensitively. Reviewed-by: Thorbjørn Lindeijer
2010-02-22Change chat autocompletion to be more flexibleJared Adams1-5/+0
Reviewed-by: Chuck Miller
2010-02-22Fixed crash on exit when you're part of a guildThorbjørn Lindeijer1-1/+3
When the ChannelTab gets deleted by the Channel, the ChatWindow may have already been removed. So before telling it that the tab got deleted, check whether it's still there. 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-12Improve chat speed.Andrei Karas1-2/+23
For improve chat speed this patch add some hacks to BrowserBox class, split big words in ChatTab. Also fix DoS in chat.
2010-01-11Cleanup GUI classesJared Adams1-3/+3
Moved remaining widgets into widgets folder, standardized include order, moved TextRenderer out.
2010-01-07Chat auto completingAndrei Karas1-0/+5
2009-07-26Gettext fixesKess Vargavind1-1/+1
And a Swedish translation of the desktop file.
2009-05-24Made some parameters const references like they should beBjørn Lindeijer1-1/+2
2009-05-23Fixed the empty item link crash differentlyBjørn Lindeijer1-14/+8
The crash was due to an assertion which shouldn't have been there, so I removed the assertion instead. I've also made sure the unknown item has its id initialized to 0, so that it can be used to check against instead of the item name. Normalization of item names was moved within the item database.
2009-05-23Fix a segmentation faultKess Vargavind1-8/+12
The client crashed when entering [] inside an item link, for example the string [[]]. (cherry picked from commit 86a055d46df5a262fce0f76697cc3d54e75b19e1)
2009-05-13Remove Aethyra's custom visible GM systemJared Adams1-7/+0
Very hackish and would require altering eAthena. It also isn't very portable; if you use the same character name on multiple servers and are a GM on one of them, the client will try to make you a GM on the other.
2009-05-12Fix up handling of GM statusJared Adams1-1/+1
2009-05-03Moved strprintf into stringutils.{h,cpp}Bjørn Lindeijer1-1/+0
2009-05-02Make sure messages on most tabs are handled rightJared Adams1-1/+1
2009-04-26Remove a debugging statementJared Adams1-1/+0
2009-04-25Fix chat actionsJared Adams1-1/+2
2009-04-16Some more cleanupsBjørn Lindeijer1-6/+7
Nothing in particular worth mentioning.
2009-04-16Some cleanupsBjørn Lindeijer1-1/+1
* std::string arguments to 'const std::string &' * findMember2 renamed to findOrCreateMember * Made some functions const
2009-04-15Make whisper tabs optionalJared Adams1-3/+3
2009-04-13Fixed broken linksDavid Athay1-3/+0
2009-04-13Fixed @'s in a user's nickDavid Athay1-0/+3
2009-04-09Fixed some warningsBjørn Lindeijer1-1/+2
Unused variable, compiler suggested braces to disambiguate an else statement and another comparision between signed and unsigned integers.
2009-04-09Made BeingManager methods const where appropriateBjørn Lindeijer1-5/+0