fix the "missing scrollbars" problem
This commit is contained in:
parent
ffe52dff24
commit
fd036a6675
4 changed files with 17 additions and 0 deletions
|
@ -33,6 +33,13 @@ bool scrollarea::has_scrollbar() const
|
|||
return shown_size_ < full_size_ && scrollbar_.is_valid_height(location().h);
|
||||
}
|
||||
|
||||
handler_vector scrollarea::handler_members()
|
||||
{
|
||||
handler_vector h;
|
||||
h.push_back(&scrollbar_);
|
||||
return h;
|
||||
}
|
||||
|
||||
void scrollarea::update_location(SDL_Rect const &rect)
|
||||
{
|
||||
SDL_Rect r = rect;
|
||||
|
|
|
@ -32,6 +32,7 @@ public:
|
|||
virtual void hide(bool value = true);
|
||||
|
||||
protected:
|
||||
virtual handler_vector handler_members();
|
||||
virtual void update_location(SDL_Rect const &rect);
|
||||
virtual void handle_event(const SDL_Event& event);
|
||||
virtual void process_event();
|
||||
|
|
|
@ -54,6 +54,14 @@ scrollbar::scrollbar(CVideo &video)
|
|||
}
|
||||
}
|
||||
|
||||
handler_vector scrollbar::handler_members()
|
||||
{
|
||||
handler_vector h;
|
||||
h.push_back(&uparrow_);
|
||||
h.push_back(&downarrow_);
|
||||
return h;
|
||||
}
|
||||
|
||||
void scrollbar::update_location(SDL_Rect const &rect)
|
||||
{
|
||||
int uh = uparrow_.height(), dh = downarrow_.height();
|
||||
|
|
|
@ -70,6 +70,7 @@ public:
|
|||
void scroll_up();
|
||||
|
||||
protected:
|
||||
virtual handler_vector handler_members();
|
||||
virtual void update_location(SDL_Rect const &rect);
|
||||
virtual void handle_event(const SDL_Event& event);
|
||||
virtual void process_event();
|
||||
|
|
Loading…
Add table
Reference in a new issue