Skip to content

Commit

Permalink
Mandelbrot: Add about window.
Browse files Browse the repository at this point in the history
  • Loading branch information
waddlesplash committed Jun 18, 2016
1 parent e8f108e commit 5322a6d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/apps/mandelbrot/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ SubDir HAIKU_TOP src apps mandelbrot ;

AddSubDirSupportedPlatforms libbe_test ;

UsePrivateHeaders interface shared system ;

Application Mandelbrot :
Mandelbrot.cpp
FractalEngine.cpp
Expand Down
15 changes: 15 additions & 0 deletions src/apps/mandelbrot/Mandelbrot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/


#include <AboutWindow.h>
#include <Application.h>
#include <Bitmap.h>
#include <Catalog.h>
Expand Down Expand Up @@ -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"))
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5322a6d

Please sign in to comment.