(svn r9091) [cpp_gui] -Codechange: Widgets now use container's coordinate space instead of window's space
/* $Id$ */
#include "../stdafx.h"
#include <stdarg.h>
#include "../openttd.h"
#include "../debug.h"
#include "../functions.h"
#include "../map.h"
#include "../player.h"
#include "../window.h"
#include "../gfx.h"
#include "../viewport.h"
#include "../console.h"
#include "../variables.h"
#include "../table/sprites.h"
#include "../genworld.h"
#include "../helpers.hpp"
#include "window_events.hpp"
#include "widget_types.h"
namespace gui {
/*virtual*/ void Label::DrawBackground(EvtPaint &ev)
{
if ((m_feature_flags & FF_TRANSPARENT) == FF_NONE) {
DrawFrameRect(m_color, FR_BG_ONLY);
}
}
/*virtual*/ void Label::OnPaint(EvtPaint &ev)
{
DrawBackground(ev);
Point center = Size() / 2;
DrawStringCentered(center.x, center.y - 5, m_text, 0);
ev.SetHandled();
}
}; // namespace gui