Пример #1
0
Text::Text() {
	this->font = nullptr;
	this->string_msg_ptr = nullptr;
	this->position_ptr = nullptr;
	this->offset = VectorXY(0, 0);
	this->max_width = 0;
	this->line_height = 0;
}
Пример #2
0
void Text::Initialize(ALLEGRO_FONT *font, string *msg, VectorXY *position) {
	this->font = font;
	this->string_msg_ptr = msg;
	this->position_ptr = position;
	this->offset = VectorXY(0, 0);
	this->max_width = 1000;
	this->line_height = 15;

	al_draw_multiline_text(this->font, al_map_rgb(255, 255, 255), (*this->position_ptr).x,
		(*this->position_ptr).y, this->max_width, this->line_height, 0, (*this->string_msg_ptr).c_str());
}
Пример #3
0
Vector2D Vector(Point2D A, Point2D B) {
    return VectorXY(B.x - A.x, B.y - A.y);
}