(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 TextButton::OnPaint(EvtPaint &ev)
{
DrawBackground(ev);
Point center = Size() / 2;
if (m_pushed) center += Point(1, 1);
DrawStringCentered(center.x, center.y - 5, m_text, 0);
ev.SetHandled();
}
}; // namespace gui