aboutsummaryrefslogtreecommitdiff
path: root/src/log.h
Commit message (Expand)AuthorAge
* Remove unused functions reported by cppcheck (#10463)SmallJoker2020-10-05
* Add chat_log_level setting (#9223)SmallJoker2020-05-14
* Move debug.txt after it grows too big (#8904)HybridDog2019-09-07
* Fix --color command line parameter ignorance (#7173)HybridDog2019-03-05
* Fix missing warningstream (or similar problem) (#7034)you2018-03-04
* Add coloured logs (#4549)you2017-12-06
* Modernize various files (src/k*, src/l*)Loic Blot2017-08-18
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
* Remove threads.h and replace its definitions with their C++11 equivalents (#5...ShadowNinja2017-06-11
* Use C++11 mutexes only (remove compat code) (#5922)Loïc Blot2017-06-06
* Add server side ncurses terminalest312015-11-06
* Small logging refactor and additional optionsest312015-10-24
* Refactor loggingShadowNinja2015-10-14
* Move globals from main.cpp to more sane locationsCraig Robbins2015-04-01
* Log: Silence errorstream during unittestskwolekr2014-12-12
* Update Copyright YearsSfan52013-02-24
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
* Switch the license to be LGPLv2/later, with small parts still remaining as GP...Perttu Ahola2012-06-05
* Add better trace peudo-loglevel supportPerttu Ahola2012-05-20
* Add a third log output interface methodPerttu Ahola2011-11-29
* Add log_remove_output and log_deregister_threadPerttu Ahola2011-11-29
* Initially add small and tight logging facilityPerttu Ahola2011-10-16
class="hl opt"><video::SColor, 4> &bordercolors, const std::array<s32, 4> &borderwidths) : gui::IGUIElement(gui::EGUIET_ELEMENT, env, parent, id, rectangle), m_colors(colors), m_bordercolors(bordercolors), m_borderwidths(borderwidths) { } void GUIBox::draw() { if (!IsVisible) return; std::array<s32, 4> negative_borders = {0, 0, 0, 0}; std::array<s32, 4> positive_borders = {0, 0, 0, 0}; for (size_t i = 0; i <= 3; i++) { if (m_borderwidths[i] > 0) positive_borders[i] = m_borderwidths[i]; else negative_borders[i] = m_borderwidths[i]; } v2s32 upperleft = AbsoluteRect.UpperLeftCorner; v2s32 lowerright = AbsoluteRect.LowerRightCorner; v2s32 topleft_border = { upperleft.X - positive_borders[3], upperleft.Y - positive_borders[0] }; v2s32 topleft_rect = { upperleft.X - negative_borders[3], upperleft.Y - negative_borders[0] }; v2s32 lowerright_border = { lowerright.X + positive_borders[1], lowerright.Y + positive_borders[2] }; v2s32 lowerright_rect = { lowerright.X + negative_borders[1], lowerright.Y + negative_borders[2] }; core::rect<s32> main_rect( topleft_rect.X, topleft_rect.Y, lowerright_rect.X, lowerright_rect.Y ); std::array<core::rect<s32>, 4> border_rects; border_rects[0] = core::rect<s32>( topleft_border.X, topleft_border.Y, lowerright_border.X, topleft_rect.Y ); border_rects[1] = core::rect<s32>( lowerright_rect.X, topleft_rect.Y, lowerright_border.X, lowerright_rect.Y ); border_rects[2] = core::rect<s32>( topleft_border.X, lowerright_rect.Y, lowerright_border.X, lowerright_border.Y ); border_rects[3] = core::rect<s32>( topleft_border.X, topleft_rect.Y, topleft_rect.X, lowerright_rect.Y ); video::IVideoDriver *driver = Environment->getVideoDriver(); driver->draw2DRectangle(main_rect, m_colors[0], m_colors[1], m_colors[3], m_colors[2], &AbsoluteClippingRect); for (size_t i = 0; i <= 3; i++) driver->draw2DRectangle(m_bordercolors[i], border_rects[i], &AbsoluteClippingRect); IGUIElement::draw(); }