1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
4 # include "../config.h"
7 #include "focuswidget.hh"
11 FocusWidget::FocusWidget(Widget *parent, Direction direction)
12 : Widget(parent, direction), _unfocus_texture(0), _unfocus_bcolor(0)
15 _focus_texture = parent->texture();
16 _focus_bcolor = parent->borderColor();
19 FocusWidget::~FocusWidget()
24 void FocusWidget::focus(void)
32 Widget::setBorderColor(_focus_bcolor);
34 Widget::setTexture(_focus_texture);
38 void FocusWidget::unfocus(void)
46 Widget::setBorderColor(_unfocus_bcolor);
48 Widget::setTexture(_unfocus_texture);
52 void FocusWidget::setTexture(RenderTexture *texture)
54 Widget::setTexture(texture);
55 _focus_texture = texture;
58 void FocusWidget::setBorderColor(const RenderColor *color)
60 Widget::setBorderColor(color);
61 _focus_bcolor = color;