From 72635df56ec915ab6ce79b4386d2c183f9e4e4a5 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 1 Apr 2020 22:25:18 +0100 Subject: [PATCH] Add menu options for line styles / view / configuration. This is to make them a bit easier to find, since the natural place to look for config options is somewhere like File->Preferences or Edit->Settings. --- src/graphicswin.cpp | 22 ++++++++++++++++++++++ src/ui.h | 3 +++ 2 files changed, 25 insertions(+) diff --git a/src/graphicswin.cpp b/src/graphicswin.cpp index 0d520dd..95a4ad0 100644 --- a/src/graphicswin.cpp +++ b/src/graphicswin.cpp @@ -74,6 +74,12 @@ const MenuEntry Menu[] = { { 1, N_("Select &Edge Chain"), Command::SELECT_CHAIN, C|'e', KN, mEdit }, { 1, N_("Select &All"), Command::SELECT_ALL, C|'a', KN, mEdit }, { 1, N_("&Unselect All"), Command::UNSELECT_ALL, '\x1b', KN, mEdit }, +{ 1, NULL, Command::NONE, 0, KN, NULL }, +{ 1, N_("&Line Styles..."), Command::EDIT_LINE_STYLES, 0, KN, mEdit }, +{ 1, N_("&View Projection..."), Command::VIEW_PROJECTION, 0, KN, mEdit }, +#ifndef __APPLE__ +{ 1, N_("Con&figuration..."), Command::CONFIGURATION, 0, KN, mEdit }, +#endif { 0, N_("&View"), Command::NONE, 0, KN, mView }, { 1, N_("Zoom &In"), Command::ZOOM_IN, '+', KN, mView }, @@ -1183,6 +1189,22 @@ void GraphicsWindow::MenuEdit(Command id) { SS.ScheduleShowTW(); break; + case Command::EDIT_LINE_STYLES: + SS.TW.GoToScreen(TextWindow::Screen::LIST_OF_STYLES); + SS.GW.ForceTextWindowShown(); + SS.ScheduleShowTW(); + break; + case Command::VIEW_PROJECTION: + SS.TW.GoToScreen(TextWindow::Screen::EDIT_VIEW); + SS.GW.ForceTextWindowShown(); + SS.ScheduleShowTW(); + break; + case Command::CONFIGURATION: + SS.TW.GoToScreen(TextWindow::Screen::CONFIGURATION); + SS.GW.ForceTextWindowShown(); + SS.ScheduleShowTW(); + break; + default: ssassert(false, "Unexpected menu ID"); } } diff --git a/src/ui.h b/src/ui.h index 7d24e84..2a068dc 100644 --- a/src/ui.h +++ b/src/ui.h @@ -105,6 +105,9 @@ enum class Command : uint32_t { ROTATE_90, UNSELECT_ALL, REGEN_ALL, + EDIT_LINE_STYLES, + VIEW_PROJECTION, + CONFIGURATION, // Request SEL_WORKPLANE, FREE_IN_3D,