-
Notifications
You must be signed in to change notification settings - Fork 2
/
SolarSystemResources.cpp
111 lines (82 loc) · 2.26 KB
/
SolarSystemResources.cpp
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#include "stdafx.h"
#include "SolarSystemResources.h"
/// AUTOGENERATED METHODS ///
using namespace Simulator;
int SolarSystemResources::AddRef() {
return Simulator::cStrategy::AddRef();
}
int SolarSystemResources::Release() {
return Simulator::cStrategy::Release();
}
const char* SolarSystemResources::GetName() const {
return "RattlerSpore::SolarSystemResources";
}
bool SolarSystemResources::Write(Simulator::ISerializerStream* stream)
{
return Simulator::ClassSerializer(this, ATTRIBUTES).Write(stream);
}
bool SolarSystemResources::WriteToXML(Simulator::XmlSerializer* writexml)
{
return false;
}
bool SolarSystemResources::Read(Simulator::ISerializerStream* stream)
{
return Simulator::ClassSerializer(this, ATTRIBUTES).Read(stream);
}
/// END OF AUTOGENERATED METHODS ///
////////////////////////////////////
Simulator::Attribute SolarSystemResources::ATTRIBUTES[] = {
// Add more attributes here
// This one must always be at the end
Simulator::Attribute()
};
void SolarSystemResources::Initialize() {
sInstance = this;
SystemIn = 0;
sysLayout = nullptr;
}
void SolarSystemResources::Dispose() {
}
void SolarSystemResources::Update(int deltaTime, int deltaGameTime) {
if (IsSpaceGame()) {
if (sysLayout) {
}
}
}
bool SolarSystemResources::OpenSysUI()
{
if (!sysLayout) {
sysLayout = new UTFWin::UILayout();
}
if (sysLayout->LoadByID(id("SolarSystemResource"))) {
sysLayout->SetVisible(true);
sysLayout->SetParentWindow(WindowManager.GetMainWindow());
WindowManager.GetMainWindow()->SendToBack(sysLayout->GetContainerWindow());
auto window = sysLayout->FindWindowByID(0xFFFFFFFF, false);
Math::Rectangle rec = window->GetParent()->GetArea();
}
return false;
}
bool SolarSystemResources::CloseSysUI()
{
return false;
}
bool SolarSystemResources::LogSystem(const uint32_t StarID)
{
auto system = simulator_new<SolarSystemResourceEntry>();
system->init(StarID);
return false;
}
bool SolarSystemResources::LogSystem()
{
const StarID sid = GetActiveStarRecord()->GetID();
uint32_t raw = sid.internalValue;
auto system = simulator_new<SolarSystemResourceEntry>();
system->init(raw);
return false;
}
SolarSystemResources* SolarSystemResources::Get()
{
return sInstance;
}
SolarSystemResources* SolarSystemResources::sInstance;