mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-22 13:30:07 +00:00
"About" window looks nicer
This commit is contained in:
parent
8c6f419c37
commit
b652896918
@ -46,7 +46,7 @@ SRCS = ../main.cpp main_beos.cpp ../prefs.cpp ../prefs_items.cpp prefs_beos.cpp
|
||||
../serial.cpp serial_beos.cpp ../ether.cpp ether_beos.cpp ../sony.cpp \
|
||||
../disk.cpp ../cdrom.cpp ../scsi.cpp scsi_beos.cpp ../video.cpp \
|
||||
video_beos.cpp ../audio.cpp audio_beos.cpp ../extfs.cpp extfs_beos.cpp \
|
||||
../user_strings.cpp user_strings_beos.cpp \
|
||||
../user_strings.cpp user_strings_beos.cpp about_window.cpp \
|
||||
$(CPUSRCS)
|
||||
|
||||
# specify the resource files to use
|
||||
|
59
BasiliskII/src/BeOS/about_window.cpp
Normal file
59
BasiliskII/src/BeOS/about_window.cpp
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* about_window.cpp - "About" window
|
||||
*
|
||||
* Basilisk II (C) 1997-2001 Christian Bauer
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <InterfaceKit.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "sysdeps.h"
|
||||
#include "version.h"
|
||||
#include "user_strings.h"
|
||||
|
||||
/*
|
||||
* Display "About" window
|
||||
*/
|
||||
|
||||
void ShowAboutWindow(void)
|
||||
{
|
||||
char str[512];
|
||||
sprintf(str,
|
||||
"Basilisk II\nVersion %d.%d\n\n"
|
||||
"Copyright " B_UTF8_COPYRIGHT " 1997-2001 Christian Bauer et al.\n"
|
||||
"E-mail: Christian.Bauer@uni-mainz.de\n"
|
||||
"http://www.uni-mainz.de/~bauec002/B2Main.html\n\n"
|
||||
"Basilisk II comes with ABSOLUTELY NO\n"
|
||||
"WARRANTY. This is free software, and\n"
|
||||
"you are welcome to redistribute it\n"
|
||||
"under the terms of the GNU General\n"
|
||||
"Public License.\n",
|
||||
VERSION_MAJOR, VERSION_MINOR
|
||||
);
|
||||
BAlert *about = new BAlert("", str, GetString(STR_OK_BUTTON), NULL, NULL, B_WIDTH_FROM_LABEL);
|
||||
BTextView *theText = about->TextView();
|
||||
if (theText) {
|
||||
theText->SetStylable(true);
|
||||
theText->Select(0, 11);
|
||||
BFont ourFont;
|
||||
theText->SetFontAndColor(be_bold_font);
|
||||
theText->GetFontAndColor(2, &ourFont, NULL);
|
||||
ourFont.SetSize(24);
|
||||
theText->SetFontAndColor(&ourFont);
|
||||
}
|
||||
about->Go();
|
||||
}
|
27
BasiliskII/src/BeOS/about_window.h
Normal file
27
BasiliskII/src/BeOS/about_window.h
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* about_window.h - "About" window
|
||||
*
|
||||
* Basilisk II (C) 1997-2001 Christian Bauer
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef ABOUT_WINDOW_H
|
||||
#define ABOUT_WINDOW_H
|
||||
|
||||
// Display "About" window
|
||||
extern void ShowAboutWindow(void);
|
||||
|
||||
#endif
|
@ -33,7 +33,7 @@
|
||||
#include "cdrom.h"
|
||||
#include "xpram.h"
|
||||
#include "prefs.h"
|
||||
#include "version.h"
|
||||
#include "about_window.h"
|
||||
#include "user_strings.h"
|
||||
#include "prefs_editor.h"
|
||||
|
||||
@ -767,12 +767,7 @@ void PrefsWindow::MessageReceived(BMessage *msg)
|
||||
break;
|
||||
|
||||
case B_ABOUT_REQUESTED: { // "About" menu item selected
|
||||
char str[256];
|
||||
sprintf(str, GetString(STR_ABOUT_TEXT1), VERSION_MAJOR, VERSION_MINOR);
|
||||
strcat(str, " ");
|
||||
strcat(str, GetString(STR_ABOUT_TEXT2));
|
||||
BAlert *about = new BAlert(GetString(STR_WINDOW_TITLE), str, GetString(STR_OK_BUTTON));
|
||||
about->Go();
|
||||
ShowAboutWindow();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "adb.h"
|
||||
#include "prefs.h"
|
||||
#include "user_strings.h"
|
||||
#include "version.h"
|
||||
#include "about_window.h"
|
||||
#include "video.h"
|
||||
|
||||
#include "m68k.h"
|
||||
@ -619,12 +619,7 @@ void MacWindow::MessageReceived(BMessage *msg)
|
||||
}
|
||||
|
||||
case MSG_ABOUT_REQUESTED: {
|
||||
char str[256];
|
||||
sprintf(str, GetString(STR_ABOUT_TEXT1), VERSION_MAJOR, VERSION_MINOR);
|
||||
strcat(str, " ");
|
||||
strcat(str, GetString(STR_ABOUT_TEXT2));
|
||||
BAlert *about = new BAlert(GetString(STR_WINDOW_TITLE), str, GetString(STR_OK_BUTTON));
|
||||
about->Go();
|
||||
ShowAboutWindow();
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user