Pioneer
src
gui
GuiImageButton.h
Go to the documentation of this file.
1
// Copyright © 2008-2021 Pioneer Developers. See AUTHORS.txt for details
2
// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3
4
#ifndef _GUIIMAGEBUTTON_H
5
#define _GUIIMAGEBUTTON_H
6
7
#include "
GuiButton.h
"
8
#include "
GuiWidget.h
"
9
#include "
gui/GuiImage.h
"
10
11
#include <string>
12
13
namespace
Gui
{
14
class
ImageButton
:
public
Button
{
15
public
:
16
ImageButton
(
const
char
*img_normal);
17
ImageButton
(
const
char
*img_normal,
const
char
*img_pressed);
18
virtual
void
Draw
();
19
virtual
~ImageButton
();
20
virtual
void
GetSizeRequested
(
float
size[2]);
21
void
SetRenderDimensions
(
const
float
wide,
const
float
high);
22
23
private
:
24
void
LoadImages(
const
char
*img_normal,
const
char
*img_pressed);
25
Image
*m_imgNormal;
26
Image
*m_imgPressed;
27
};
28
}
// namespace Gui
29
30
#endif
/* _GUIIMAGEBUTTON_H */
GuiButton.h
GuiImage.h
GuiWidget.h
Gui::Button
Definition:
GuiButton.h:13
Gui::ImageButton
Definition:
GuiImageButton.h:14
Gui::ImageButton::GetSizeRequested
virtual void GetSizeRequested(float size[2])
Definition:
GuiImageButton.cpp:41
Gui::ImageButton::Draw
virtual void Draw()
Definition:
GuiImageButton.cpp:46
Gui::ImageButton::SetRenderDimensions
void SetRenderDimensions(const float wide, const float high)
Definition:
GuiImageButton.cpp:64
Gui::ImageButton::~ImageButton
virtual ~ImageButton()
Definition:
GuiImageButton.cpp:22
Gui::ImageButton::ImageButton
ImageButton(const char *img_normal)
Definition:
GuiImageButton.cpp:10
Gui::Image
Definition:
GuiImage.h:12
Gui
Definition:
Gui.cpp:10
Generated by
1.9.1