Added test dialog

This commit is contained in:
andreja6
2018-04-20 06:59:37 -07:00
parent a91bc4c5b5
commit 810488e20c
2 changed files with 7 additions and 3 deletions

View File

@@ -4,7 +4,6 @@
#include "stdafx.h" #include "stdafx.h"
#include "Work.h" #include "Work.h"
// Work dialog // Work dialog
IMPLEMENT_DYNAMIC(Work, CDialog) IMPLEMENT_DYNAMIC(Work, CDialog)

View File

@@ -14,6 +14,7 @@
#define WINVER 0x0400 #define WINVER 0x0400
#include <G3DAll.h> #include <G3DAll.h>
#include "Instance.h" #include "Instance.h"
#include "resource.h"
#include "PhysicalInstance.h" #include "PhysicalInstance.h"
#include "TextButtonInstance.h" #include "TextButtonInstance.h"
@@ -348,7 +349,7 @@ void OnError(int err, std::string msg = "")
std::string emsg = "An unexpected error has occured and DUOM 5 has to quit. We're sorry!" + msg; std::string emsg = "An unexpected error has occured and DUOM 5 has to quit. We're sorry!" + msg;
clearInstances(); clearInstances();
//DialogBox(NULL, MAKEINTRESOURCE(IDD_DIALOG1), NULL, NULL); //DialogBox(NULL, MAKEINTRESOURCE(IDD_DIALOG1), NULL, NULL);
MessageBoxA(NULL, emsg.c_str(),"Dynamica Crash", MB_OK); MessageBox(NULL, emsg.c_str(),"Dynamica Crash", MB_OK);
exit(err); exit(err);
} }
@@ -452,6 +453,10 @@ void Demo::onUserInput(UserInput* ui) {
message = "FPS has been set to " + Convert(FPSVal[index]); message = "FPS has been set to " + Convert(FPSVal[index]);
setDesiredFrameRate(FPSVal[index]); setDesiredFrameRate(FPSVal[index]);
} }
if(ui->keyPressed('u'))
{
DialogBox(NULL, MAKEINTRESOURCE(IDD_ABOUT_DIALOG), NULL, NULL);
}
mousex = ui->getMouseX(); mousex = ui->getMouseX();
mousey = ui->getMouseY(); mousey = ui->getMouseY();
mouseButton1Down = ui->keyDown(SDL_LEFT_MOUSE_KEY); mouseButton1Down = ui->keyDown(SDL_LEFT_MOUSE_KEY);
@@ -463,7 +468,7 @@ void Demo::onUserInput(UserInput* ui) {
std::string ExePath() { std::string ExePath() {
char buffer[MAX_PATH]; char buffer[MAX_PATH];
GetModuleFileNameA( NULL, buffer, MAX_PATH ); GetModuleFileName( NULL, buffer, MAX_PATH );
std::string::size_type pos = std::string( buffer ).find_last_of( "\\/" ); std::string::size_type pos = std::string( buffer ).find_last_of( "\\/" );
return std::string( buffer ).substr( 0, pos); return std::string( buffer ).substr( 0, pos);
} }