aboutsummaryrefslogtreecommitdiff
path: root/src/irrlicht_changes
Commit message (Collapse)AuthorAge
* StaticText: Reset background on EnrichedString change (#9340)SmallJoker2020-02-01
| | | This also fixes the F6 profiler background color -> now controlled by EnrichedString
* StaticText/EnrichedString: Styling support (#9187)SmallJoker2020-01-22
| | | | | | | | * StaticText/EnrichedString: Styling support * Fix tooltip fg/bgcolor * Fix default color for substr(), add unittests
* Refactor to centralize GUIButton styling/rendering code (#9090)Hugues Ross2019-12-09
|
* Formspec: add hypertext elementPierre-Yves Rollo2019-11-03
|
* Clean up and fix freetype=false crashes (#8641)SmallJoker2019-08-06
| | | | | A IGUIFont of type bitmap/vector cannot be converted to CGUITTFont Fixes various segfaults in gameplay Shorter font cache code, cleaned up (?)
* LINT fixes since recent tooling updateLoïc Blot2019-03-14
|
* Update our tooling (Clang 5 -> 7, GCC 7 -> 8)Loïc Blot2019-03-14
| | | | | | | | This change permits to use up-to-date compilers, clang-tidy and clang-format It also refactor the tidy/format step to drop the binary selection from scripts and perform it directly in travis
* Fix cast from const by accessing string data directly (#8354)rubenwardy2019-03-12
| | | Fixes #8327
* DragonFly BSD is somewhat identical to FreeBSD (#8159)Leonid Bobrov2019-02-03
|
* Drop .NET-specific workaround: _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIXnumber Zero2018-11-11
|
* Fix debug and info text being the wrong colorrubenwardy2018-08-05
| | | | Fixes #7623
* Fix tooltip colors specified by formspec partrubenwardy2018-08-04
|
* Forget to fix non freetype build in StaticTextLoic Blot2018-01-12
|
* Don't recalculate statustext initial color everytime & review fixesLoic Blot2018-01-05
|
* GameUI refactor (part 2/X): Move Game::guitext to GameUI + enhancements on ↵Loic Blot2018-01-05
| | | | | | | StaticText Other enhancements: * C++ friendlyness for addStaticText() -> move to static StaticText::add()
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
| | | | * Migrate cpp headers to pragma once
* Merge cguittfont lib in irrlicht change folder. (#6016)Loïc Blot2017-06-20
| | | | | | * Merge cguittfont lib in irrlicht change folder. This remove hack and static lib for FreeType
* Irrlicht 1.9 supportsfan52016-12-26
|
* Add colored text (not only colored chat).Ekdohibs2016-05-31
Add documentation, move files to a proper place and avoid memory leaks. Make it work with most kind of texts, and allow backgrounds too.
;text); // Logs without a prefix void logRaw(LogLevel lev, const std::string &text); void setTraceEnabled(bool enable) { m_trace_enabled = enable; } bool getTraceEnabled() { return m_trace_enabled; } static LogLevel stringToLevel(const std::string &name); static const std::string getLevelLabel(LogLevel lev); private: void logToOutputsRaw(LogLevel, const std::string &line); void logToOutputs(LogLevel, const std::string &combined, const std::string &time, const std::string &thread_name, const std::string &payload_text); const std::string getThreadName(); std::vector<ILogOutput *> m_outputs[LL_MAX]; // Should implement atomic loads and stores (even though it's only // written to when one thread has access currently). // Works on all known architectures (x86, ARM, MIPS). volatile bool m_silenced_levels[LL_MAX]; std::map<std::thread::id, std::string> m_thread_names; mutable std::mutex m_mutex; bool m_trace_enabled; }; class ILogOutput { public: virtual void logRaw(LogLevel, const std::string &line) = 0; virtual void log(LogLevel, const std::string &combined, const std::string &time, const std::string &thread_name, const std::string &payload_text) = 0; }; class ICombinedLogOutput : public ILogOutput { public: void log(LogLevel lev, const std::string &combined, const std::string &time, const std::string &thread_name, const std::string &payload_text) { logRaw(lev, combined); } }; class StreamLogOutput : public ICombinedLogOutput { public: StreamLogOutput(std::ostream &stream) : m_stream(stream) { } void logRaw(LogLevel lev, const std::string &line) { m_stream << line << std::endl; } private: std::ostream &m_stream; }; class FileLogOutput : public ICombinedLogOutput { public: void open(const std::string &filename); void logRaw(LogLevel lev, const std::string &line) { m_stream << line << std::endl; } private: std::ofstream m_stream; }; class LogOutputBuffer : public ICombinedLogOutput { public: LogOutputBuffer(Logger &logger, LogLevel lev) : m_logger(logger) { m_logger.addOutput(this, lev); } ~LogOutputBuffer() { m_logger.removeOutput(this); } void logRaw(LogLevel lev, const std::string &line) { m_buffer.push(line); } bool empty() { return m_buffer.empty(); } std::string get() { if (empty()) return ""; std::string s = m_buffer.front(); m_buffer.pop(); return s; } private: std::queue<std::string> m_buffer; Logger &m_logger; }; extern StreamLogOutput stdout_output; extern StreamLogOutput stderr_output; extern std::ostream null_stream; extern std::ostream *dout_con_ptr; extern std::ostream *derr_con_ptr; extern std::ostream *dout_server_ptr; extern std::ostream *derr_server_ptr; #ifndef SERVER extern std::ostream *dout_client_ptr; extern std::ostream *derr_client_ptr; #endif extern Logger g_logger; // Writes directly to all LL_NONE log outputs for g_logger with no prefix. extern std::ostream rawstream; extern std::ostream errorstream; extern std::ostream warningstream; extern std::ostream actionstream; extern std::ostream infostream; extern std::ostream verbosestream; extern std::ostream dstream; #define TRACEDO(x) do { \ if (g_logger.getTraceEnabled()) { \ x; \ } \ } while (0) #define TRACESTREAM(x) TRACEDO(verbosestream x) #define dout_con (*dout_con_ptr) #define derr_con (*derr_con_ptr) #define dout_server (*dout_server_ptr) #define derr_server (*derr_server_ptr) #ifndef SERVER #define dout_client (*dout_client_ptr) #define derr_client (*derr_client_ptr) #endif #endif