Starting to make the team's ui scroll

This commit is contained in:
AnonymusRaccoon
2020-03-03 18:22:13 +01:00
parent 075d01b9ff
commit 27950654f0
4 changed files with 15 additions and 12 deletions
+1 -1
View File
@@ -211,7 +211,7 @@ add_executable(My3D
lib/my/my/my_str_replace.c
lib/gamacon/src/sfml_renderer/sfml_init.c
lib/gamacon/src/sfml_renderer/sfml_events.c
lib/xmlparser/src/otherget.c src/options.c lib/gamacon/src/components/input_component.c lib/gamacon/include/components/input_component.h src/systems/teams_system.c include/systems/teams_system.h include/components/teams_component.h src/components/teams_component.c)
lib/xmlparser/src/otherget.c src/options.c lib/gamacon/src/components/input_component.c lib/gamacon/include/components/input_component.h src/systems/teams_system.c include/systems/teams_system.h include/components/teams_component.h src/components/teams_component.c lib/gamacon/src/components/tag_component.c lib/gamacon/include/components/tag_component.h)
add_compile_options(-W -Wall -Wextra -Wshadow)
+6 -6
View File
@@ -1,8 +1,8 @@
<gc_entities>
<panel src="front_panel" x="89%" y="50%" width="20%" height="8%" />
<text text="I forgot to register for the module,\n could you register me?" x="89%" y="52%" color="black" size="9"/>
<panel src="front_panel" x="89%" y="56%" width="17%" height="5%" />
<text text="LMFAO" x="89%" y="56%" color="black" size="9"/>
<panel src="front_panel" x="89%" y="60%" width="17%" height="5%" />
<text text="It's the first and the last time." x="89%" y="60%" color="black" size="9"/>
<panel src="front_panel" x="89%" y="50%" width="20%" height="8%" tag="teams" />
<text text="I forgot to register for the module,\n could you register me?" x="89%" y="52%" color="black" size="9" tag="teams"/>
<panel src="front_panel" x="89%" y="56%" width="17%" height="5%" tag="teams" />
<text text="LMFAO" x="89%" y="56%" color="black" size="9" tag="teams" />
<panel src="front_panel" x="89%" y="60%" width="17%" height="5%" tag="teams" />
<text text="It's the first and the last time." x="89%" y="60%" color="black" size="9" tag="teams" />
</gc_entities>
+7 -4
View File
@@ -7,15 +7,17 @@
#include "entity.h"
#include "system.h"
#include "sprite.h"
#include "vector2.h"
#include "prefab.h"
#include "components/teams_component.h"
#include "systems/teams_system.h"
#include <stddef.h>
#include <dirent.h>
#include <stdlib.h>
static void move_teams_up(gc_scene *scene)
{
gc_list *list = scene->get_entity_by_cmp(scene, "tag_component");
//Should filter components by the tag teams and move them up.
}
static void update_entity(gc_engine *engine, void *system, gc_entity *entity, \
float dtime)
{
@@ -24,6 +26,7 @@ float dtime)
team->next_teams -= dtime;
if (team->next_teams < 0 && team->prefab_count) {
team->next_teams = team->delay;
move_teams_up(engine->scene);
prefab_load(engine, team->prefabs[random() % team->prefab_count]);
}
}