src/widget/widget_button.cpp
branchcpp_gui
changeset 6264 9fc3b5467396
parent 6258 a2f86b8fd99b
child 6271 0ad100a98853
--- a/src/widget/widget_button.cpp	Tue Feb 27 13:26:47 2007 +0000
+++ b/src/widget/widget_button.cpp	Tue Feb 27 22:47:59 2007 +0000
@@ -15,5 +15,22 @@
 #include "../table/sprites.h"
 #include "../genworld.h"
 #include "../helpers.hpp"
+#include "window_events.hpp"
+
+namespace gui {
+
+/*virtual*/ void Button::DrawBackground(EvtPaint &ev)
+{
+	DrawFrameRect(m_color, m_pushed ? FR_LOWERED : FR_NONE);
+}
+
+/*virtual*/ void Button::OnLeftClick(EvtClick &ev)
+{
+	m_pushed = !m_pushed;
+	CallHandlers(ev);
+	ev.SetHandled();
+	Invalidate();
+}
 
 
+}; // namespace gui