Changeset 2820


Ignore:
Timestamp:
Jul 26, 2013, 12:08:51 AM (4 years ago)
Author:
sam
Message:

core: Text constructor now wants a String object.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/text.cpp

    r2816 r2820  
    4242 */
    4343
    44 Text::Text(char const *text, char const *font)
     44Text::Text(String const &text, char const *font)
    4545  : data(new TextData())
    4646{
    4747    data->font = Forge::Register(font);
    48     if (text)
    49         data->m_text = text;
     48    data->m_text = text;
    5049    data->pos = vec3(0, 0, 0);
    5150
     
    5352}
    5453
    55 void Text::SetText(char const *text)
     54void Text::SetText(String const &text)
    5655{
    5756    data->m_text = text;
  • trunk/src/text.h

    r2816 r2820  
    2727{
    2828public:
    29     Text(char const *text, char const *font);
     29    Text(String const &text, char const *font);
    3030    virtual ~Text();
    3131
    32     void SetText(char const *text);
     32    void SetText(String const &text);
    3333    void SetInt(int val);
    3434    void SetPos(vec3 pos);
Note: See TracChangeset for help on using the changeset viewer.