src/widget/widget_button_img2.cpp
author KUDr
Sat, 10 Mar 2007 08:53:59 +0000
branchcpp_gui
changeset 6295 a88d8c2cff6e
parent 6290 8078f7a3c8a0
permissions -rw-r--r--
(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 ImageButton2::OnPaint(EvtPaint &e)
{
	DrawBackground(e);
	if (m_pushed) {
		DrawSprite(m_sprite_pushed, PAL_NONE, m_sprite_offset_pushed + Point(3, 3));
	} else {
		DrawSprite(m_sprite, PAL_NONE, m_sprite_offset + Point(2, 2));
	}
}

} // namespace gui