00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifdef HAVE_CONFIG_H
00020 # include <config.h>
00021 #endif
00022
00023 #include "gamewin.h"
00024 #include "Gump_button.h"
00025 #include "Gump.h"
00026
00027
00028
00029
00030
00031
00032 void Gump_button::push
00033 (
00034 )
00035 {
00036 pushed = 1;
00037 paint();
00038 gwin->set_painted();
00039 }
00040
00041
00042
00043
00044
00045 void Gump_button::unpush
00046 (
00047 )
00048 {
00049 pushed = 0;
00050 paint();
00051 gwin->set_painted();
00052 }
00053
00054
00055
00056
00057
00058 void Gump_button::double_clicked
00059 (
00060 int x, int y
00061 )
00062 {
00063 }
00064
00065
00066
00067
00068
00069 void Gump_button::paint
00070 (
00071 )
00072 {
00073 int px = 0;
00074 int py = 0;
00075
00076 if (parent)
00077 {
00078 px = parent->get_x();
00079 py = parent->get_y();
00080 }
00081
00082 int prev_frame = get_framenum();
00083 set_frame(prev_frame + pushed);
00084 paint_shape(x+px, y+py);
00085 set_frame(prev_frame);
00086
00087 }