Commit Graph

41 Commits (master)

Author SHA1 Message Date
SmallJoker ecc6f4ba25
Remove a few unused functions reported by callcatcher (#11658) 2021-10-12 20:12:20 +02:00
DS e79d6154fc
Fix client-side performance of chat UI (#11612) 2021-09-19 20:23:35 +02:00
pecksin 040aed37ab Remove closing paren as weblink delimiter 2021-08-29 19:30:33 +02:00
pecksin 1805775f3d
Make chat web links clickable (#11092)
If enabled in minetest.conf, provides colored, clickable (middle-mouse or ctrl-left-mouse) weblinks in chat output, to open the OS' default web browser.
2021-06-20 17:20:24 +02:00
sfan5 c834d2ab25 Drop wide/narrow conversion functions
The only valid usecase for these is interfacing with OS APIs
that want a locale/OS-specific multibyte encoding.
But they weren't used for that anywhere, instead UTF-8 is pretty
much assumed when it comes to that.
Since these are only a potential source of bugs and do not fulfil
their purpose at all, drop them entirely.
2021-02-02 20:46:08 +01:00
SmallJoker f46509d5e2
Remove unused functions reported by cppcheck (#10463)
Run unused functions reported by cppcheck

This change removes a few (but not all) unused functions.
Some unused helper functions were not removed due to their complexity and potential of future use.
2020-10-05 09:07:33 +02:00
Loic Blot 8e0b80aa36
Fix last performance-type-promotion-in-math-fn problems 2018-04-04 07:42:40 +02:00
Loïc Blot 2481ea27ce
Fix many issues reported by clang-tidy (#7189)
* Fix many issues reported by clang-tidy

We have many issues in code related to some performance to float <-> double.
Clang-tidy reported it in performance-type-promotion-in-math-fn

I fixed many of them. It's not ready for a promote to blocking

Also fix some value which should be const-ref
2018-04-02 23:51:08 +02:00
Loic Blot 326b0faa5e GameUI refactor (part 5/X): Move Game::guitext_chat to GameUI class
Other enhancements:
* Move update_profiler_gui to Game class
* Move updateChat to Game class
2018-01-05 20:59:30 +01:00
SmallJoker 6e5109fd46
Chat: Remove prompt history duplicates (#6762) 2017-12-14 19:47:29 +01:00
Esteban I. RM 792e013eaf
don't pass g_settings around, and use it directly 2017-10-17 19:22:09 +02:00
Esteban I. RM 0e8ee84d74
Implement #6096 2017-10-17 19:21:32 +02:00
Ekdohibs b24e6433df Add clientside translations. 2017-08-24 17:54:10 +02:00
Loïc Blot 1c1c97cbd1 Modernize source code: last part (#6285)
* Modernize source code: last par

* Use empty when needed
* Use emplace_back instead of push_back when needed
* For range-based loops
* Initializers fixes
* constructors, destructors default
* c++ C stl includes
2017-08-20 13:30:50 +02:00
Loic Blot 90dfafcda2
cavegen.cpp, chat.cpp: modernize code 2017-08-16 08:26:04 +02:00
Loïc Blot 76be103a91 C++11 patchset 9: move hardcoded init parameters to class definitions (part 1) (#5984)
* C++11 patchset 9: move hardcoded init parameters to class definitions

C++11 introduced the possibility to define the default values directly in class definitions, do it on current code

Also remove some unused attributes

* CollisionInfo::bouncy
* collisionMoveResult::collides_xy
* collisionMoveResult::standing_on_unloaded
* Clouds::speed

* More constructor cleanups + some variables removal

* remove only write guiFormSpecMenu::m_old_tooltip
* move header included inside defintions in genericobject.h
* remove some unused since years exception classes
* remove unused & empty debug_stacks_init
* remove unused & empty content_nodemeta_serialize_legacy
* remove forgotten useless bool (bouncy) in collision.cpp code
2017-06-16 11:25:52 +02:00
Loïc Blot 8797a0aa4b chat.cpp fix wchar_t isspace -> iswspace & wrong isspace on an index (#5783) 2017-05-20 12:56:02 +02:00
red-001 00972d42d7 this might fix #5661, needs testing (#5775) 2017-05-20 10:48:44 +02:00
Loïc Blot ce9802266e Various code cleanup & little performance improvement on HTTP download (#5772)
* Disable or remove unused enum members/functions
* Tiny code style fixes
* Make some functions const
* Replace ClientMediaDownloader std::unordered_map with std::map
2017-05-20 08:15:56 +02:00
Loïc Blot f3fe62a0bf Fix various copy instead of const ref reported by cppcheck (#5615)
* Also remove InventoryList::peekItem unused function
* Fix some post increment to preincrement reported by cppcheck
2017-04-19 23:02:07 +02:00
Ekdohibs 14ef2b445a Add colored text (not only colored chat).
Add documentation, move files to a proper place and avoid memory leaks.
Make it work with most kind of texts, and allow backgrounds too.
2016-05-31 17:34:29 +02:00
TriBlade9 1d40385d4a Colored chat working as expected for both freetype and non-freetype builds. @nerzhul improvements * Add unit tests * Fix coding style * move guiChatConsole.hpp to client/ 2016-05-31 17:34:29 +02:00
Kahrl 2cdd9b4ab6 Chat: Keep scroll position constant in ChatBuffer::deleteOldest() 2016-05-08 02:51:23 +01:00
Ekdohibs 48939df9a5 Escape more strings: formspecs, item descriptions, infotexts...
Also, change the escape character to the more standard \x1b
Thus, it can be used in the future for translation or colored text,
for example.
2016-04-24 03:54:11 +10:00
ShadowNinja 93887043d9 Clean up Strfnd
Changes:
  * Fix indentation.
  * Pass strings by const reference.
  * Merge Strfnd and WStrfnd into one class instead of copying them.
  * Remove trailing spaces.
  * Fix variable names.
  * Move to util.
  * Other miscellaneous style fixes.
2016-03-19 21:27:57 -04:00
Ekdohibs 095f623fa7 Remove chat escape sequences from chat messages, for future colored chat. 2016-03-15 17:33:15 +01:00
ShadowNinja 430929e75a Add text selection and copying to console 2016-03-02 23:23:31 -05:00
Esteban I. Ruiz Moreno effa24737d Use the console instead of a dedicated window when pressing keymap_chat/cmd
keymap_console opens a full window for chat history browsing.
2016-03-02 23:23:31 -05:00
Nathaniel Olsen 3ae8b92be6 Remove unneccessary space for tab completion 2015-06-16 07:16:22 +02:00
Craig Robbins ced6d20295 For usages of assert() that are meant to persist in Release builds (when NDEBUG is defined), replace those usages with persistent alternatives 2015-03-07 22:41:47 +10:00
gregorycu 5b55deb1eb Suppress MSVC warning in chat.cpp 2015-01-25 16:09:23 +10:00
Kahrl daefd0ab36 Add paste command (Ctrl-V) in GUIChatConsole 2014-12-10 07:12:08 +01:00
Kahrl 206f076422 Fix typo in comment in chat.cpp 2014-09-14 15:37:27 +02:00
Kahrl 4e1f50035e Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
PilzAdam b0e6806077 Fix nick completion 2013-04-05 02:31:58 +02:00
Ilya Zhuravlev 6a1670dbc3 Migrate to STL containers/algorithms. 2013-03-11 19:08:39 -04:00
Sfan5 6d0ea26c2d Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam 497ff1ecd6 Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
Perttu Ahola d0ea6f9920 Properly and efficiently use split utility headers 2012-06-17 02:40:36 +03:00
Perttu Ahola 037b259197 Switch the license to be LGPLv2/later, with small parts still remaining as GPLv2/later, by agreement of major contributors 2012-06-05 18:54:07 +03:00
Kahrl 967f25461b Chat console, including a number of rebases and modifications.
Defaults modified from original: alpha=200, key=F10
2012-03-10 20:11:10 +02:00