summaryrefslogtreecommitdiffstats
path: root/src/ui/test/stubs/engine_stub.cpp
blob: 6ec6006785b0f7bf1ebd0be2778fa15aede5f047 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#include "../../graphics/engine/engine.h"
#include "../../graphics/engine/text.h"
#include "../mocks/text_mock.h"

namespace Gfx {

CEngine::CEngine(CInstanceManager* iMan, CApplication* app) :
    m_iMan(iMan), m_app(app)
{
    m_text = new CTextMock(m_iMan, this);
    m_text->Create();
}

CEngine::~CEngine()
{
    delete m_text;
    m_text = NULL;
}

Math::Point CEngine::WindowToInterfaceSize(Math::IntPoint size)
{
    return Math::Point(size.x, size.y);
}

void CEngine::SetState(int state, const Color& color)
{
    if (state == m_lastState && color == m_lastColor)
        return;

    m_lastState = state;
    m_lastColor = color;
}

Math::IntPoint CEngine::GetWindowSize()
{
    return m_size;
}

void CEngine::AddStatisticTriangle(int count)
{
        m_statisticTriangle += count;
}

void CEngine::SetMouseType(EngineMouseType type)
{
    m_mouseType = type;
}

bool CEngine::SetTexture(const std::string& /* name */, int /* stage */)
{
    return true;
}

CText* CEngine::GetText()
{
    return m_text;
}

CDevice* CEngine::GetDevice()
{
    return m_device;
}

int CEngine::GetEditIndentValue()
{
    return m_editIndentValue;
}

void CEngine::DeleteTexture(const std::string& /* texName */)
{
}
Texture CEngine::LoadTexture(const std::string& /* name */)
{
    Texture texture;
    return texture;
}

} /* Gfx */