YourCityInvadedByAliens
Documentation for code of the game
src
render
ui
render_button_music_on_off.h
Go to the documentation of this file.
1
2
#pragma once
3
#include "
render.h
"
4
5
class
RenderButtonMusicOnOff
:
public
RenderObject
{
6
7
public
:
8
RenderButtonMusicOnOff
(
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_bPlayMusic
;
24
bool
m_bAnimate
;
25
26
SDL_Rect
m_currentFrameMusicOn
;
27
SDL_Rect
m_currentFrameMusicOff
;
28
};
render.h
RenderButtonMusicOnOff::m_bAnimate
bool m_bAnimate
Definition:
render_button_music_on_off.h:24
RenderButtonMusicOnOff::canDraw
virtual bool canDraw(const GameState &state) override
Definition:
render_button_music_on_off.cpp:35
RenderButtonMusicOnOff
Definition:
render_button_music_on_off.h:5
RenderButtonMusicOnOff::modify
virtual void modify(const GameState &state, IRenderWindow *pRenderWindow) override
Definition:
render_button_music_on_off.cpp:31
RenderButtonMusicOnOff::m_position
CoordXY m_position
Definition:
render_button_music_on_off.h:20
RenderButtonMusicOnOff::m_currentFrameMusicOff
SDL_Rect m_currentFrameMusicOff
Definition:
render_button_music_on_off.h:27
RenderButtonMusicOnOff::m_currentFrameMusicOn
SDL_Rect m_currentFrameMusicOn
Definition:
render_button_music_on_off.h:26
RenderButtonMusicOnOff::m_nTextureWidth
int m_nTextureWidth
Definition:
render_button_music_on_off.h:21
RenderButtonMusicOnOff::m_bPlayMusic
bool m_bPlayMusic
Definition:
render_button_music_on_off.h:23
CoordXY
Definition:
coordxy.h:5
RenderObject
Definition:
render_base.h:42
GameState
Definition:
game_state.h:10
IRenderWindow
Definition:
render_base.h:26
RenderButtonMusicOnOff::RenderButtonMusicOnOff
RenderButtonMusicOnOff(SDL_Texture *tex, CoordXY pos, int nPositionZ=0)
Definition:
render_button_music_on_off.cpp:6
RenderButtonMusicOnOff::setAnimate
void setAnimate(bool bAnimate)
Definition:
render_button_music_on_off.cpp:63
RenderButtonMusicOnOff::draw
virtual void draw(SDL_Renderer *renderer) override
Definition:
render_button_music_on_off.cpp:39
RenderButtonMusicOnOff::m_nTextureHeight
int m_nTextureHeight
Definition:
render_button_music_on_off.h:22
RenderButtonMusicOnOff::m_pTexture
SDL_Texture * m_pTexture
Definition:
render_button_music_on_off.h:19
Generated by
1.8.17