Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d623bb99d | ||
|
|
21684a6ea3 | ||
|
|
5306ec6809 | ||
|
|
fe2f8cf160 | ||
|
|
36999b0307 | ||
|
|
f4d01e48fa | ||
|
|
0816390509 | ||
|
|
9ce3a1a26c | ||
|
|
2797bdb4a5 | ||
|
|
ce7b221a11 | ||
|
|
2776546ab7 | ||
|
|
49013a7da8 | ||
|
|
ede16aa880 | ||
|
|
7fad41ff53 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -50,3 +50,4 @@ log.txt
|
||||
*.suo
|
||||
G3DTest.suo
|
||||
G3DTest.suo
|
||||
stderr.txt
|
||||
|
||||
BIN
Dialogs.aps
Normal file
BIN
Dialogs.aps
Normal file
Binary file not shown.
158
Dialogs.rc
Normal file
158
Dialogs.rc
Normal file
@@ -0,0 +1,158 @@
|
||||
// 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
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_TOOLBOX DIALOGEX 0, 0, 368, 77
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "",IDC_AXBROWSER1,"{A8F8E829-06DA-11D2-8D70-00A0C98B28E2}",WS_TABSTOP,7,7,354,63
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_TOOLBOX, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 361
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 70
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog Info
|
||||
//
|
||||
|
||||
IDD_TOOLBOX DLGINIT
|
||||
BEGIN
|
||||
IDC_AXBROWSER1, 0x376, 76, 0
|
||||
0x0000, 0x0000, 0xb293, 0x0000, 0x0048, 0x0000, 0x0003, 0x0008, 0xf20b,
|
||||
0x4757, 0x0020, 0x0000, 0x005f, 0x0065, 0x0078, 0x0074, 0x0065, 0x006e,
|
||||
0x0074, 0x0078, 0x36e1, 0x0000, 0x0003, 0x0008, 0xf20a, 0x4757, 0xffe0,
|
||||
0xffff, 0x005f, 0x0065, 0x0078, 0x0074, 0x0065, 0x006e, 0x0074, 0x0079,
|
||||
0x0a8b, 0x0000,
|
||||
0
|
||||
END
|
||||
|
||||
#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
|
||||
|
||||
BIN
G3DTest.suo
BIN
G3DTest.suo
Binary file not shown.
@@ -116,6 +116,7 @@
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
ManagedExtensions="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
@@ -142,8 +143,8 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="2"
|
||||
PrecompiledHeaderFile=".\Debug/G3DTest.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
@@ -229,6 +230,10 @@
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Dialogs.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Instance.cpp"
|
||||
>
|
||||
@@ -257,6 +262,10 @@
|
||||
RelativePath=".\PhysicalInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TextButtonInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
@@ -270,6 +279,14 @@
|
||||
RelativePath=".\PhysicalInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TextButtonInstance.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
@@ -278,5 +295,9 @@
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
<Global
|
||||
Name="RESOURCE_FILE"
|
||||
Value="Dialogs.rc"
|
||||
/>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include <G3DAll.h>
|
||||
#pragma once
|
||||
|
||||
class Instance
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#include <G3DAll.h>
|
||||
#include "PhysicalInstance.h"
|
||||
|
||||
bool canCollide = true;
|
||||
|
||||
40
TextButtonInstance.cpp
Normal file
40
TextButtonInstance.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#include "TextButtonInstance.h"
|
||||
Vector2 boxBegin;
|
||||
Vector2 boxEnd;
|
||||
Vector2 fontLocationRelativeTo;
|
||||
Color4 textColor;
|
||||
Color4 textOutlineColor;
|
||||
Color4 boxColor;
|
||||
Color4 boxOutlineColor;
|
||||
Color4 textColorOvr;
|
||||
Color4 textOutlineColorOvr;
|
||||
Color4 boxColorOvr;
|
||||
Color4 boxOutlineColorOvr;
|
||||
Color4 textColorDn;
|
||||
Color4 textOutlineColorDn;
|
||||
Color4 boxColorDn;
|
||||
Color4 boxOutlineColorDn;
|
||||
bool centeredWithinBox;
|
||||
std::string title;
|
||||
G3D::GFontRef font;
|
||||
int textSize;
|
||||
|
||||
|
||||
TextButtonInstance::TextButtonInstance(void)
|
||||
{
|
||||
boxBegin = Vector2(0,0);
|
||||
boxEnd = Vector2(0,0);
|
||||
fontLocationRelativeTo = Vector2(0,0);
|
||||
centeredWithinBox = false;
|
||||
title = "TextBox";
|
||||
textColor = Color4(1, 1, 1, 1);
|
||||
textOutlineColor = Color4(0, 0, 0, 0);
|
||||
boxColor = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||
boxOutlineColor = Color4(0, 0, 0, 0);
|
||||
textSize = 12;
|
||||
|
||||
}
|
||||
|
||||
TextButtonInstance::~TextButtonInstance(void)
|
||||
{
|
||||
}
|
||||
28
TextButtonInstance.h
Normal file
28
TextButtonInstance.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include "instance.h"
|
||||
|
||||
class TextButtonInstance :
|
||||
public Instance
|
||||
{
|
||||
public:
|
||||
TextButtonInstance(void);
|
||||
~TextButtonInstance(void);
|
||||
Vector2 boxBegin;
|
||||
Vector2 boxEnd;
|
||||
Vector2 fontLocationRelativeTo;
|
||||
Color4 textColor;
|
||||
Color4 textOutlineColor;
|
||||
Color4 boxColor;
|
||||
Color4 boxOutlineColor;
|
||||
Color4 textColorOvr;
|
||||
Color4 textOutlineColorOvr;
|
||||
Color4 boxColorOvr;
|
||||
Color4 boxOutlineColorOvr;
|
||||
Color4 textColorDn;
|
||||
Color4 textOutlineColorDn;
|
||||
Color4 boxColorDn;
|
||||
Color4 boxOutlineColorDn;
|
||||
bool centeredWithinBox;
|
||||
std::string title;
|
||||
G3D::GFontRef font;
|
||||
};
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
content/images/toolboxItem.png
Normal file
BIN
content/images/toolboxItem.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 379 B |
BIN
content/images/toolbox_down.png
Normal file
BIN
content/images/toolbox_down.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
content/images/toolbox_left.png
Normal file
BIN
content/images/toolbox_left.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
BIN
content/images/toolbox_right.png
Normal file
BIN
content/images/toolbox_right.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
BIN
content/images/toolbox_up.png
Normal file
BIN
content/images/toolbox_up.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
22
main.cpp
22
main.cpp
@@ -11,6 +11,7 @@
|
||||
@author Morgan McGuire, matrix@graphics3d.com
|
||||
*/
|
||||
#include <G3DAll.h>
|
||||
#include "resource.h"
|
||||
#include "Instance.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;
|
||||
clearInstances();
|
||||
//DialogBox(NULL, MAKEINTRESOURCE(IDD_DIALOG1), NULL, NULL);
|
||||
MessageBox(NULL, emsg.c_str(),"Dynamica Crash", MB_OK);
|
||||
exit(err);
|
||||
}
|
||||
@@ -233,6 +235,11 @@ void Demo::onSimulation(RealTime rdt, SimTime sdt, SimTime idt) {
|
||||
}
|
||||
|
||||
|
||||
void readMouseGUIInput()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Demo::onUserInput(UserInput* ui) {
|
||||
if (ui->keyPressed(SDLK_ESCAPE)) {
|
||||
// Even when we aren't in debug mode, quit on escape.
|
||||
@@ -254,6 +261,7 @@ void Demo::onUserInput(UserInput* ui) {
|
||||
spacing--;
|
||||
messageTime = System::time();
|
||||
message = "Spacing set to " + Convert(spacing);
|
||||
|
||||
OnError(3423);
|
||||
}
|
||||
else if(ui->keyReleased(SDL_RIGHT_MOUSE_KEY))
|
||||
@@ -265,6 +273,8 @@ void Demo::onUserInput(UserInput* ui) {
|
||||
if(ui->keyPressed(SDLK_LSHIFT))
|
||||
{
|
||||
app->debugController.setMoveRate(20);
|
||||
|
||||
|
||||
}
|
||||
else if(ui->keyReleased(SDLK_LSHIFT))
|
||||
{
|
||||
@@ -294,10 +304,12 @@ void Demo::onUserInput(UserInput* ui) {
|
||||
message = "FPS has been set to " + Convert(FPSVal[index]);
|
||||
setDesiredFrameRate(FPSVal[index]);
|
||||
}
|
||||
|
||||
readMouseGUIInput();
|
||||
// Add other key handling here
|
||||
}
|
||||
|
||||
|
||||
|
||||
std::string ExePath() {
|
||||
char buffer[MAX_PATH];
|
||||
GetModuleFileName( NULL, buffer, MAX_PATH );
|
||||
@@ -450,12 +462,12 @@ void Demo::onGraphics(RenderDevice* rd) {
|
||||
|
||||
|
||||
|
||||
//rd->pushState();
|
||||
rd->pushState();
|
||||
|
||||
//rd->setTexture(0, go);
|
||||
rd->setTexture(0, go);
|
||||
|
||||
|
||||
/*rd->enableAlphaWrite();
|
||||
rd->enableAlphaWrite();
|
||||
rd->setTexCoord(0, Vector2(0.0F, 0.0F));
|
||||
rd->setTexCoord(0, Vector2(1.0F, 0.0F));
|
||||
rd->setTexCoord(0, Vector2(0.0F, 1.0F));
|
||||
@@ -468,7 +480,7 @@ void Demo::onGraphics(RenderDevice* rd) {
|
||||
rd->sendVertex(Vector2(10,85));
|
||||
rd->endPrimitive();
|
||||
rd->setTexture(0, NULL);
|
||||
//rd->popState();*/
|
||||
rd->popState();
|
||||
|
||||
|
||||
app->renderDevice->pop2D();
|
||||
|
||||
19
resource.h
Normal file
19
resource.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by Dialogs.rc
|
||||
//
|
||||
#define IDD_TOOLBOX 101
|
||||
#define IDD_ABOUT_DIALOG 102
|
||||
#define IDC_AXBROWSER1 1001
|
||||
#define IDC_BUTTON1 1002
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 106
|
||||
#define _APS_NEXT_COMMAND_VALUE 40004
|
||||
#define _APS_NEXT_CONTROL_VALUE 1003
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user