This commit is contained in:
OBattler
2020-04-23 14:42:45 +02:00
4 changed files with 29 additions and 9 deletions

View File

@@ -99,7 +99,7 @@
#define IDS_2123 2123 // "Unable to initialize Ghostscript..."
#define IDS_2124 2124 // "MO %i (%03i): %ls"
#define IDS_2125 2125 // "MO images (*.IM?)\0*.IM..."
#define IDS_2126 2126 // "Media"
#define IDS_2126 2126 // "Welcome to 86Box!"
#define IDS_4096 4096 // "Hard disk (%s)"
#define IDS_4097 4097 // "%01i:%01i"

View File

@@ -300,6 +300,8 @@
#define IDM_VID_GRAY_GREEN 40083
#define IDM_VID_GRAY_WHITE 40084
#define IDM_MEDIA 40085
#ifdef USE_DISCORD
#define IDM_DISCORD 40090
#endif

View File

@@ -112,6 +112,7 @@ BEGIN
MENUITEM "CGA/PCjr/Tandy/E&GA/(S)VGA overscan", IDM_VID_OVERSCAN
MENUITEM "Change contrast for &monochrome display", IDM_VID_CGACON
END
MENUITEM "&Media", IDM_MEDIA
POPUP "&Tools"
BEGIN
MENUITEM "&Settings...", IDM_CONFIG
@@ -915,7 +916,7 @@ BEGIN
IDS_2123 "Unable to initialize Ghostscript, gsdll32.dll is required for automatic convertion of PostScript files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as PostScript files (.ps)."
IDS_2124 "MO %i (%03i): %ls"
IDS_2125 "MO images (*.IM?)\0*.IM?\0All files (*.*)\0*.*\0"
IDS_2126 "&Media"
IDS_2126 "Welcome to 86Box!"
END
STRINGTABLE DISCARDABLE

View File

@@ -1215,6 +1215,27 @@ StatusBarProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
}
void
MediaMenuCreate(HWND hwndParent, uintptr_t idStatus, HINSTANCE hInst)
{
HMENU hmenu;
LPWSTR lpMenuName;
hmenu = GetMenu(hwndParent);
hmenuMedia = CreatePopupMenu();
int len = GetMenuString(hmenu, IDM_MEDIA, NULL, 0, MF_BYCOMMAND);
lpMenuName = malloc((len + 1) * sizeof(WCHAR));
GetMenuString(hmenu, IDM_MEDIA, lpMenuName, len + 1, MF_BYCOMMAND);
InsertMenu(hmenu, IDM_MEDIA, MF_BYCOMMAND | MF_STRING | MF_POPUP, (UINT_PTR)hmenuMedia, lpMenuName);
RemoveMenu(hmenu, IDM_MEDIA, MF_BYCOMMAND);
DrawMenuBar(hwndParent);
free(lpMenuName);
}
/* API: Create and set up the Status Bar window. */
void
StatusBarCreate(HWND hwndParent, uintptr_t idStatus, HINSTANCE hInst)
@@ -1222,7 +1243,6 @@ StatusBarCreate(HWND hwndParent, uintptr_t idStatus, HINSTANCE hInst)
RECT rectDialog;
int dw, dh;
uint8_t i;
HMENU hmenu;
/* Load our icons into the cache for faster access. */
for (i = 16; i < 18; i++)
@@ -1303,13 +1323,10 @@ StatusBarCreate(HWND hwndParent, uintptr_t idStatus, HINSTANCE hInst)
sb_parts++;
SendMessage(hwndSBAR, SB_SETPARTS, (WPARAM)sb_parts, (LPARAM)iStatusWidths);
SendMessage(hwndSBAR, SB_SETTEXT, 0 | SBT_NOBORDERS,
(LPARAM)L"Welcome to 86Box !");
(LPARAM)plat_get_string(IDS_2126));
MediaMenuCreate(hwndParent, idStatus, hInst);
hmenu = GetMenu(hwndParent);
hmenuMedia = CreatePopupMenu();
InsertMenu(hmenu, 2, MF_BYPOSITION | MF_STRING | MF_POPUP, (UINT_PTR)hmenuMedia, plat_get_string(IDS_2126));
DrawMenuBar(hwndParent);
sb_ready = 1;
}