Merge pull request #4 from andreja6/ui

Merge UI
This commit is contained in:
andreja6
2018-04-12 11:00:00 -07:00
committed by GitHub
7 changed files with 140 additions and 2 deletions

1
.gitignore vendored
View File

@@ -50,3 +50,4 @@ log.txt
*.suo *.suo
G3DTest.suo G3DTest.suo
G3DTest.suo G3DTest.suo
stderr.txt

BIN
Dialogs.aps Normal file

Binary file not shown.

109
Dialogs.rc Normal file
View File

@@ -0,0 +1,109 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (Canada) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_ABOUT_DIALOG DIALOGEX 0, 0, 226, 151
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,169,130,50,14
PUSHBUTTON "Cancel",IDCANCEL,112,130,50,14
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_ABOUT_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 219
TOPMARGIN, 7
BOTTOMMARGIN, 144
END
END
#endif // APSTUDIO_INVOKED
#endif // English (Canada) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

Binary file not shown.

View File

@@ -116,6 +116,7 @@
UseOfMFC="0" UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false" ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2" CharacterSet="2"
ManagedExtensions="0"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
@@ -142,8 +143,8 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
MinimalRebuild="true" MinimalRebuild="false"
BasicRuntimeChecks="3" BasicRuntimeChecks="0"
RuntimeLibrary="2" RuntimeLibrary="2"
PrecompiledHeaderFile=".\Debug/G3DTest.pch" PrecompiledHeaderFile=".\Debug/G3DTest.pch"
AssemblerListingLocation=".\Debug/" AssemblerListingLocation=".\Debug/"
@@ -229,6 +230,10 @@
Name="Source Files" Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
> >
<File
RelativePath=".\Dialogs.rc"
>
</File>
<File <File
RelativePath=".\Instance.cpp" RelativePath=".\Instance.cpp"
> >
@@ -270,6 +275,10 @@
RelativePath=".\PhysicalInstance.h" RelativePath=".\PhysicalInstance.h"
> >
</File> </File>
<File
RelativePath=".\resource.h"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="Resource Files" Name="Resource Files"

View File

@@ -11,6 +11,7 @@
@author Morgan McGuire, matrix@graphics3d.com @author Morgan McGuire, matrix@graphics3d.com
*/ */
#include <G3DAll.h> #include <G3DAll.h>
#include "resource.h"
#include "Instance.h" #include "Instance.h"
#include "PhysicalInstance.h" #include "PhysicalInstance.h"
@@ -204,6 +205,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);
MessageBox(NULL, emsg.c_str(),"Dynamica Crash", MB_OK); MessageBox(NULL, emsg.c_str(),"Dynamica Crash", MB_OK);
exit(err); exit(err);
} }
@@ -254,6 +256,7 @@ void Demo::onUserInput(UserInput* ui) {
spacing--; spacing--;
messageTime = System::time(); messageTime = System::time();
message = "Spacing set to " + Convert(spacing); message = "Spacing set to " + Convert(spacing);
OnError(3423); OnError(3423);
} }
else if(ui->keyReleased(SDL_RIGHT_MOUSE_KEY)) else if(ui->keyReleased(SDL_RIGHT_MOUSE_KEY))

16
resource.h Normal file
View File

@@ -0,0 +1,16 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Dialogs.rc
//
#define IDD_ABOUT_DIALOG 102
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 105
#define _APS_NEXT_COMMAND_VALUE 40004
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif