galaxy obj
This commit is contained in:
parent
16a89a6ae2
commit
0d9d77769c
23
assets/gui_main_menu.json
Executable file
23
assets/gui_main_menu.json
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"widgets": [{
|
||||||
|
"type": "FrameLayout",
|
||||||
|
"name": "menu_background",
|
||||||
|
"background": "#00000000",
|
||||||
|
"width": "match_parent",
|
||||||
|
"height": "match_parent",
|
||||||
|
"children": [{
|
||||||
|
"type": "FrameLayout",
|
||||||
|
"name": "stars_plane",
|
||||||
|
"background": "#00000000",
|
||||||
|
"width": "wrap_content",
|
||||||
|
"height": "wrap_content",
|
||||||
|
"children": [{
|
||||||
|
"type": "ImageView",
|
||||||
|
"name": "galaxy",
|
||||||
|
"background": "024863276-illustration-spiral-galaxy-vec.png",
|
||||||
|
"width": 700,
|
||||||
|
"height": 480
|
||||||
|
}]
|
||||||
|
}]
|
||||||
|
}]
|
||||||
|
}
|
BIN
assets/ui/024863276-illustration-spiral-galaxy-vec.png
Executable file
BIN
assets/ui/024863276-illustration-spiral-galaxy-vec.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 3.3 MiB |
@ -116,7 +116,7 @@ void TMyApplication::InnerInit()
|
|||||||
ResourceManager->FontManager.AddFont("arial32", "arial32.png", "arial32.txt");
|
ResourceManager->FontManager.AddFont("arial32", "arial32.png", "arial32.txt");
|
||||||
ResourceManager->FontManager.AddFont("lucon12", "lucon12.png", "lucon12.txt");
|
ResourceManager->FontManager.AddFont("lucon12", "lucon12.png", "lucon12.txt");
|
||||||
ResourceManager->FontManager.PushFont("lucon12");
|
ResourceManager->FontManager.PushFont("lucon12");
|
||||||
ResourceManager->newGuiManager.LoadFromConfig("gui_alex.json");
|
ResourceManager->newGuiManager.LoadFromConfig("gui_main_menu.json");
|
||||||
SetButtonsAction();
|
SetButtonsAction();
|
||||||
// ------- UI -------
|
// ------- UI -------
|
||||||
}
|
}
|
||||||
@ -154,12 +154,6 @@ void TMyApplication::InnerDeinit()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TMyApplication::InnerOnTapDown(Vector2f p)
|
|
||||||
{
|
|
||||||
//-OnTapDownSignal(Vector2f(p.v[0], p.v[1]));
|
|
||||||
OnTapDownSignal(Vector2f(p(0), p(1)));
|
|
||||||
}
|
|
||||||
|
|
||||||
void TMyApplication::InnerOnTapUp(Vector2f p)
|
void TMyApplication::InnerOnTapUp(Vector2f p)
|
||||||
{
|
{
|
||||||
OnTapUpSignal(Vector2f(p(0), p(1)));
|
OnTapUpSignal(Vector2f(p(0), p(1)));
|
||||||
|
@ -161,7 +161,11 @@ public:
|
|||||||
|
|
||||||
void LoadResources();
|
void LoadResources();
|
||||||
|
|
||||||
virtual void InnerOnTapDown(Vector2f p);
|
virtual void InnerOnTapDown(Vector2f p)
|
||||||
|
{
|
||||||
|
//-OnTapDownSignal(Vector2f(p.v[0], p.v[1]));
|
||||||
|
OnTapDownSignal(Vector2f(p(0), p(1)));
|
||||||
|
}
|
||||||
|
|
||||||
virtual void InnerOnTapUp(Vector2f p);
|
virtual void InnerOnTapUp(Vector2f p);
|
||||||
|
|
||||||
|
@ -170,6 +170,8 @@
|
|||||||
<ClCompile Include="..\..\..\game\loadingcode.cpp" />
|
<ClCompile Include="..\..\..\game\loadingcode.cpp" />
|
||||||
<ClCompile Include="..\..\..\game\main_code.cpp" />
|
<ClCompile Include="..\..\..\game\main_code.cpp" />
|
||||||
<ClCompile Include="..\..\..\game\menucode.cpp" />
|
<ClCompile Include="..\..\..\game\menucode.cpp" />
|
||||||
|
<ClCompile Include="galaxy.cpp" />
|
||||||
|
<ClCompile Include="galaxy_objects.cpp" />
|
||||||
<ClCompile Include="main.cpp" />
|
<ClCompile Include="main.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -179,6 +181,8 @@
|
|||||||
<ClInclude Include="..\..\..\game\loadingcode.h" />
|
<ClInclude Include="..\..\..\game\loadingcode.h" />
|
||||||
<ClInclude Include="..\..\..\game\main_code.h" />
|
<ClInclude Include="..\..\..\game\main_code.h" />
|
||||||
<ClInclude Include="..\..\..\game\menucode.h" />
|
<ClInclude Include="..\..\..\game\menucode.h" />
|
||||||
|
<ClInclude Include="galaxy.h" />
|
||||||
|
<ClInclude Include="galaxy_objects.h" />
|
||||||
<ClInclude Include="main.h" />
|
<ClInclude Include="main.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
@ -33,6 +33,12 @@
|
|||||||
<ClCompile Include="..\..\..\game\loadingcode.cpp">
|
<ClCompile Include="..\..\..\game\loadingcode.cpp">
|
||||||
<Filter>Файлы исходного кода</Filter>
|
<Filter>Файлы исходного кода</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="galaxy.cpp">
|
||||||
|
<Filter>Файлы исходного кода</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="galaxy_objects.cpp">
|
||||||
|
<Filter>Файлы исходного кода</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="main.h">
|
<ClInclude Include="main.h">
|
||||||
@ -56,5 +62,11 @@
|
|||||||
<ClInclude Include="..\..\..\game\loadingcode.h">
|
<ClInclude Include="..\..\..\game\loadingcode.h">
|
||||||
<Filter>Заголовочные файлы</Filter>
|
<Filter>Заголовочные файлы</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="galaxy.h">
|
||||||
|
<Filter>Заголовочные файлы</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="galaxy_objects.h">
|
||||||
|
<Filter>Заголовочные файлы</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
2
windows/DoubleHitBalls-win/DoubleHitBalls-win/galaxy.cpp
Executable file
2
windows/DoubleHitBalls-win/DoubleHitBalls-win/galaxy.cpp
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#include "galaxy.h"
|
||||||
|
|
38
windows/DoubleHitBalls-win/DoubleHitBalls-win/galaxy.h
Executable file
38
windows/DoubleHitBalls-win/DoubleHitBalls-win/galaxy.h
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#ifndef GALAXY_H
|
||||||
|
#define GALAXY_H
|
||||||
|
|
||||||
|
#include "galaxy_objects.h"
|
||||||
|
|
||||||
|
#include "include/Engine.h"
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
|
class GalaxyMenu {
|
||||||
|
public:
|
||||||
|
|
||||||
|
// ======== All objects =========
|
||||||
|
std::vector<StarObject> Stars;
|
||||||
|
// ======== All objects =========
|
||||||
|
|
||||||
|
|
||||||
|
// ======== Main Methods ========
|
||||||
|
void InitGalaxy();
|
||||||
|
void DrawGalaxy();
|
||||||
|
void UpdateGalaxy();
|
||||||
|
// ======== Main Methods ========
|
||||||
|
|
||||||
|
void InteractWithGalaxy(); // Prototype for mouse/tap events
|
||||||
|
|
||||||
|
|
||||||
|
// :::::::::::
|
||||||
|
float GetGalaxyPosition();
|
||||||
|
// :::::::::::
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Params
|
||||||
|
//Vector2f selfPosition;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
0
windows/DoubleHitBalls-win/DoubleHitBalls-win/galaxy_objects.cpp
Executable file
0
windows/DoubleHitBalls-win/DoubleHitBalls-win/galaxy_objects.cpp
Executable file
16
windows/DoubleHitBalls-win/DoubleHitBalls-win/galaxy_objects.h
Executable file
16
windows/DoubleHitBalls-win/DoubleHitBalls-win/galaxy_objects.h
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef GALAXY_OBJECTS_H
|
||||||
|
#define GALAXY_OBJECTS_H
|
||||||
|
|
||||||
|
class StarObject {
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user