Fix random cursor position when creating a multiplayer game.
This commit is contained in:
parent
71afbf92e0
commit
df9ad4632f
2 changed files with 3 additions and 14 deletions
|
@ -56,6 +56,9 @@ textbox::~textbox()
|
|||
void textbox::set_inner_location(SDL_Rect const &rect)
|
||||
{
|
||||
bg_register(rect);
|
||||
if (text_image_.null()) return;
|
||||
text_pos_ = 0;
|
||||
update_text_cache(false);
|
||||
}
|
||||
|
||||
const std::string textbox::text() const
|
||||
|
@ -235,14 +238,6 @@ void textbox::set_wrap(bool val)
|
|||
}
|
||||
}
|
||||
|
||||
void textbox::set_location(const SDL_Rect& rect)
|
||||
{
|
||||
text_pos_ = 0;
|
||||
|
||||
scrollarea::set_location(rect);
|
||||
set_shown_size(location().h);
|
||||
}
|
||||
|
||||
void textbox::scroll(unsigned int pos)
|
||||
{
|
||||
yscroll_ = pos;
|
||||
|
|
|
@ -44,12 +44,6 @@ public:
|
|||
|
||||
void set_wrap(bool val);
|
||||
|
||||
void set_location(const SDL_Rect& rect);
|
||||
|
||||
//VC++ doesn't like a 'using scrollarea::set_location' directive here, so we declare
|
||||
//an inline forwarding function instead
|
||||
void set_location(int x, int y) { widget::set_location(x,y); }
|
||||
|
||||
protected:
|
||||
virtual void draw_contents();
|
||||
virtual void set_inner_location(SDL_Rect const &);
|
||||
|
|
Loading…
Add table
Reference in a new issue