Wrath of Zeus
Made by Torchlight Games for CSE 125 SP24
Loading...
Searching...
No Matches
Static Public Member Functions
gui::widget::CenterText Class Reference

#include <centertext.hpp>

Static Public Member Functions

static Widget::Ptr make (std::string text, font::Font font, font::Size size, font::Color color, std::shared_ptr< font::Loader > fonts, float y_pos)
 Constructs a unique_ptr for a Flexbox widget that contains a DynText widget. More...
 

Detailed Description

This widget is a special kind of "Macro Widget" which essentially acts as a wrapper around a more complex internal structure to make a piece of text that is centered horizontally across the screen.

Member Function Documentation

◆ make()

Widget::Ptr gui::widget::CenterText::make ( std::string  text,
font::Font  font,
font::Size  size,
font::Color  color,
std::shared_ptr< font::Loader fonts,
float  y_pos 
)
static

Constructs a unique_ptr for a Flexbox widget that contains a DynText widget.

Parameters
textText to display
fontfont to render the text with
sizesize of the font
colorcolor of the text
fontsfont loader
y_posbottom y position of the widget in GUI coordinates
Returns
a Flexbox widget that centers an internal DynText widget

The documentation for this class was generated from the following files: