(svn r9032) [cpp_gui] -Cleanup(r9023): removed forgotten unused StickyBox::OnPaint()
/* $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 StickyBox::OnCreate(EvtCreate &ev)
{
// move itself to the right side of the parent
Rect16 rc = m_container->GetRect();
rc.SetLeft(rc.Right() - (DEFAULT_WIDTH - 1));
rc.SetBottom(rc.Top() + (DEFAULT_HEIGHT - 1));
SetRect(rc);
SetAnchors(PIN_TOP | PIN_RIGHT);
super::OnCreate(ev);
}
/*virtual*/ void StickyBox::OnLeftClick(EvtLeftClick &ev)
{
BaseWindow *w = GetWindow();
assert(w != NULL);
w->m_feature_flags = (w->m_feature_flags & ~FF_STICKED) | (m_pushed ? FF_STICKED : FF_NONE);
}
}; // namespace gui