Highlight pending operation on toolbar, even if started via keyboard.

pull/3/head
whitequark 2015-03-30 00:37:21 +03:00
parent 46db5378dc
commit f89020ad26
2 changed files with 4 additions and 1 deletions

View File

@ -945,6 +945,7 @@ void GraphicsWindow::MenuRequest(int id) {
SS.TW.GoToScreen(TextWindow::SCREEN_TANGENT_ARC);
SS.GW.ForceTextWindowShown();
SS.ScheduleShowTW();
InvalidateGraphics(); // repaint toolbar
}
break;
@ -960,6 +961,7 @@ c:
SS.GW.pending.operation = id;
SS.GW.pending.description = s;
SS.ScheduleShowTW();
InvalidateGraphics(); // repaint toolbar
break;
case MNU_CONSTRUCTION: {

View File

@ -168,7 +168,8 @@ bool GraphicsWindow::ToolbarDrawOrHitTest(int mx, int my,
glRasterPos2i(x - 12, y - 12);
glDrawPixels(24, 24, GL_RGB, GL_UNSIGNED_BYTE, Toolbar[i].image);
if(toolbarHovered == Toolbar[i].menu) {
if(toolbarHovered == Toolbar[i].menu ||
pending.operation == Toolbar[i].menu) {
// Highlight the hovered or pending item.
glColor4d(1, 1, 0, 0.3);
int boxhw = 15;