diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2011-12-30 16:28:51 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2011-12-30 16:28:51 +0400 |
commit | c52f78002150c5f39ffb1d49bffc7649d5a15b3c (patch) | |
tree | ddf1445cc40333802c196af8321dc9e76268657c /source/gameengine/Ketsji/KX_FontObject.h | |
parent | 2c43f99c0affd1837f7ee721061e486357f7b19d (diff) |
cucumber merge, multiline font object:
revisions: 38384,38387,38403,38404,38407,42997,42998
#42998 by dfelinto
BGE Font Object - fix for offset
(scaling also has to be taken into account here)
#42997 by dfelinto
Font Object Multiline fix.
The offset was totally wrong when object had scale[1] != 1
#38407 by kupoman
Changing the "text" property of a KX_FontObject now changes the text. This allows for control of a FontObject through logic bricks.
#38404 by kupoman
KX_FontObject now supports the x and y offset options.
#38403 by kupoman
KX_FontObject now makes use of the font's line spacing option, and correctly accounts for rotation and font size when applying the spacing.
#38387 by kupoman
The KX_FontObject text attribute is working again.
#38384 by kupoman
Primitive support for the new line character added to KX_FontObjects. The line spacing is fixed, and does not work when the FontObject is rotated. Also, the text attribute has been temporarily disabled, as it needs some updating to support the multiline changes.
Diffstat (limited to 'source/gameengine/Ketsji/KX_FontObject.h')
-rw-r--r-- | source/gameengine/Ketsji/KX_FontObject.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_FontObject.h b/source/gameengine/Ketsji/KX_FontObject.h index 8fc7a9e9f28..958a6cd3360 100644 --- a/source/gameengine/Ketsji/KX_FontObject.h +++ b/source/gameengine/Ketsji/KX_FontObject.h @@ -57,13 +57,15 @@ public: virtual void ProcessReplica(); protected: - STR_String m_text; + std::vector<STR_String> m_text; Object* m_object; int m_fontid; int m_dpi; float m_fsize; float m_resolution; float m_color[4]; + float m_line_spacing; + MT_Vector3 m_offset; class RAS_IRenderTools* m_rendertools; //needed for drawing routine @@ -76,6 +78,8 @@ public: */ #ifdef WITH_PYTHON + static PyObject* pyattr_get_text(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); + static int pyattr_set_text(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); #endif }; |