Last change
on this file since 8696 was
8694,
checked in by bensch, 19 years ago
|
nicer look, but still pretty fucked up 
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | orxonox - the future of 3D-vertical-scrollers |
---|
3 | |
---|
4 | Copyright (C) 2004 orx |
---|
5 | |
---|
6 | This program is free software; you can redistribute it and/or modify |
---|
7 | it under the terms of the GNU General Public License as published by |
---|
8 | the Free Software Foundation; either version 2, or (at your option) |
---|
9 | any later version. |
---|
10 | |
---|
11 | ### File Specific: |
---|
12 | main-programmer: Benjamin Grauer |
---|
13 | co-programmer: ... |
---|
14 | */ |
---|
15 | |
---|
16 | #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_SHELL |
---|
17 | |
---|
18 | #include "glgui_imagebutton.h" |
---|
19 | |
---|
20 | #include "debug.h" |
---|
21 | |
---|
22 | namespace OrxGui |
---|
23 | { |
---|
24 | |
---|
25 | GLGuiImageButton::GLGuiImageButton(const std::string& label, unsigned int levelID, const std::string& imageName, GLGuiImage* image) |
---|
26 | : GLGuiPushButton(label) |
---|
27 | { |
---|
28 | this->imageName = imageName; |
---|
29 | this->levelID = levelID; |
---|
30 | this->image = image; |
---|
31 | } |
---|
32 | |
---|
33 | GLGuiImageButton::~GLGuiImageButton() |
---|
34 | {} |
---|
35 | |
---|
36 | void GLGuiImageButton::releasing(const Vector2D& pos, bool focused) |
---|
37 | { |
---|
38 | this->emit(startLevel(this->levelID)); |
---|
39 | } |
---|
40 | |
---|
41 | void GLGuiImageButton::receivedFocus() |
---|
42 | { |
---|
43 | this->image->loadImageFromFile(this->imageName); |
---|
44 | } |
---|
45 | void GLGuiImageButton::removedFocus() |
---|
46 | { |
---|
47 | } |
---|
48 | |
---|
49 | |
---|
50 | void GLGuiImageButton::showing() |
---|
51 | { |
---|
52 | this->image->show(); |
---|
53 | } |
---|
54 | |
---|
55 | void GLGuiImageButton::hiding() |
---|
56 | { |
---|
57 | this->image->hide(); |
---|
58 | } |
---|
59 | |
---|
60 | |
---|
61 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.