/* draws the text, fading the items according to the distance from the
* current selection.
*/
void ContextBox::doDraw(int x, int y, int middle_x, int min_y, int max_y, const Font & font, int current, int selected, const Graphics::Bitmap & area, int direction){
#if 0
while (y < max_y && y > min_y){
int pick = current;
while (pick < 0){
pick += context.size();
}
pick = pick % context.size();
ContextItem * option = context[pick];
const int startx = middle_x - font.textLength(option->getName().c_str())/2;
void doDraw(int x, int y, int middle_x, int min_y, int max_y, const Font & font, int current, int selected, const Graphics::Bitmap & area, int direction);
void drawText(const Graphics::Bitmap &, const Font & font);
/* this is the smooth scroll stuff from context-box */
void ScrollList::doDraw(int x, int y, int middle_x, int min_y, int max_y, const Font & font, int current, int selected, const Graphics::Bitmap & area, int direction){
virtual inline unsigned int getCurrentIndex() const {
return this->currentIndex;
}
+ /*
//! Set gradient
virtual inline void setGradient(bool use){
this->useGradient = use;
}
//! Get gradient
virtual inline bool gradientActive() const {
return this->useGradient;
}
+ */
//! Set highlight
virtual inline void setHighlight(bool use){
this->useHighlight = use;
}
//! Get highlight
virtual inline bool highlightActive() const {
return this->useHighlight;
}
//! Set wrap
virtual inline void setWrap(bool wrap){
this->allowWrap = wrap;
}
//! Get wrap
virtual inline bool getWrap() const {
return this->allowWrap;
}
private:
/* smooth drawing */
void doDraw(int x, int y, int middle_x, int min_y, int max_y, const Font & font, int current, int selected, const Graphics::Bitmap & area, int direction);