WOWCube Docs logo
WOWCube Docs
Mission Control
Section Shortcuts
APIExamplesSourceWOWConnectChangelog
Filters
SDK and language defaults persist in cookies.
SDK version
Navigation Tree
Collapsed by default, focused on the active path.
Made byMcKay Seamons
GitHub
  1. Home
  2. Docs
  3. Source
  4. Text.h
Mission NodeSDK 6.2C++gfx

Text.h

SDK Source File: Text.h

Source / SDK 6.2 / C++ / gfx

Text.h

Text.h
CPP
1/* Copyright Statement:
2 *
3 * (C) 2021-2024 Cubios Inc. All rights reserved.
4 */
5
6#pragma once
7#include "native.h"
8#include "SceneObject.h"
9#include <string>
10
11namespace Cubios
12{
13namespace Gfx
14{
15class Text: public Cubios::SceneObject
16{
17 public:
18
19 Text(std::string text, const Cubios::Math::Transform& t, uint32_t fontSize, const Cubios::Math::Color& color, Cubios::text_align_t al = Cubios::text_align_t::TEXT_ALIGN_CENTER);
20 Text(std::string text, const Cubios::Math::Transform& t, uint32_t fontSize = 10, Cubios::text_align_t al = Cubios::text_align_t::TEXT_ALIGN_CENTER);
21 Text(std::string text, float x, float y, uint32_t fontSize = 10);
22 Text(std::string text, float x, float y, uint32_t fontSize, const Cubios::Math::Color& color);
23
24 virtual ~Text();
25 void Render() override;
26
27 //Inplace setters
28 Cubios::SceneObject* SetContent(std::string text);
29 Cubios::SceneObject* FormatContent(char const* format,...);
30 Cubios::SceneObject* SetFontSize(uint32_t fontSize);
31
32 public:
33
34 std::string Content;
35 Cubios::text_align_t Alignment;
36 uint32_t FontSize;
37
38};
39}
40}
41
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.
Context Rail

Related nodes

AnimatedSprite.cpp
Source / SDK 6.2 / C++ / gfx
AnimatedSprite.h
Source / SDK 6.2 / C++ / gfx
Background.cpp
Source / SDK 6.2 / C++ / gfx
Background.h
Source / SDK 6.2 / C++ / gfx
Previous Node
Text.cpp
Source / SDK 6.2 / C++ / gfx
Next Node
Color.h
Source / SDK 6.2 / C++ / math