gui/widget/menue.cpp: fade-in, if menu was hidden, for testing

This commit is contained in:
[CST] Focus
2012-07-16 19:11:17 +04:00
parent 3b0dec611c
commit eb5b8328ec
2 changed files with 5 additions and 0 deletions

View File

@@ -670,6 +670,8 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
break; break;
case menu_return::RETURN_REPAINT: case menu_return::RETURN_REPAINT:
case menu_return::RETURN_EXIT_REPAINT: case menu_return::RETURN_EXIT_REPAINT:
if (fade && washidden)
fader.StartFadeIn();
paint(); paint();
break; break;
} }
@@ -761,6 +763,7 @@ void CMenuWidget::hide()
for (unsigned int count = 0; count < items.size(); count++) for (unsigned int count = 0; count < items.size(); count++)
items[count]->init(-1, 0, 0, 0); items[count]->init(-1, 0, 0, 0);
hint_painted = false; hint_painted = false;
washidden = true;
} }
void CMenuWidget::calcSize() void CMenuWidget::calcSize()
@@ -903,6 +906,7 @@ void CMenuWidget::paint()
item_start_y = y+hheight; item_start_y = y+hheight;
paintItems(); paintItems();
washidden = false;
} }
void CMenuWidget::setMenuPos(const int& menu_width) void CMenuWidget::setMenuPos(const int& menu_width)

View File

@@ -454,6 +454,7 @@ class CMenuWidget : public CMenuTarget
bool exit_pressed; bool exit_pressed;
bool from_wizard; bool from_wizard;
bool fade; bool fade;
bool washidden;
void Init(const std::string & Icon, const int mwidth, const mn_widget_id_t &w_index); void Init(const std::string & Icon, const int mwidth, const mn_widget_id_t &w_index);
virtual void paintItems(); virtual void paintItems();