Remove unneeded RTL settings
This commit is contained in:
parent
8995342b94
commit
bb63a85d6f
@ -118,17 +118,6 @@ namespace gui
|
||||
//! Checks if the text in this label should be clipped if it goes outside bounds
|
||||
virtual bool isTextRestrainedInside() const = 0;
|
||||
|
||||
//! Set whether the string should be interpreted as right-to-left (RTL) text
|
||||
/** \note This component does not implement the Unicode bidi standard, the
|
||||
text of the component should be already RTL if you call this. The
|
||||
main difference when RTL is enabled is that the linebreaks for multiline
|
||||
elements are performed starting from the end.
|
||||
*/
|
||||
virtual void setRightToLeft(bool rtl) = 0;
|
||||
|
||||
//! Checks whether the text in this element should be interpreted as right-to-left
|
||||
virtual bool isRightToLeft() const = 0;
|
||||
|
||||
virtual const std::vector<GlyphLayout>& getGlyphLayouts() const = 0;
|
||||
virtual void setGlyphLayouts(std::vector<GlyphLayout>& gls) = 0;
|
||||
virtual void clearGlyphLayouts() = 0;
|
||||
|
@ -24,7 +24,7 @@ CGUIStaticText::CGUIStaticText(const core::stringw& text, bool border,
|
||||
: IGUIStaticText(environment, parent, id, rectangle),
|
||||
HAlign(EGUIA_UPPERLEFT), VAlign(EGUIA_UPPERLEFT),
|
||||
Border(border), OverrideColorEnabled(false), OverrideBGColorEnabled(false), WordWrap(false), Background(background),
|
||||
RestrainTextInside(true), RightToLeft(false),
|
||||
RestrainTextInside(true),
|
||||
OverrideColor(video::SColor(101,255,255,255)), BGColor(video::SColor(101,210,210,210)),
|
||||
OverrideFont(0), LastBreakFont(0), m_use_glyph_layouts_only(false)
|
||||
{
|
||||
@ -263,22 +263,6 @@ bool CGUIStaticText::isWordWrapEnabled() const
|
||||
}
|
||||
|
||||
|
||||
void CGUIStaticText::setRightToLeft(bool rtl)
|
||||
{
|
||||
if (RightToLeft != rtl)
|
||||
{
|
||||
RightToLeft = rtl;
|
||||
breakText();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool CGUIStaticText::isRightToLeft() const
|
||||
{
|
||||
return RightToLeft;
|
||||
}
|
||||
|
||||
|
||||
//! Breaks the single text line.
|
||||
void CGUIStaticText::breakText()
|
||||
{
|
||||
@ -357,7 +341,6 @@ void CGUIStaticText::serializeAttributes(io::IAttributes* out, io::SAttributeRea
|
||||
out->addBool ("OverrideBGColorEnabled",OverrideBGColorEnabled);
|
||||
out->addBool ("WordWrap", WordWrap);
|
||||
out->addBool ("Background", Background);
|
||||
out->addBool ("RightToLeft", RightToLeft);
|
||||
out->addBool ("RestrainTextInside", RestrainTextInside);
|
||||
out->addColor ("OverrideColor", OverrideColor);
|
||||
out->addColor ("BGColor", BGColor);
|
||||
@ -378,7 +361,6 @@ void CGUIStaticText::deserializeAttributes(io::IAttributes* in, io::SAttributeRe
|
||||
OverrideBGColorEnabled = in->getAttributeAsBool("OverrideBGColorEnabled");
|
||||
setWordWrap(in->getAttributeAsBool("WordWrap"));
|
||||
Background = in->getAttributeAsBool("Background");
|
||||
RightToLeft = in->getAttributeAsBool("RightToLeft");
|
||||
RestrainTextInside = in->getAttributeAsBool("RestrainTextInside");
|
||||
OverrideColor = in->getAttributeAsColor("OverrideColor");
|
||||
BGColor = in->getAttributeAsColor("BGColor");
|
||||
|
@ -99,17 +99,6 @@ namespace gui
|
||||
//! Updates the absolute position, splits text if word wrap is enabled
|
||||
virtual void updateAbsolutePosition();
|
||||
|
||||
//! Set whether the string should be interpreted as right-to-left (RTL) text
|
||||
/** \note This component does not implement the Unicode bidi standard, the
|
||||
text of the component should be already RTL if you call this. The
|
||||
main difference when RTL is enabled is that the linebreaks for multiline
|
||||
elements are performed starting from the end.
|
||||
*/
|
||||
virtual void setRightToLeft(bool rtl);
|
||||
|
||||
//! Checks if the text should be interpreted as right-to-left text
|
||||
virtual bool isRightToLeft() const;
|
||||
|
||||
//! Writes attributes of the element.
|
||||
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;
|
||||
|
||||
@ -134,7 +123,6 @@ namespace gui
|
||||
bool WordWrap;
|
||||
bool Background;
|
||||
bool RestrainTextInside;
|
||||
bool RightToLeft;
|
||||
|
||||
video::SColor OverrideColor, BGColor;
|
||||
gui::IGUIFont* OverrideFont;
|
||||
|
@ -43,10 +43,6 @@ private:
|
||||
/* True if the border to draw should be thin */
|
||||
bool m_thin_border;
|
||||
|
||||
/** If true, characters will have right alignment when rendering, for RTL
|
||||
* language. */
|
||||
bool m_rtl;
|
||||
|
||||
/** Scaling when rendering. */
|
||||
float m_scale;
|
||||
|
||||
@ -65,15 +61,14 @@ public:
|
||||
/** Constructor. It will initialize all members with default values if no
|
||||
* parameter is given. */
|
||||
FontSettings(bool black_border = false, bool colored_border = false,
|
||||
bool thin_border = false,
|
||||
bool rtl = false, float scale = 1.0f, bool shadow = false,
|
||||
bool thin_border = false, float scale = 1.0f,
|
||||
bool shadow = false,
|
||||
const video::SColor& shadow_color = video::SColor(0, 0, 0, 0),
|
||||
const video::SColor& border_color = video::SColor(0, 0, 0, 0))
|
||||
{
|
||||
m_black_border = black_border;
|
||||
m_colored_border = colored_border;
|
||||
m_thin_border = thin_border;
|
||||
m_rtl = rtl;
|
||||
m_scale = scale;
|
||||
m_shadow = shadow;
|
||||
m_shadow_color = shadow_color;
|
||||
@ -127,13 +122,6 @@ public:
|
||||
// ------------------------------------------------------------------------
|
||||
/** Return if the border should be thin or not. */
|
||||
bool useThinBorder() const { return m_thin_border; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Set right text alignment for RTL language.
|
||||
* \param rtl If it's enabled. */
|
||||
void setRTL(bool rtl) { m_rtl = rtl; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Return if right text alignment for RTL language is enabled. */
|
||||
bool isRTL() const { return m_rtl; }
|
||||
|
||||
}; // FontSettings
|
||||
|
||||
|
@ -39,11 +39,6 @@ ScalableFont::~ScalableFont()
|
||||
delete m_font_settings;
|
||||
} // ~ScalableFont
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void ScalableFont::updateRTL()
|
||||
{
|
||||
} // updateRTL
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void ScalableFont::setShadow(const irr::video::SColor &col)
|
||||
{
|
||||
|
@ -65,8 +65,6 @@ public:
|
||||
// ------------------------------------------------------------------------
|
||||
void disableColoredBorder();
|
||||
// ------------------------------------------------------------------------
|
||||
void updateRTL();
|
||||
// ------------------------------------------------------------------------
|
||||
void draw(const core::stringw& text, const core::rect<s32>& position,
|
||||
const video::SColor& color, bool hcenter,
|
||||
bool vcenter, const core::rect<s32>* clip,
|
||||
|
Loading…
Reference in New Issue
Block a user