ConnectRequest event and some other shit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#ifndef Events_ConnectRequest_h__
|
||||
#define Events_ConnectRequest_h__
|
||||
|
||||
#include "Core/EventBroker.h"
|
||||
|
||||
namespace Events
|
||||
{
|
||||
|
||||
struct ConnectRequest : public Event
|
||||
{
|
||||
std::string IP = "";
|
||||
int Port = 0;
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "GUI/EButtonReleased.h"
|
||||
#include "Input/EInputCommand.h"
|
||||
#include "Network/ESearchForServers.h"
|
||||
#include "Network/EConnectRequest.h"
|
||||
|
||||
|
||||
class MainMenuSystem : public ImpureSystem
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<ServerIdentity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ServerIdentity.xsd">
|
||||
<IP>0.0.0.0</IP>
|
||||
<Port>0</Port>
|
||||
<IP>123.123.123.123</IP>
|
||||
<Port>65999</Port>
|
||||
<ServerName>UnkownServer</ServerName>
|
||||
<PlayersConnected>0</PlayersConnected>
|
||||
</ServerIdentity>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
|
||||
<Components>
|
||||
<c:CapturePointGameMode>
|
||||
<RespawnTime>0.8333591884066891</RespawnTime>
|
||||
<RespawnTime>3.6154132075906489</RespawnTime>
|
||||
</c:CapturePointGameMode>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="-1" Z="0"/>
|
||||
@@ -85,7 +85,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="2882.12329" Z="0"/>
|
||||
<Orientation X="0" Y="2907.64526" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -141,7 +141,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="9090.23535" Z="0"/>
|
||||
<Orientation X="0" Y="9141.29785" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -194,7 +194,7 @@
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="2.1529963" Y="6.59221172" Z="0.169116676"/>
|
||||
<Orientation X="4.16300011" Y="18929.4199" Z="0"/>
|
||||
<Orientation X="4.16300011" Y="18980.4727" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -222,7 +222,7 @@
|
||||
<Axis X="1" Y="1" Z="1"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="17519.9004" Y="17519.9004" Z="17519.9004"/>
|
||||
<Orientation X="17570.9531" Y="17570.9531" Z="17570.9531"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -286,7 +286,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="17315.8965" Z="0"/>
|
||||
<Orientation X="0" Y="17366.9492" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -318,7 +318,7 @@
|
||||
<Axis X="0.699999988" Y="1" Z="0.300000012"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="12666.7588" Y="18043.3066" Z="5399.21436"/>
|
||||
<Orientation X="12702.4932" Y="18094.3594" Z="5414.53027"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -668,7 +668,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="1179.89148" Z="0"/>
|
||||
<Orientation X="0" Y="1205.41614" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -715,7 +715,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="1179.89148" Z="0"/>
|
||||
<Orientation X="0" Y="1205.41614" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -775,7 +775,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="1179.89148" Z="0"/>
|
||||
<Orientation X="0" Y="1205.41614" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -822,7 +822,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="1179.89148" Z="0"/>
|
||||
<Orientation X="0" Y="1205.41614" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -868,7 +868,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="1179.89148" Z="0"/>
|
||||
<Orientation X="0" Y="1205.41614" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -915,7 +915,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="1179.89148" Z="0"/>
|
||||
<Orientation X="0" Y="1205.41614" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -962,7 +962,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="1179.89148" Z="0"/>
|
||||
<Orientation X="0" Y="1205.41614" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -1376,7 +1376,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="1713.61841" Z="0"/>
|
||||
<Orientation X="0" Y="1739.14307" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -1385,7 +1385,7 @@
|
||||
<c:ExplosionEffect>
|
||||
<ColorByDistance>true</ColorByDistance>
|
||||
<Velocity X="0.800000012" Y="0.0379999988" Z="0"/>
|
||||
<TimeSinceDeath>0.66694876855613217</TimeSinceDeath>
|
||||
<TimeSinceDeath>1.5712751414989441</TimeSinceDeath>
|
||||
<ExplosionDuration>3.7999999523162842</ExplosionDuration>
|
||||
<EndColor A="0" B="23.5294113" G="11.7647057" R="0"/>
|
||||
<Randomness>true</Randomness>
|
||||
@@ -1432,7 +1432,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="1713.61841" Z="0"/>
|
||||
<Orientation X="0" Y="1739.14307" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -1441,7 +1441,7 @@
|
||||
<c:ExplosionEffect>
|
||||
<Velocity X="0.5" Y="1" Z="0"/>
|
||||
<ExplosionOrigin X="0" Y="0.900000036" Z="0"/>
|
||||
<TimeSinceDeath>2.0168132214141465</TimeSinceDeath>
|
||||
<TimeSinceDeath>0.85439856235552725</TimeSinceDeath>
|
||||
</c:ExplosionEffect>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Assault/AssaultTPose.mesh</Resource>
|
||||
@@ -1484,7 +1484,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="1713.61841" Z="0"/>
|
||||
<Orientation X="0" Y="1739.14307" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -1497,7 +1497,7 @@
|
||||
<ColorByDistance>true</ColorByDistance>
|
||||
<Velocity X="0.300000012" Y="2" Z="0"/>
|
||||
<ExplosionOrigin X="0" Y="1.30000007" Z="-0.200000003"/>
|
||||
<TimeSinceDeath>2.0168132214141465</TimeSinceDeath>
|
||||
<TimeSinceDeath>0.85439856235552725</TimeSinceDeath>
|
||||
<EndColor A="0" B="0.333333343" G="0.933333337" R="3.92156863"/>
|
||||
<Randomness>true</Randomness>
|
||||
</c:ExplosionEffect>
|
||||
@@ -1542,7 +1542,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="1721.39856" Z="0"/>
|
||||
<Orientation X="0" Y="1746.92322" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -1552,7 +1552,7 @@
|
||||
<ColorByDistance>true</ColorByDistance>
|
||||
<Velocity X="0" Y="0.699999988" Z="0"/>
|
||||
<ExplosionOrigin X="0" Y="-1.10000002" Z="0"/>
|
||||
<TimeSinceDeath>6.6002622626005092</TimeSinceDeath>
|
||||
<TimeSinceDeath>7.5223549108000043</TimeSinceDeath>
|
||||
<ExplosionDuration>10</ExplosionDuration>
|
||||
<EndColor A="1" B="0" G="0" R="1"/>
|
||||
<RandomnessScalar>3</RandomnessScalar>
|
||||
@@ -1600,7 +1600,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="1319.51306" Z="0"/>
|
||||
<Orientation X="0" Y="1345.03772" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -1610,7 +1610,7 @@
|
||||
<ColorByDistance>true</ColorByDistance>
|
||||
<Velocity X="6" Y="0.100000001" Z="0"/>
|
||||
<ExplosionOrigin X="0" Y="-10" Z="0"/>
|
||||
<TimeSinceDeath>0.1169253453956216</TimeSinceDeath>
|
||||
<TimeSinceDeath>0.39702717854592606</TimeSinceDeath>
|
||||
<ExponentialAccelaration>true</ExponentialAccelaration>
|
||||
<ExplosionDuration>5</ExplosionDuration>
|
||||
<Randomness>true</Randomness>
|
||||
@@ -1793,7 +1793,7 @@
|
||||
<c:ExplosionEffect>
|
||||
<ColorByDistance>true</ColorByDistance>
|
||||
<Velocity X="0.800000012" Y="0.0379999988" Z="0"/>
|
||||
<TimeSinceDeath>0.66694876855613217</TimeSinceDeath>
|
||||
<TimeSinceDeath>1.5712751414989441</TimeSinceDeath>
|
||||
<ExplosionDuration>3.7999999523162842</ExplosionDuration>
|
||||
<EndColor A="0" B="23.5294113" G="11.7647057" R="0"/>
|
||||
<Randomness>true</Randomness>
|
||||
@@ -2156,7 +2156,17 @@
|
||||
<Position X="0" Y="1.32321239" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
<Children>
|
||||
<Entity name="Spawner">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile></EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
|
||||
@@ -1,95 +1,121 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<Entity name="ServerIdentity" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
<Entity name="ServerIdentity_Origin" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:ServerIdentity/>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
<Entity name="IP">
|
||||
<Entity name="ServerIdentity">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content>0.0.0.0</Content>
|
||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||
<Color A="1" B="0" G="0" R="0"/>
|
||||
<Alignment>
|
||||
<Left/>
|
||||
</Alignment>
|
||||
</c:Text>
|
||||
<c:TextFieldReader>
|
||||
<ParentEntityName>ServerIdentity</ParentEntityName>
|
||||
<ComponentType>ServerIdentity</ComponentType>
|
||||
<Field>IP</Field>
|
||||
</c:TextFieldReader>
|
||||
<c:Transform>
|
||||
<Position X="8.96700001" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
<c:ServerIdentity/>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Port">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content>0</Content>
|
||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||
<Color A="1" B="0" G="0" R="0"/>
|
||||
<Alignment>
|
||||
<Left/>
|
||||
</Alignment>
|
||||
</c:Text>
|
||||
<c:TextFieldReader>
|
||||
<ParentEntityName>ServerIdentity</ParentEntityName>
|
||||
<ComponentType>ServerIdentity</ComponentType>
|
||||
<Field>Port</Field>
|
||||
</c:TextFieldReader>
|
||||
<c:Transform>
|
||||
<Position X="12.4870005" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="ServerName">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content>UnkownServer</Content>
|
||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||
<Color A="1" B="0" G="0" R="0"/>
|
||||
<Alignment>
|
||||
<Left/>
|
||||
</Alignment>
|
||||
</c:Text>
|
||||
<c:TextFieldReader>
|
||||
<ParentEntityName>ServerIdentity</ParentEntityName>
|
||||
<ComponentType>ServerIdentity</ComponentType>
|
||||
<Field>ServerName</Field>
|
||||
</c:TextFieldReader>
|
||||
<c:Transform>
|
||||
<Position X="0.531000018" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="PlayersConnected">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content>0</Content>
|
||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||
<Color A="1" B="0" G="0" R="0"/>
|
||||
<Alignment>
|
||||
<Left/>
|
||||
</Alignment>
|
||||
</c:Text>
|
||||
<c:TextFieldReader>
|
||||
<ParentEntityName>ServerIdentity</ParentEntityName>
|
||||
<ComponentType>ServerIdentity</ComponentType>
|
||||
<Field>PlayersConnected</Field>
|
||||
</c:TextFieldReader>
|
||||
<c:Transform>
|
||||
<Position X="15.559001" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
<Children>
|
||||
<Entity name="IP">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content>123.123.123.123</Content>
|
||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||
<Color A="1" B="0" G="0" R="0"/>
|
||||
<Alignment>
|
||||
<Left/>
|
||||
</Alignment>
|
||||
</c:Text>
|
||||
<c:TextFieldReader>
|
||||
<ParentEntityName>ServerIdentity</ParentEntityName>
|
||||
<ComponentType>ServerIdentity</ComponentType>
|
||||
<Field>IP</Field>
|
||||
</c:TextFieldReader>
|
||||
<c:Transform>
|
||||
<Position X="-0.200000003" Y="-0.100000001" Z="0"/>
|
||||
<Scale X="0.649999976" Y="0.649999976" Z="1"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Port">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content>65999</Content>
|
||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||
<Color A="1" B="0" G="0" R="0"/>
|
||||
<Alignment>
|
||||
<Left/>
|
||||
</Alignment>
|
||||
</c:Text>
|
||||
<c:TextFieldReader>
|
||||
<ParentEntityName>ServerIdentity</ParentEntityName>
|
||||
<ComponentType>ServerIdentity</ComponentType>
|
||||
<Field>Port</Field>
|
||||
</c:TextFieldReader>
|
||||
<c:Transform>
|
||||
<Position X="4.70000029" Y="-0.100000001" Z="0"/>
|
||||
<Scale X="0.649999976" Y="0.649999976" Z="1"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="ServerName">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content>UnkownServer</Content>
|
||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||
<Color A="1" B="0" G="0" R="0"/>
|
||||
<Alignment>
|
||||
<Left/>
|
||||
</Alignment>
|
||||
</c:Text>
|
||||
<c:TextFieldReader>
|
||||
<ParentEntityName>ServerIdentity</ParentEntityName>
|
||||
<ComponentType>ServerIdentity</ComponentType>
|
||||
<Field>ServerName</Field>
|
||||
</c:TextFieldReader>
|
||||
<c:Transform>
|
||||
<Position X="-8.60000038" Y="-0.100000001" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="PlayersConnected">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content>0</Content>
|
||||
<Resource>Fonts/DroidSans.ttf,64</Resource>
|
||||
<Color A="1" B="0" G="0" R="0"/>
|
||||
<Alignment>
|
||||
<Left/>
|
||||
</Alignment>
|
||||
</c:Text>
|
||||
<c:TextFieldReader>
|
||||
<ParentEntityName>ServerIdentity</ParentEntityName>
|
||||
<ComponentType>ServerIdentity</ComponentType>
|
||||
<Field>PlayersConnected</Field>
|
||||
</c:TextFieldReader>
|
||||
<c:Transform>
|
||||
<Position X="7.80000019" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="ServerIdentityConnect">
|
||||
<Components>
|
||||
<c:Button/>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||
<BlurBackground>true</BlurBackground>
|
||||
<GlowMap></GlowMap>
|
||||
<DepthSort>false</DepthSort>
|
||||
<Color A="0.588235319" B="1" G="1" R="1"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0.100000001" Y="0.496000022" Z="0"/>
|
||||
<Scale X="18.1000004" Y="2" Z="1"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<Components>
|
||||
<c:ServerList>
|
||||
<Offset X="0" Y="-2" Z="0"/>
|
||||
<Offset X="0" Y="-2.20000005" Z="0"/>
|
||||
</c:ServerList>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -12,7 +12,7 @@
|
||||
<Entity name="Identities_Origin">
|
||||
<Components>
|
||||
<c:Transform>
|
||||
<Position X="-0.13636373" Y="0.181182757" Z="0"/>
|
||||
<Position X="0" Y="0.181182757" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -36,7 +36,7 @@
|
||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||
<BlurBackground>true</BlurBackground>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="0.588235319" B="1" G="1" R="1"/>
|
||||
<Color A="0.588235319" B="0" G="0" R="0"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Scale X="0.300000012" Y="0.5" Z="1"/>
|
||||
|
||||
@@ -18,39 +18,26 @@ void MainMenuSystem::Update(double dt)
|
||||
|
||||
bool MainMenuSystem::OnButtonClick(const Events::ButtonClicked& e)
|
||||
{
|
||||
if(e.EntityName == "Play") {
|
||||
//OpenServerList
|
||||
|
||||
} else if(e.EntityName == "Connect") {
|
||||
//Run connect code
|
||||
} else if(e.EntityName == "Host") {
|
||||
//Run host code
|
||||
} else if(e.EntityName == "Quit") {
|
||||
printf("No, you stay");
|
||||
} else if (e.EntityName == "Res1080") {
|
||||
glfwSetWindowSize(m_Renderer->Window(), 1920, 1080);
|
||||
} else if (e.EntityName == "Res720") {
|
||||
glfwSetWindowSize(m_Renderer->Window(), 1280, 720);
|
||||
glViewport(0, 0, 1280, 720);
|
||||
} else if (e.EntityName == "Res480") {
|
||||
glfwSetWindowSize(m_Renderer->Window(), 854, 480);
|
||||
glViewport(0, 0, 854, 480);
|
||||
} else if (e.EntityName == "FullScreen") {
|
||||
printf("No fullscreen for now");
|
||||
if (e.EntityName == "ServerIdentityConnect") {
|
||||
EntityWrapper entity = e.Entity;
|
||||
EntityWrapper serverIdentityEntity = entity.FirstParentWithComponent("ServerIdentity");
|
||||
if(serverIdentityEntity.Valid()) {
|
||||
Events::ConnectRequest event;
|
||||
event.IP = (std::string)entity["ServerIdentity"]["IP"];
|
||||
event.Port = (int)entity["ServerIdentity"]["Port"];
|
||||
m_EventBroker->Publish(event);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MainMenuSystem::OnButtonRelease(const Events::ButtonReleased& e)
|
||||
{
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MainMenuSystem::OnButtonPress(const Events::ButtonPressed& e)
|
||||
{
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user