Pairs: Style fixes and update copyright headers.
Update long description in rdef
This commit is contained in:
parent
bfdb2a4938
commit
c6b0a589df
@ -1,19 +1,30 @@
|
||||
/*
|
||||
* Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com.
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
* Copyright 2014 Haiku, Inc. All rights reserved.
|
||||
*
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* John Scipione, jscipione@gmail.com
|
||||
*/
|
||||
|
||||
|
||||
#include "Pairs.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <Application.h>
|
||||
#include <Catalog.h>
|
||||
|
||||
#include "Pairs.h"
|
||||
#include "PairsWindow.h"
|
||||
|
||||
|
||||
const char* kSignature = "application/x-vnd.Haiku-Pairs";
|
||||
|
||||
|
||||
// #pragma mark - Pairs
|
||||
|
||||
|
||||
Pairs::Pairs()
|
||||
:
|
||||
BApplication(kSignature),
|
||||
@ -49,6 +60,9 @@ Pairs::MessageReceived(BMessage* message)
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark - main
|
||||
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
@ -1,29 +1,38 @@
|
||||
/*
|
||||
* Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com.
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
* Copyright 2014 Haiku, Inc. All rights reserved.
|
||||
*
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* John Scipione, jscipione@gmail.com
|
||||
*/
|
||||
#ifndef PAIRS_H
|
||||
#define PAIRS_H
|
||||
|
||||
|
||||
#include <Application.h>
|
||||
#include <Catalog.h>
|
||||
|
||||
|
||||
extern const char* kSignature;
|
||||
|
||||
|
||||
class BMessage;
|
||||
class PairsWindow;
|
||||
|
||||
class Pairs : public BApplication {
|
||||
public:
|
||||
Pairs();
|
||||
virtual ~Pairs();
|
||||
Pairs();
|
||||
virtual ~Pairs();
|
||||
|
||||
virtual void ReadyToRun();
|
||||
virtual void RefsReceived(BMessage* message);
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void ReadyToRun();
|
||||
virtual void RefsReceived(BMessage* message);
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
|
||||
private:
|
||||
PairsWindow* fWindow;
|
||||
PairsWindow* fWindow;
|
||||
};
|
||||
|
||||
|
||||
#endif // PAIRS_H
|
||||
|
@ -18,7 +18,7 @@ resource app_version {
|
||||
internal = 1,
|
||||
|
||||
short_info = "Pairs",
|
||||
long_info = "Pairs, ©2008-2009 Haiku Inc."
|
||||
long_info = "Pairs, ©2008 Ralf Schülke, ©2010 Adam Smith, ©2014 Haiku, Inc."
|
||||
};
|
||||
|
||||
|
||||
@ -41,4 +41,3 @@ resource vector_icon {
|
||||
$"070108000A060107000A0001041815FF01178400040A00010418001501178600"
|
||||
$"040A040104000A0301090815FF"
|
||||
};
|
||||
|
||||
|
@ -1,11 +1,16 @@
|
||||
/*
|
||||
* Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com.
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
* Copyright 2014 Haiku, Inc. All rights reserved.
|
||||
*
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* John Scipione, jscipione@gmail.com
|
||||
*/
|
||||
|
||||
#ifndef PAIRS_GLOBAL_H
|
||||
#define PAIRS_GLOBAL_H
|
||||
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
|
@ -1,7 +1,11 @@
|
||||
/*
|
||||
* Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com.
|
||||
* All rights reserved.
|
||||
* Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com.
|
||||
* Copyright 2014 Haiku, Inc. All rights reserved.
|
||||
*
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* John Scipione, jscipione@gmail.com
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -1,6 +1,11 @@
|
||||
/*
|
||||
* Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com.
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
* Copyright 2014 Haiku, Inc. All rights reserved.
|
||||
*
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* John Scipione, jscipione@gmail.com
|
||||
*/
|
||||
#ifndef PAIRS_TOP_BUTTON_H
|
||||
#define PAIRS_TOP_BUTTON_H
|
||||
|
@ -1,9 +1,15 @@
|
||||
/*
|
||||
* Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com.
|
||||
* Copyright 2010 Adam Smith <adamd.smith@utoronto.ca>
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
* Copyright 2014 Haiku, Inc. All rights reserved.
|
||||
*
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* John Scipione, jscipione@gmail.com
|
||||
*/
|
||||
|
||||
|
||||
#include "PairsView.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -1,7 +1,12 @@
|
||||
/*
|
||||
* Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com.
|
||||
* Copyright 2010 Adam Smith <adamd.smith@utoronto.ca>
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
* Copyright 2014 Haiku, Inc. All rights reserved.
|
||||
*
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* John Scipione, jscipione@gmail.com
|
||||
*/
|
||||
#ifndef PAIRS_VIEW_H
|
||||
#define PAIRS_VIEW_H
|
||||
|
@ -1,9 +1,15 @@
|
||||
/*
|
||||
* Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com.
|
||||
* Copyright 2010 Adam Smith <adamd.smith@utoronto.ca>
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
* Copyright 2014 Haiku, Inc. All rights reserved.
|
||||
*
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* John Scipione, jscipione@gmail.com
|
||||
*/
|
||||
|
||||
|
||||
#include "PairsWindow.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -25,17 +31,18 @@
|
||||
#include "PairsTopButton.h"
|
||||
|
||||
|
||||
// #pragma mark - PairsWindow
|
||||
|
||||
|
||||
#undef B_TRANSLATION_CONTEXT
|
||||
#define B_TRANSLATION_CONTEXT "PairsWindow"
|
||||
|
||||
|
||||
const uint32 MENU_NEW = 'MGnw';
|
||||
const uint32 MENU_SIZE = 'MGsz';
|
||||
const uint32 MENU_QUIT = 'MGqu';
|
||||
|
||||
|
||||
// #pragma mark - PairsWindow
|
||||
|
||||
|
||||
PairsWindow::PairsWindow()
|
||||
:
|
||||
BWindow(BRect(100, 100, 405, 423), B_TRANSLATE_SYSTEM_NAME("Pairs"),
|
||||
@ -152,6 +159,7 @@ PairsWindow::MessageReceived(BMessage* message)
|
||||
case MENU_NEW:
|
||||
NewGame();
|
||||
break;
|
||||
|
||||
case MENU_SIZE:
|
||||
{
|
||||
int32 width;
|
||||
@ -162,9 +170,11 @@ PairsWindow::MessageReceived(BMessage* message)
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case MENU_QUIT:
|
||||
be_app->PostMessage(B_QUIT_REQUESTED);
|
||||
break;
|
||||
|
||||
case kMsgCardButton:
|
||||
if (fIsPairsActive) {
|
||||
fButtonClicks++;
|
||||
@ -225,7 +235,7 @@ PairsWindow::MessageReceived(BMessage* message)
|
||||
"\tCopyright 2008-2010, Haiku Inc.\n"
|
||||
"\n"
|
||||
"You completed the game in %num% clicks.\n");
|
||||
|
||||
|
||||
strAbout.ReplaceFirst("%app%",
|
||||
B_TRANSLATE_SYSTEM_NAME("Pairs"));
|
||||
strAbout.ReplaceFirst("%num%", score);
|
||||
@ -248,18 +258,14 @@ PairsWindow::MessageReceived(BMessage* message)
|
||||
view->ResizeToPreferred();
|
||||
alert->SetShortcut(0, B_ESCAPE);
|
||||
|
||||
if (alert->Go() == 0) {
|
||||
// New game
|
||||
if (alert->Go() == 0)
|
||||
NewGame();
|
||||
} else {
|
||||
// Quit game
|
||||
else
|
||||
be_app->PostMessage(B_QUIT_REQUESTED);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
BWindow::MessageReceived(message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,20 @@
|
||||
/*
|
||||
* Copyright 2008 Ralf Schülke, ralf.schuelke@googlemail.com.
|
||||
* Copyright 2010 Adam Smith <adamd.smith@utoronto.ca>
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
* Copyright 2014 Haiku, Inc. All rights reserved.
|
||||
*
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* John Scipione, jscipione@gmail.com
|
||||
*/
|
||||
|
||||
#ifndef PAIRS_WINDOW_H
|
||||
#define PAIRS_WINDOW_H
|
||||
|
||||
|
||||
#include <Window.h>
|
||||
|
||||
|
||||
class PairsView;
|
||||
class BMessageRunner;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user