aboutsummaryrefslogtreecommitdiff
path: root/game/menus/IFloatingWindowScript.cpp
blob: 4b538efccf80632466c38d03480aba3e6f5fea13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "IFloatingWindowScript.h"

#include <crepe/api/Sprite.h>
#include <crepe/types.h>

using namespace crepe;

void IFloatingWindowScript::init() { this->disable_all_sprites(); }

void IFloatingWindowScript::disable_all_sprites() {
	RefVector<Sprite> sprites = this->get_components_by_tag<Sprite>(this->tag);
	for (Sprite & sprite : sprites) {
		sprite.active = false;
	}
}

void IFloatingWindowScript::enable_all_sprites() {
	RefVector<Sprite> sprites = this->get_components_by_tag<Sprite>(this->tag);
	for (Sprite & sprite : sprites) {
		sprite.active = true;
	}
}