Added insert items dialog function
This commit is contained in:
@@ -4,8 +4,7 @@
|
||||
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
#include <richedit.h>
|
||||
#include "resource.h" //Should not have to do this...
|
||||
#include "resource.h"
|
||||
|
||||
|
||||
|
||||
@@ -35,9 +34,8 @@ FONT 8, "Ms Shell Dlg"
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Icon resources
|
||||
//
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
||||
IDI_ICON1 ICON "FatB3dIcon.ico"
|
||||
IDI_ICON1 ICON "FatB3dIcon.ico"
|
||||
|
||||
19
resource.h
19
resource.h
@@ -1,10 +1,9 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by dialogs.rc
|
||||
//
|
||||
#define IDI_ICON1 101
|
||||
#define IDB_BITMAP1 102
|
||||
#define IDD_DIALOG1 103
|
||||
#define IDC_EDIT1 1001
|
||||
#define IDC_PROPERTYGRID 2000
|
||||
|
||||
#ifndef IDC_STATIC
|
||||
#define IDC_STATIC (-1)
|
||||
#endif
|
||||
|
||||
#define IDI_ICON1 101
|
||||
#define IDB_BITMAP1 102
|
||||
#define IDD_DIALOG1 103
|
||||
#define IDD_DIALOG2 104
|
||||
#define IDC_EDIT1 1001
|
||||
|
||||
@@ -673,17 +673,18 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
|
||||
|
||||
|
||||
renderDevice->setShininess(70);
|
||||
renderDevice->setSpecularCoefficient(Color3(0.1F, 0.1F, 0.1F));
|
||||
//renderDevice->setShininess(70);
|
||||
//renderDevice->setSpecularCoefficient(Color3(0.1F, 0.1F, 0.1F));
|
||||
|
||||
//float lightAmbient[] = { 0.5F, 0.6F, 0.9F, 1.0F };
|
||||
//float lightDiffuse[] = { 0.6F, 0.4F, 0.9F, 1.0F };
|
||||
float lightAmbient[] = { 0.5F, 0.6F, 0.9F, 1.0F };
|
||||
float lightDiffuse[] = { 0.6F, 0.4F, 0.9F, 1.0F };
|
||||
float lightSpecular[] = { 0.8F, 0.8F, 0.8F, 1.0F };
|
||||
//float lightSpecular[] = { 0.8F, 0.6F, 1.0F, 1.0F };
|
||||
|
||||
//glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, lightAmbient);
|
||||
//glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, lightDiffuse);
|
||||
//glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, lightSpecular);
|
||||
//glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 70);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, lightAmbient);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, lightDiffuse);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, lightSpecular);
|
||||
glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 70);
|
||||
|
||||
|
||||
rd->beforePrimitive();
|
||||
|
||||
@@ -184,6 +184,8 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||
button->setAllColorsSame();
|
||||
button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||
button->setName("insert");
|
||||
button->setButtonListener(menuListener);
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(500, 0);
|
||||
|
||||
@@ -2,6 +2,33 @@
|
||||
#include "DataModelV2/ToggleImageButtonInstance.h"
|
||||
#include "Application.h"
|
||||
#include "Globals.h"
|
||||
#include "../../resource.h"
|
||||
|
||||
INT_PTR CALLBACK InsertDlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(Message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
return TRUE;
|
||||
break;
|
||||
case WM_COMMAND:
|
||||
switch(LOWORD(wParam))
|
||||
{
|
||||
case IDOK:
|
||||
//g_dataModel->setMessage("lol u thought");
|
||||
EndDialog(hwnd, IDOK);
|
||||
break;
|
||||
case IDCANCEL:
|
||||
EndDialog(hwnd, IDCANCEL);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void MenuButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
{
|
||||
if(button->name == "go")
|
||||
@@ -20,4 +47,11 @@ void MenuButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
GetCursorPos(&p);
|
||||
TrackPopupMenu(mainmenu, TPM_LEFTBUTTON, p.x, p.y, 0, Globals::mainHwnd, 0);
|
||||
}
|
||||
}
|
||||
else if(button->name == "insert")
|
||||
{
|
||||
//HWND aDiag = CreateDialog((HINSTANCE) GetWindowLong(Globals::mainHwnd, GWL_HINSTANCE), MAKEINTRESOURCE(IDD_DIALOG1), Globals::mainHwnd, (DLGPROC)InsertDlgProc);
|
||||
HWND aDiag2 = CreateDialog((HINSTANCE) GetWindowLong(Globals::mainHwnd, GWL_HINSTANCE), MAKEINTRESOURCE(IDD_DIALOG2), Globals::mainHwnd, (DLGPROC)InsertDlgProc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user