YourCityInvadedByAliens
Documentation for code of the game
src
render
ui
render_button_simple.h
Go to the documentation of this file.
1
2
#pragma once
3
#include "
render.h
"
4
5
class
RenderButtonSimple
:
public
RenderObject
{
6
7
public
:
8
RenderButtonSimple
(
9
SDL_Texture* tex,
10
CoordXY
pos,
11
int
nPositionZ = 0
12
);
13
virtual
void
modify
(
const
GameState
& state,
IRenderWindow
* pRenderWindow)
override
;
14
virtual
bool
canDraw
(
const
GameState
& state)
override
;
15
virtual
void
draw
(SDL_Renderer* renderer)
override
;
16
void
setAnimate
(
bool
bAnimate);
17
18
private
:
19
SDL_Texture*
m_pTexture
;
20
CoordXY
m_position
;
21
int
m_nTextureWidth
;
22
int
m_nTextureHeight
;
23
bool
m_bAnimate
;
24
25
SDL_Rect
m_currentFrame
;
26
};
render.h
RenderButtonSimple::canDraw
virtual bool canDraw(const GameState &state) override
Definition:
render_button_simple.cpp:29
RenderButtonSimple::m_position
CoordXY m_position
Definition:
render_button_simple.h:20
RenderButtonSimple::draw
virtual void draw(SDL_Renderer *renderer) override
Definition:
render_button_simple.cpp:33
RenderButtonSimple::m_pTexture
SDL_Texture * m_pTexture
Definition:
render_button_simple.h:19
CoordXY
Definition:
coordxy.h:5
RenderObject
Definition:
render_base.h:42
RenderButtonSimple::m_nTextureHeight
int m_nTextureHeight
Definition:
render_button_simple.h:22
GameState
Definition:
game_state.h:10
IRenderWindow
Definition:
render_base.h:26
RenderButtonSimple
Definition:
render_button_simple.h:5
RenderButtonSimple::modify
virtual void modify(const GameState &state, IRenderWindow *pRenderWindow) override
Definition:
render_button_simple.cpp:25
RenderButtonSimple::setAnimate
void setAnimate(bool bAnimate)
Definition:
render_button_simple.cpp:53
RenderButtonSimple::m_nTextureWidth
int m_nTextureWidth
Definition:
render_button_simple.h:21
RenderButtonSimple::m_currentFrame
SDL_Rect m_currentFrame
Definition:
render_button_simple.h:25
RenderButtonSimple::m_bAnimate
bool m_bAnimate
Definition:
render_button_simple.h:23
RenderButtonSimple::RenderButtonSimple
RenderButtonSimple(SDL_Texture *tex, CoordXY pos, int nPositionZ=0)
Definition:
render_button_simple.cpp:6
Generated by
1.8.17