Rise
The Vieneo Province
Page.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "../Instruments/Instrument.h"
4
#include "
Element.h
"
5
6
class
Page
7
{
8
public
:
9
std::string
name
;
10
std::vector<Instrument*>
instruments
;
11
std::vector<Element>
elements
;
12
13
void
Render
()
14
{
15
for
(UINT i = 0; i <
instruments
.size(); i++)
16
instruments
.at(i)->Render();
17
for
(UINT i = 0; i <
elements
.size(); i++)
18
elements
.at(i).Render();
19
}
20
21
~Page
()
22
{
23
instruments
.clear();
24
}
25
26
bool
HandleKeyPress
(
short
key,
bool
shift)
27
{
28
for
(UINT i = 0; i <
instruments
.size(); i++)
29
{
30
if
(
instruments
.at(i)->HandleKeyPress(key, shift))
31
return
true
;
32
}
33
return
false
;
34
}
35
36
void
FrameMove
(
float
fElapsed)
37
{
38
for
(UINT i = 0; i <
elements
.size(); i++)
39
elements
.at(i).Update();
40
for
(UINT i = 0; i <
instruments
.size(); i++)
41
instruments
.at(i)->
FrameMove
(fElapsed);
42
}
43
44
void
OnPageChanged
()
45
{
46
for
(UINT i = 0; i <
instruments
.size(); i++)
47
instruments
.at(i)->OnPageChanged();
48
}
49
};
Page::elements
std::vector< Element > elements
Definition:
Page.h:11
instruments::FrameMove
void FrameMove(float fElapsedTime)
Definition:
instruments.cpp:19
Page::name
std::string name
Definition:
Page.h:9
Element.h
Page
Definition:
Page.h:6
Page::FrameMove
void FrameMove(float fElapsed)
Definition:
Page.h:36
Page::OnPageChanged
void OnPageChanged()
Definition:
Page.h:44
Page::Render
void Render()
Definition:
Page.h:13
Page::HandleKeyPress
bool HandleKeyPress(short key, bool shift)
Definition:
Page.h:26
Page::~Page
~Page()
Definition:
Page.h:21
instruments
Definition:
instruments.h:12
Page::instruments
std::vector< Instrument * > instruments
Definition:
Page.h:10
Displays
Page.h
Generated on Tue May 4 2021 15:18:14 for Rise by
1.8.14