Mandelbrot: Add about window.
This commit is contained in:
parent
e8f108e18d
commit
5322a6dbc7
@ -2,6 +2,8 @@ SubDir HAIKU_TOP src apps mandelbrot ;
|
||||
|
||||
AddSubDirSupportedPlatforms libbe_test ;
|
||||
|
||||
UsePrivateHeaders interface shared system ;
|
||||
|
||||
Application Mandelbrot :
|
||||
Mandelbrot.cpp
|
||||
FractalEngine.cpp
|
||||
|
@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <AboutWindow.h>
|
||||
#include <Application.h>
|
||||
#include <Bitmap.h>
|
||||
#include <Catalog.h>
|
||||
@ -307,6 +308,7 @@ MandelbrotWindow::MandelbrotWindow(BRect frame)
|
||||
BMenu* iterMenu;
|
||||
BLayoutBuilder::Menu<>(menuBar)
|
||||
.AddMenu(B_TRANSLATE("File"))
|
||||
.AddItem(B_TRANSLATE("About"), B_ABOUT_REQUESTED)
|
||||
.AddItem(B_TRANSLATE("Quit"), B_QUIT_REQUESTED, 'Q')
|
||||
.End()
|
||||
.AddMenu(B_TRANSLATE("Set"))
|
||||
@ -410,6 +412,19 @@ MandelbrotWindow::MessageReceived(BMessage* msg)
|
||||
HANDLE_ITER(MSG_ITER_12288, 12288)
|
||||
HANDLE_ITER(MSG_ITER_16384, 16384)
|
||||
|
||||
case B_ABOUT_REQUESTED: {
|
||||
BAboutWindow* wind = new BAboutWindow("Mandelbrot", "application/x-vnd.Haiku-Mandelbrot");
|
||||
const char* authors[] = {
|
||||
"Augustin Cavalier <waddlesplash>",
|
||||
B_TRANSLATE("kerwizzy (original FractalEngine author)"),
|
||||
NULL
|
||||
};
|
||||
wind->AddCopyright(2016, "Haiku, Inc.");
|
||||
wind->AddAuthors(authors);
|
||||
wind->Show();
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
BWindow::MessageReceived(msg);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user