Merge branch 'master' into DataModelV2
This commit is contained in:
@@ -75,7 +75,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Advapi32.lib UxTheme.lib Comctl32.lib Comdlg32.lib Shell32.lib"
|
||||
AdditionalDependencies="Advapi32.lib Comctl32.lib Comdlg32.lib Shell32.lib"
|
||||
OutputFile="./Blocks3D.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@@ -400,32 +400,6 @@
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="DataModelV2"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\Instance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
@@ -627,14 +601,6 @@
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="DataModelV2"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModelV2\Instance.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
|
||||
36
Installer/install_script.iss
Normal file
36
Installer/install_script.iss
Normal file
@@ -0,0 +1,36 @@
|
||||
;InnoSetupVersion=5.5.7
|
||||
|
||||
[Setup]
|
||||
AppName=Blocks3D
|
||||
AppId={{4C5DF268-0208-4CDE-A7F0-65F7E2CB5067}
|
||||
AppVersion=v0_0_104_3
|
||||
AppPublisherURL=http://blocks3d.com/
|
||||
AppSupportURL=http://blocks3d.com/
|
||||
AppUpdatesURL=http://blocks3d.com/
|
||||
DefaultDirName={%localappdata}\Blocks3D
|
||||
OutputBaseFilename=Blocks3D_Setup_{#SetupSetting("AppVersion")}
|
||||
Compression=lzma2
|
||||
PrivilegesRequired=lowest
|
||||
WizardImageFile=setup.bmp
|
||||
|
||||
[UninstallDelete]
|
||||
Type: filesandordirs; Name: "{app}"
|
||||
|
||||
[Files]
|
||||
Source: "Redist\vcredist_x86.exe"; DestDir: "{tmp}"; Flags: ignoreversion
|
||||
Source: "Redist\vcredist_x64.exe"; DestDir: "{tmp}"; Check: "IsWin64"; Flags: ignoreversion
|
||||
Source: "..\content\*"; DestDir: "{app}\content"; Flags: ignoreversion recursesubdirs
|
||||
Source: "..\SDL.DLL"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
|
||||
Source: "..\Blocks3D.exe"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
|
||||
|
||||
[Registry]
|
||||
|
||||
|
||||
[Run]
|
||||
Filename: "{tmp}\vcredist_x86.exe"; Parameters: "/q"; Tasks: instvc;
|
||||
Filename: "{tmp}\vcredist_x64.exe"; Parameters: "/q"; Tasks: instvc; Check: "IsWin64";
|
||||
Filename: "iexplore.exe"; Parameters: "http://www.blocks3d.com/FirstInstall"; Description: Start playing Blocks3D; Flags: shellexec postinstall nowait skipifsilent
|
||||
|
||||
[Tasks]
|
||||
Name: "instvc"; Description: "Install Visual C++ Redistributable 2005 SP1 (Requires elevated permissions)";
|
||||
|
||||
BIN
Installer/setup.bmp
Normal file
BIN
Installer/setup.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 151 KiB |
BIN
Installer/setup.png
Normal file
BIN
Installer/setup.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
@@ -21,6 +21,7 @@ public:
|
||||
static int surfaceId;
|
||||
static const std::string g_PlaceholderName;
|
||||
static COLORREF g_acrCustClr[16]; //Will be dynamic later
|
||||
static HWND mainHwnd;
|
||||
};
|
||||
|
||||
extern std::vector<Instance*> postRenderStack;
|
||||
@@ -36,4 +37,5 @@ extern COLORREF g_acrCustClr[16]; //Will be dynamic later
|
||||
extern std::string cameraSound;
|
||||
extern std::string clickSound;
|
||||
extern std::string dingSound;
|
||||
extern HWND mainHwnd;
|
||||
const std::string g_PlaceholderName = "Dygysphere";
|
||||
@@ -445,7 +445,7 @@ void GuiRootInstance::renderGUI(G3D::RenderDevice* rd, double fps)
|
||||
#endif
|
||||
//GUI Boxes
|
||||
Draw::box(G3D::Box(Vector3(0,25,0),Vector3(80,355,0)),rd,Color4(0.6F,0.6F,0.6F,0.4F), Color4(0,0,0,0));
|
||||
Draw::box(G3D::Box(Vector3(rd->getWidth() - 120,rd->getHeight() - 120,0),Vector3(rd->getWidth(),rd->getHeight(),0)),rd,Color4(0.6F,0.6F,0.6F,0.4F), Color4(0,0,0,0));
|
||||
Draw::box(G3D::Box(Vector3(rd->getWidth() - 120,rd->getHeight() - 117,0),Vector3(rd->getWidth(),rd->getHeight(),0)),rd,Color4(0.6F,0.6F,0.6F,0.4F), Color4(0,0,0,0));
|
||||
|
||||
//Camera menu title
|
||||
g_fntlighttrek->draw2D(rd, "CameraMenu", Vector2(rd->getWidth()-(g_fntlighttrek->get2DStringBounds("CameraMenu", 14).x+1),rd->getHeight() - 120), 14, Color3::white(), Color4(0.5F,0.5F,0.5F,0.5F));
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#include "Application.h"
|
||||
|
||||
int const Globals::gen = 0;
|
||||
int const Globals::major = 0;
|
||||
int const Globals::major = 100;
|
||||
int const Globals::minor = 4;
|
||||
int const Globals::patch = 2;
|
||||
int const Globals::patch = 3;
|
||||
int Globals::surfaceId = 2;
|
||||
bool Globals::showMouse = true;
|
||||
bool Globals::useMousePoint = false;
|
||||
@@ -19,6 +19,7 @@ POINT Globals::mousepoint;
|
||||
|
||||
GFontRef g_fntdominant = NULL;
|
||||
GFontRef g_fntlighttrek = NULL;
|
||||
HWND Globals::mainHwnd = NULL;
|
||||
|
||||
Globals::Globals(void){}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Listener/MenuButtonListener.h"
|
||||
#include "DataModel/ToggleImageButtonInstance.h"
|
||||
#include "Application.h"
|
||||
#include "Globals.h"
|
||||
void MenuButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
{
|
||||
@@ -10,34 +11,13 @@ void MenuButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
}
|
||||
else if(button->name == "file")
|
||||
{
|
||||
HMENU hPopupMenu = CreatePopupMenu();
|
||||
HWND hwnd = CreateWindowEx(
|
||||
WS_EX_APPWINDOW,
|
||||
"MenuWindow",
|
||||
"Main test",
|
||||
WS_OVERLAPPEDWINDOW,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
800,
|
||||
660,
|
||||
NULL, // parent
|
||||
NULL, // menu
|
||||
GetModuleHandle(NULL),
|
||||
NULL
|
||||
);
|
||||
|
||||
AppendMenu(hPopupMenu, MF_STRING, 0, "Test");
|
||||
if(hPopupMenu == NULL)
|
||||
{
|
||||
MessageBox(NULL, "Menu is null!", "Failed", MB_OK);
|
||||
}
|
||||
else if(hwnd == NULL)
|
||||
{
|
||||
MessageBox(NULL, "HWND is null!", "Failed", MB_OK);
|
||||
}
|
||||
else if(!TrackPopupMenu(hPopupMenu, TPM_LEFTBUTTON, 100, 100, 0, hwnd, 0))
|
||||
{
|
||||
MessageBox(NULL, "Failed to track!", "Failed", MB_OK);
|
||||
}
|
||||
HMENU mainmenu = CreatePopupMenu();
|
||||
AppendMenu(mainmenu, MF_STRING, 100, "New");
|
||||
AppendMenu(mainmenu, MF_STRING, 101, "Open...");
|
||||
AppendMenu(mainmenu, MF_STRING, 101, "Close");
|
||||
AppendMenu(mainmenu, MF_SEPARATOR, 0, NULL);
|
||||
POINT p;
|
||||
GetCursorPos(&p);
|
||||
TrackPopupMenu(mainmenu, TPM_LEFTBUTTON, p.x, p.y, 0, Globals::mainHwnd, 0);
|
||||
}
|
||||
}
|
||||
@@ -230,7 +230,7 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
SendMessage(hwndMain, WM_SETICON, ICON_BIG,(LPARAM)LoadImage(GetModuleHandle(NULL), (LPCSTR)MAKEINTRESOURCEW(IDI_ICON1), IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR | LR_DEFAULTSIZE));
|
||||
|
||||
|
||||
Globals::mainHwnd = hwndMain;
|
||||
Application app = Application(hwndMain);
|
||||
app.run();
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT // Necessary for WM_MOUSEWHEEL support
|
||||
#define _WIN32_WINNT 0x0500
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#endif
|
||||
|
||||
// MSVC++ Support
|
||||
@@ -959,7 +959,7 @@ static HWND CreateEdit(HINSTANCE hInstance, HWND hwndParent, INT id)
|
||||
return NULL;
|
||||
|
||||
//DWM 1.4: Added Disable visual styles for this control.
|
||||
SetWindowTheme(hwnd, L" ", L" ");
|
||||
// SetWindowTheme(hwnd, L" ", L" ");
|
||||
|
||||
SendMessage(hwnd, WM_SETFONT, (WPARAM)GetStockObject(DEFAULT_GUI_FONT), 0L);
|
||||
|
||||
@@ -1268,7 +1268,7 @@ static HWND CreateButton(HINSTANCE hInstance, HWND hwndParent, INT id)
|
||||
return NULL;
|
||||
|
||||
//DWM 1.4: Added Disable visual styles for this control.
|
||||
SetWindowTheme(hwnd, L" ", L" ");
|
||||
//SetWindowTheme(hwnd, L" ", L" ");
|
||||
|
||||
SendMessage(hwnd, WM_SETFONT, (WPARAM)GetStockObject(DEFAULT_GUI_FONT), 0L);
|
||||
|
||||
@@ -1505,7 +1505,7 @@ static HWND CreateDatePicker(HINSTANCE hInstance, HWND hwndParent, INT id, BOOL
|
||||
return NULL;
|
||||
|
||||
//DWM 1.4: Added Disable visual styles for this control.
|
||||
SetWindowTheme(hwnd, L" ", L" ");
|
||||
//SetWindowTheme(hwnd, L" ", L" ");
|
||||
|
||||
SendMessage(hwnd, WM_SETFONT, (WPARAM)GetStockObject(DEFAULT_GUI_FONT), 0L);
|
||||
|
||||
@@ -1697,7 +1697,7 @@ static HWND CreateCombo(HINSTANCE hInstance, HWND hwndParent, INT id, BOOL fEdit
|
||||
|
||||
//DWM 1.4: Disable visual styles for the time being since the combo looks bad
|
||||
// in this grid when drawn using the Vista and later styles.
|
||||
SetWindowTheme(hwnd, L" ", L" ");
|
||||
//SetWindowTheme(hwnd, L" ", L" ");
|
||||
|
||||
SendMessage(hwnd, WM_SETFONT, (WPARAM)GetStockObject(DEFAULT_GUI_FONT), 0L);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user