Skip to content

Commit

Permalink
Add horizontal separator
Browse files Browse the repository at this point in the history
  • Loading branch information
yareky authored and LBPHacker committed Jul 6, 2019
1 parent 5508f0c commit 803182d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/gui/options/OptionsView.cpp
Expand Up @@ -168,6 +168,21 @@ OptionsView::OptionsView():
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
scrollPanel->AddChild(tempLabel);

class HorizontalSeparator : public ui::Component
{
public:
HorizontalSeparator(ui::Point position, ui::Point size) : Component(position, size){}
virtual ~HorizontalSeparator(){}

void Draw(const ui::Point& screenPos)
{
GetGraphics()->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 180);
}
};

HorizontalSeparator *tmpSeparator = new HorizontalSeparator(ui::Point(10, 183), ui::Point(Size.X-10, 1));
scrollPanel->AddChild(tmpSeparator);

class ScaleAction: public ui::DropDownAction
{
OptionsView * v;
Expand Down Expand Up @@ -403,7 +418,6 @@ void OptionsView::OnDraw()
Graphics * g = GetGraphics();
g->clearrect(Position.X-2, Position.Y-2, Size.X+3, Size.Y+3);
g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 255, 255, 255, 255);
g->draw_line(Position.X+1, Position.Y+scale->Position.Y-4, Position.X+Size.X-1, Position.Y+scale->Position.Y-4, 255, 255, 255, 180);
}

void OptionsView::OnTryExit(ExitMethod method)
Expand Down

0 comments on commit 803182d

Please sign in to comment.