| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
#pragma once |
| 32 |
|
| 33 |
#include "core/io/resource.h" |
| 34 |
#include "core/object/gdvirtual.gen.inc" |
| 35 |
|
| 36 |
class CharFXTransform : public RefCounted { |
| 37 |
GDCLASS(CharFXTransform, RefCounted); |
| 38 |
|
| 39 |
protected: |
| 40 |
static void _bind_methods(); |
| 41 |
|
| 42 |
public: |
| 43 |
Transform2D transform; |
| 44 |
Vector2i range; |
| 45 |
bool visibility = true; |
| 46 |
bool outline = false; |
| 47 |
Point2 offset; |
| 48 |
Color color; |
| 49 |
double elapsed_time = 0.0f; |
| 50 |
Dictionary environment; |
| 51 |
uint32_t glyph_index = 0; |
| 52 |
uint16_t glyph_flags = 0; |
| 53 |
uint8_t glyph_count = 0; |
| 54 |
int32_t relative_index = 0; |
| 55 |
RID font; |
| 56 |
|
| 57 |
CharFXTransform(); |
| 58 |
~CharFXTransform(); |
| 59 |
|
| 60 |
void set_transform(const Transform2D &p_transform) { transform = p_transform; } |
| 61 |
const Transform2D &get_transform() { return transform; } |
| 62 |
|
| 63 |
Vector2i get_range() { return range; } |
| 64 |
void set_range(const Vector2i &p_range) { range = p_range; } |
| 65 |
|
| 66 |
double get_elapsed_time() { return elapsed_time; } |
| 67 |
void set_elapsed_time(double p_elapsed_time) { elapsed_time = p_elapsed_time; } |
| 68 |
|
| 69 |
bool is_visible() { return visibility; } |
| 70 |
void set_visibility(bool p_visibility) { visibility = p_visibility; } |
| 71 |
|
| 72 |
bool is_outline() { return outline; } |
| 73 |
void set_outline(bool p_outline) { outline = p_outline; } |
| 74 |
|
| 75 |
Point2 get_offset() { return offset; } |
| 76 |
void set_offset(Point2 p_offset) { offset = p_offset; } |
| 77 |
|
| 78 |
Color get_color() { return color; } |
| 79 |
void set_color(Color p_color) { color = p_color; } |
| 80 |
|
| 81 |
uint32_t get_glyph_index() const { return glyph_index; } |
| 82 |
void set_glyph_index(uint32_t p_glyph_index) { glyph_index = p_glyph_index; } |
| 83 |
|
| 84 |
uint16_t get_glyph_flags() const { return glyph_flags; } |
| 85 |
void set_glyph_flags(uint16_t p_glyph_flags) { glyph_flags = p_glyph_flags; } |
| 86 |
|
| 87 |
uint8_t get_glyph_count() const { return glyph_count; } |
| 88 |
void set_glyph_count(uint8_t p_glyph_count) { glyph_count = p_glyph_count; } |
| 89 |
|
| 90 |
int32_t get_relative_index() const { return relative_index; } |
| 91 |
void set_relative_index(int32_t p_relative_index) { relative_index = p_relative_index; } |
| 92 |
|
| 93 |
RID get_font() const { return font; } |
| 94 |
void set_font(RID p_font) { font = p_font; } |
| 95 |
|
| 96 |
Dictionary get_environment() { return environment; } |
| 97 |
void set_environment(Dictionary p_environment) { environment = p_environment; } |
| 98 |
}; |
| 99 |
|
| 100 |
class RichTextEffect : public Resource { |
| 101 |
GDCLASS(RichTextEffect, Resource); |
| 102 |
OBJ_SAVE_TYPE(RichTextEffect); |
| 103 |
|
| 104 |
protected: |
| 105 |
static void _bind_methods(); |
| 106 |
|
| 107 |
GDVIRTUAL1RC(bool, _process_custom_fx, Ref<CharFXTransform>) |
| 108 |
|
| 109 |
public: |
| 110 |
Variant get_bbcode() const; |
| 111 |
bool _process_effect_impl(Ref<class CharFXTransform> p_cfx); |
| 112 |
|
| 113 |
RichTextEffect(); |
| 114 |
}; |