亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? windowpropertiesdialog.cpp

?? 骨骼動畫....把魔獸模型解出的代碼..
?? CPP
字號:
//+-----------------------------------------------------------------------------
//| Included files
//+-----------------------------------------------------------------------------
#include "WindowPropertiesDialog.h"


//+-----------------------------------------------------------------------------
//| Global objects
//+-----------------------------------------------------------------------------
WINDOW_PROPERTIES_DIALOG PropertiesDialog;


//+-----------------------------------------------------------------------------
//| Static member variables
//+-----------------------------------------------------------------------------
PROPERTIES_INFO WINDOW_PROPERTIES_DIALOG::StaticPropertiesInfo;


//+-----------------------------------------------------------------------------
//| Constructor
//+-----------------------------------------------------------------------------
WINDOW_PROPERTIES_DIALOG::WINDOW_PROPERTIES_DIALOG()
{
	//Empty
}


//+-----------------------------------------------------------------------------
//| Destructor
//+-----------------------------------------------------------------------------
WINDOW_PROPERTIES_DIALOG::~WINDOW_PROPERTIES_DIALOG()
{
	//Empty
}


//+-----------------------------------------------------------------------------
//| Displays the dialog
//+-----------------------------------------------------------------------------
BOOL WINDOW_PROPERTIES_DIALOG::Display(HWND ParentWindow, PROPERTIES_INFO& PropertiesInfo) CONST
{
	StaticPropertiesInfo = PropertiesInfo;
	if(DialogBoxParam(GetModuleHandle(NULL), MAKEINTRESOURCE(DialogProperties), ParentWindow, DialogMessageHandler, 0))
	{
		PropertiesInfo = StaticPropertiesInfo;
		return TRUE;
	}

	return FALSE;
}


//+-----------------------------------------------------------------------------
//| Handles the dialog messages
//+-----------------------------------------------------------------------------
BOOL CALLBACK WINDOW_PROPERTIES_DIALOG::DialogMessageHandler(HWND Window, UINT Message, WPARAM W, LPARAM L)
{
	switch(Message)
	{
		case WM_INITDIALOG:
		{
			CenterWindow(Window);

			CheckDlgButton(Window, DialogPropertiesButtonUseLighting,      BoolToCheckState(StaticPropertiesInfo.UseLighting));
			CheckDlgButton(Window, DialogPropertiesButtonUseShaders,       BoolToCheckState(StaticPropertiesInfo.UseShaders));
			CheckDlgButton(Window, DialogPropertiesButtonZoom,             BoolToCheckState(StaticPropertiesInfo.RelativeZoom));
			CheckDlgButton(Window, DialogPropertiesButtonMove,             BoolToCheckState(StaticPropertiesInfo.RelativeMove));
			CheckDlgButton(Window, DialogPropertiesButtonClockwise,        BoolToCheckState(StaticPropertiesInfo.ClockwiseCulling));
			CheckDlgButton(Window, DialogPropertiesButtonUseGroundTexture, BoolToCheckState(StaticPropertiesInfo.UseGroundTexture));
			CheckDlgButton(Window, DialogPropertiesButtonDebug,            BoolToCheckState(StaticPropertiesInfo.ShowDebug));
			CheckDlgButton(Window, DialogPropertiesButtonAxises,           BoolToCheckState(StaticPropertiesInfo.ShowAxises));
			CheckDlgButton(Window, DialogPropertiesButtonLights,           BoolToCheckState(StaticPropertiesInfo.ShowLights));
			CheckDlgButton(Window, DialogPropertiesButtonBones,            BoolToCheckState(StaticPropertiesInfo.ShowBones));
			CheckDlgButton(Window, DialogPropertiesButtonCameras,          BoolToCheckState(StaticPropertiesInfo.ShowCameras));
			CheckDlgButton(Window, DialogPropertiesButtonCollisionShapes,  BoolToCheckState(StaticPropertiesInfo.ShowCollisionShapes));
			CheckDlgButton(Window, DialogPropertiesButtonCounterClockwise, !BoolToCheckState(StaticPropertiesInfo.ClockwiseCulling));
			CheckDlgButton(Window, DialogPropertiesButtonPoint,            BoolToCheckState(StaticPropertiesInfo.FillMode == D3DFILL_POINT));
			CheckDlgButton(Window, DialogPropertiesButtonWireframe,        BoolToCheckState(StaticPropertiesInfo.FillMode == D3DFILL_WIREFRAME));
			CheckDlgButton(Window, DialogPropertiesButtonSolid,            BoolToCheckState(StaticPropertiesInfo.FillMode == D3DFILL_SOLID));

			if(!Properties.ShadersAvailable())
			{
				CheckDlgButton(Window, DialogPropertiesButtonUseShaders, FALSE);
				EnableWindow(GetDlgItem(Window, DialogPropertiesButtonUseShaders), FALSE);
			}

			SetFloat(GetDlgItem(Window, DialogPropertiesEditPower), StaticPropertiesInfo.Power);
			SetInt(GetDlgItem(Window, DialogPropertiesEditQuality), StaticPropertiesInfo.BlpQuality);
			SetFloat(GetDlgItem(Window, DialogPropertiesEditNear), StaticPropertiesInfo.NearDistance);
			SetFloat(GetDlgItem(Window, DialogPropertiesEditFar), StaticPropertiesInfo.FarDistance);
			SetFloat(GetDlgItem(Window, DialogPropertiesEditGroundTextureScale), StaticPropertiesInfo.GroundTextureScale);
			SetString(GetDlgItem(Window, DialogPropertiesEditGroundTexture), StaticPropertiesInfo.GroundTexture);

			return TRUE;
		}

		case WM_PAINT:
		{
			RenderColorBox(Window, GetDlgItem(Window, DialogPropertiesColorBackground), StaticPropertiesInfo.Background);
			RenderColorBox(Window, GetDlgItem(Window, DialogPropertiesColorAmbient),    StaticPropertiesInfo.Ambient);
			RenderColorBox(Window, GetDlgItem(Window, DialogPropertiesColorDiffuse),    StaticPropertiesInfo.Diffuse);
			RenderColorBox(Window, GetDlgItem(Window, DialogPropertiesColorSpecular),   StaticPropertiesInfo.Specular);

			return TRUE;
		}

		case WM_COMMAND:
		{
			switch(LOWORD(W))
			{
				case DialogPropertiesButtonOk:
				{
					FLOAT TempPower;

					StaticPropertiesInfo.UseLighting         = CheckStateToBool(IsDlgButtonChecked(Window, DialogPropertiesButtonUseLighting));
					StaticPropertiesInfo.UseShaders          = CheckStateToBool(IsDlgButtonChecked(Window, DialogPropertiesButtonUseShaders));
					StaticPropertiesInfo.RelativeZoom        = CheckStateToBool(IsDlgButtonChecked(Window, DialogPropertiesButtonZoom));
					StaticPropertiesInfo.RelativeMove        = CheckStateToBool(IsDlgButtonChecked(Window, DialogPropertiesButtonMove));
					StaticPropertiesInfo.ClockwiseCulling    = CheckStateToBool(IsDlgButtonChecked(Window, DialogPropertiesButtonClockwise));
					StaticPropertiesInfo.UseGroundTexture    = CheckStateToBool(IsDlgButtonChecked(Window, DialogPropertiesButtonUseGroundTexture));
					StaticPropertiesInfo.ShowDebug           = CheckStateToBool(IsDlgButtonChecked(Window, DialogPropertiesButtonDebug));
					StaticPropertiesInfo.ShowAxises          = CheckStateToBool(IsDlgButtonChecked(Window, DialogPropertiesButtonAxises));
					StaticPropertiesInfo.ShowLights          = CheckStateToBool(IsDlgButtonChecked(Window, DialogPropertiesButtonLights));
					StaticPropertiesInfo.ShowBones           = CheckStateToBool(IsDlgButtonChecked(Window, DialogPropertiesButtonBones));
					StaticPropertiesInfo.ShowCameras         = CheckStateToBool(IsDlgButtonChecked(Window, DialogPropertiesButtonCameras));
					StaticPropertiesInfo.ShowCollisionShapes = CheckStateToBool(IsDlgButtonChecked(Window, DialogPropertiesButtonCollisionShapes));

					if(CheckStateToBool(IsDlgButtonChecked(Window, DialogPropertiesButtonPoint)))
					{
						StaticPropertiesInfo.FillMode = D3DFILL_POINT;
					}
					else if(CheckStateToBool(IsDlgButtonChecked(Window, DialogPropertiesButtonWireframe)))
					{
						StaticPropertiesInfo.FillMode = D3DFILL_WIREFRAME;
					}
					else
					{
						StaticPropertiesInfo.FillMode = D3DFILL_SOLID;
					}

					TempPower = GetFloat(GetDlgItem(Window, DialogPropertiesEditPower), -1.0f);
					if(TempPower < 0.0f)
					{
						Error.SetMessage("The Specular Power must be at least 0.0!");
						Error.DisplayMessage(Window);
						Error.ClearMessage();

						SetFocus(GetDlgItem(Window, DialogPropertiesEditPower));
						::SendMessage(GetDlgItem(Window, DialogPropertiesEditPower), EM_SETSEL, 0, -1);

						return TRUE;
					}

					StaticPropertiesInfo.Power = TempPower;

					StaticPropertiesInfo.BlpQuality = GetInt(GetDlgItem(Window, DialogPropertiesEditQuality), -1);
					if((StaticPropertiesInfo.BlpQuality < 0) || (StaticPropertiesInfo.BlpQuality > 100))
					{
						Error.SetMessage("The BLP Quality must be between 0 and 100!");
						Error.DisplayMessage(Window);
						Error.ClearMessage();

						SetFocus(GetDlgItem(Window, DialogPropertiesEditQuality));
						::SendMessage(GetDlgItem(Window, DialogPropertiesEditQuality), EM_SETSEL, 0, -1);

						return TRUE;
					}

					StaticPropertiesInfo.NearDistance = GetFloat(GetDlgItem(Window, DialogPropertiesEditNear), -1.0f);
					if(StaticPropertiesInfo.NearDistance < 0.0)
					{
						Error.SetMessage("The Near Distance has to be greater than 0.0!");
						Error.DisplayMessage(Window);
						Error.ClearMessage();

						SetFocus(GetDlgItem(Window, DialogPropertiesEditNear));
						::SendMessage(GetDlgItem(Window, DialogPropertiesEditNear), EM_SETSEL, 0, -1);

						return TRUE;
					}

					StaticPropertiesInfo.FarDistance = GetFloat(GetDlgItem(Window, DialogPropertiesEditFar), -1.0f);
					if(StaticPropertiesInfo.FarDistance < 0.0)
					{
						Error.SetMessage("The Far Distance has to be greater than 0.0!");
						Error.DisplayMessage(Window);
						Error.ClearMessage();

						SetFocus(GetDlgItem(Window, DialogPropertiesEditFar));
						::SendMessage(GetDlgItem(Window, DialogPropertiesEditFar), EM_SETSEL, 0, -1);

						return TRUE;
					}

					if(StaticPropertiesInfo.FarDistance <= StaticPropertiesInfo.NearDistance)
					{
						Error.SetMessage("The Far Distance has to be greater than the Near Distance!");
						Error.DisplayMessage(Window);
						Error.ClearMessage();

						SetFocus(GetDlgItem(Window, DialogPropertiesEditFar));
						::SendMessage(GetDlgItem(Window, DialogPropertiesEditFar), EM_SETSEL, 0, -1);

						return TRUE;
					}

					StaticPropertiesInfo.GroundTextureScale = GetFloat(GetDlgItem(Window, DialogPropertiesEditGroundTextureScale), 1.0f);
					StaticPropertiesInfo.GroundTexture = GetString(GetDlgItem(Window, DialogPropertiesEditGroundTexture));

					EndDialog(Window, 1);
					return TRUE;
				}

				case DialogPropertiesButtonCancel:
				{
					EndDialog(Window, 0);
					return TRUE;
				}

				case DialogPropertiesButtonPickBackground:
				{
					if(!SelectColor(Window, StaticPropertiesInfo.Background))
					{
						SendMessage(Window, WM_PAINT, NULL, NULL);
						return TRUE;
					}

					SendMessage(Window, WM_PAINT, NULL, NULL);
					return TRUE;
				}

				case DialogPropertiesButtonPickAmbient:
				{
					if(!SelectColor(Window, StaticPropertiesInfo.Ambient))
					{
						SendMessage(Window, WM_PAINT, NULL, NULL);
						return TRUE;
					}

					SendMessage(Window, WM_PAINT, NULL, NULL);
					return TRUE;
				}

				case DialogPropertiesButtonPickDiffuse:
				{
					if(!SelectColor(Window, StaticPropertiesInfo.Diffuse))
					{
						SendMessage(Window, WM_PAINT, NULL, NULL);
						return TRUE;
					}

					SendMessage(Window, WM_PAINT, NULL, NULL);
					return TRUE;
				}

				case DialogPropertiesButtonPickSpecular:
				{
					if(!SelectColor(Window, StaticPropertiesInfo.Specular))
					{
						SendMessage(Window, WM_PAINT, NULL, NULL);
						return TRUE;
					}

					SendMessage(Window, WM_PAINT, NULL, NULL);
					return TRUE;
				}

				case DialogPropertiesButtonDefaultBackground:
				{
					StaticPropertiesInfo.Background = PROPERTIES_DEFAULT_BACKGROUND;
					SendMessage(Window, WM_PAINT, NULL, NULL);
					return TRUE;
				}

				case DialogPropertiesButtonDefaultAmbient:
				{
					StaticPropertiesInfo.Ambient = PROPERTIES_DEFAULT_AMBIENT;
					SendMessage(Window, WM_PAINT, NULL, NULL);
					return TRUE;
				}

				case DialogPropertiesButtonDefaultDiffuse:
				{
					StaticPropertiesInfo.Diffuse = PROPERTIES_DEFAULT_DIFFUSE;
					SendMessage(Window, WM_PAINT, NULL, NULL);
					return TRUE;
				}

				case DialogPropertiesButtonDefaultSpecular:
				{
					StaticPropertiesInfo.Specular = PROPERTIES_DEFAULT_SPECULAR;
					SendMessage(Window, WM_PAINT, NULL, NULL);
					return TRUE;
				}

				case DialogPropertiesButtonDefaultPower:
				{
					StaticPropertiesInfo.Power = PROPERTIES_DEFAULT_SPECULAR_POWER;
					SetFloat(GetDlgItem(Window, DialogPropertiesEditPower), StaticPropertiesInfo.Power);
					return TRUE;
				}

				case DialogPropertiesButtonDefaultQuality:
				{
					StaticPropertiesInfo.BlpQuality = DEFAULT_BLP_QUALITY;
					SetInt(GetDlgItem(Window, DialogPropertiesEditQuality), StaticPropertiesInfo.BlpQuality);
					return TRUE;
				}

				case DialogPropertiesButtonDefaultClippingPlane:
				{
					StaticPropertiesInfo.NearDistance = GRAPHICS_DEFAULT_NEAR_DISTANCE;
					StaticPropertiesInfo.FarDistance = GRAPHICS_DEFAULT_FAR_DISTANCE;
					SetFloat(GetDlgItem(Window, DialogPropertiesEditNear), StaticPropertiesInfo.NearDistance);
					SetFloat(GetDlgItem(Window, DialogPropertiesEditFar), StaticPropertiesInfo.FarDistance);
					return TRUE;
				}
			}

			return FALSE;
		}

		case WM_CLOSE:
		{
			::SendMessage(Window, WM_COMMAND, DialogPropertiesButtonCancel, 0);
			return TRUE;
		}
	}

	return FALSE;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人欧美edvon| 欧美日本视频在线| 国产一区二区福利| 久久福利资源站| 午夜成人免费电影| 免费不卡在线观看| 国产激情一区二区三区| 国产激情精品久久久第一区二区 | 亚洲精品免费看| 亚洲精品日韩一| 国产精品白丝av| 成人av手机在线观看| 色网综合在线观看| 欧美人xxxx| 久久嫩草精品久久久久| 国产精品三级av| 亚洲色图欧美在线| 婷婷亚洲久悠悠色悠在线播放| 日本亚洲最大的色成网站www| 亚洲一区二区三区美女| 久久成人免费网站| 粉嫩嫩av羞羞动漫久久久| 91免费观看国产| 91国内精品野花午夜精品| 日韩欧美自拍偷拍| 中文字幕一区二区三区四区 | 亚洲欧美偷拍三级| 三级成人在线视频| 免费在线观看精品| 色婷婷一区二区三区四区| 欧美日韩国产bt| 337p粉嫩大胆色噜噜噜噜亚洲| 国产精品免费视频一区| 亚洲gay无套男同| 麻豆精品国产91久久久久久| av综合在线播放| 欧美乱妇15p| 日本一区二区动态图| 亚洲在线视频免费观看| 久久亚洲免费视频| 欧美日本国产一区| 亚洲精品一区二区三区福利| 亚洲天堂av老司机| 午夜精品久久久久久久久久| 成人18精品视频| 欧美日韩国产高清一区二区| 日本一区二区三区在线不卡 | 成人免费视频播放| 欧美无砖砖区免费| 欧美国产一区在线| 偷拍一区二区三区四区| 色综合一个色综合| 欧美国产成人精品| 美日韩一区二区三区| 99re成人在线| 国产无人区一区二区三区| 国产精品网站导航| 高潮精品一区videoshd| 日韩一级完整毛片| 成人免费一区二区三区在线观看 | 99久免费精品视频在线观看| 欧美一区二区免费视频| 日韩久久一区二区| 国产精品自在在线| 精品国产乱码久久久久久闺蜜| 亚洲一级电影视频| 日本电影欧美片| 一区二区三区小说| 欧洲一区二区三区在线| ●精品国产综合乱码久久久久| 成人av手机在线观看| 中文字幕日韩av资源站| 成人国产视频在线观看| 1024国产精品| 91福利在线看| 亚洲国产精品欧美一二99| 欧美伊人久久久久久午夜久久久久| 夜夜精品浪潮av一区二区三区| 一本色道综合亚洲| 悠悠色在线精品| 欧美日韩国产经典色站一区二区三区 | 亚洲午夜久久久久久久久电影网| 色综合av在线| 午夜精品在线看| 日韩一级黄色片| 国产在线播放一区| 欧美激情一区二区三区| 99热99精品| 亚洲成人免费电影| 4438x成人网最大色成网站| 免费成人在线网站| 久久你懂得1024| 99精品久久只有精品| 亚洲黄色性网站| 在线成人小视频| 狠狠色2019综合网| 亚洲欧洲三级电影| 欧美日韩aaaaaa| 紧缚奴在线一区二区三区| 欧美韩国日本不卡| 日本久久电影网| 日本在线不卡一区| 国产日韩精品视频一区| 色婷婷av久久久久久久| 青青草原综合久久大伊人精品优势 | 亚洲欧洲日韩综合一区二区| 欧美亚洲一区三区| 久久国产夜色精品鲁鲁99| 欧美国产综合色视频| 欧美色爱综合网| 国产一区二区三区免费在线观看| 国产精品国产自产拍在线| 欧美三级电影精品| 国产又黄又大久久| 一区二区视频在线看| 日韩欧美中文字幕公布| 99久久婷婷国产| 日韩精品视频网站| 欧美国产精品劲爆| 欧美久久久久久久久久| 福利电影一区二区| 亚洲一区在线观看免费| 久久精品人人做人人爽人人| 色综合激情五月| 国产资源在线一区| 亚洲第一福利一区| 国产偷国产偷亚洲高清人白洁| 欧洲日韩一区二区三区| 狠狠狠色丁香婷婷综合激情| 一区二区三区在线观看网站| 2020日本不卡一区二区视频| 91国偷自产一区二区开放时间| 精品一区二区三区久久久| 亚洲欧美一区二区不卡| 久久影视一区二区| 欧美日韩高清一区二区| 99久久精品国产精品久久| 蜜臀av国产精品久久久久| 亚洲精选一二三| 久久久综合精品| 91精品国产黑色紧身裤美女| 91在线视频免费观看| 久久精品99国产国产精| 亚洲成人免费视| 亚洲免费电影在线| 国产视频一区在线观看| 日韩欧美一区二区免费| 91久久精品一区二区二区| 国产精品亚洲午夜一区二区三区| 午夜久久久影院| 一区二区三区在线免费播放 | 色哟哟日韩精品| 成人av资源在线观看| 国产又黄又大久久| 男女性色大片免费观看一区二区| 一区二区三区欧美日韩| 国产精品国产馆在线真实露脸| 久久夜色精品国产欧美乱极品| 欧美剧情片在线观看| 欧美午夜免费电影| 97se狠狠狠综合亚洲狠狠| 国产乱子轮精品视频| 久久国产福利国产秒拍| 日本一不卡视频| 天堂久久久久va久久久久| 夜色激情一区二区| 亚洲色图丝袜美腿| 专区另类欧美日韩| 日韩美女精品在线| 中文字幕一区二区5566日韩| 国产精品三级av在线播放| 国产日产欧美一区二区视频| 久久午夜老司机| 欧美精品一区二区蜜臀亚洲| 欧美成人bangbros| 日韩免费福利电影在线观看| 日韩一级成人av| 日韩欧美国产系列| 精品国产百合女同互慰| 日韩欧美在线123| 欧美一级欧美三级在线观看 | 久久99深爱久久99精品| 久久精品理论片| 久久99国产精品免费| 激情图片小说一区| 国产成人综合网站| 春色校园综合激情亚洲| 成人av在线一区二区| 99久久综合精品| 91视视频在线观看入口直接观看www| 成人黄色大片在线观看| 一本色道久久综合亚洲aⅴ蜜桃| 色婷婷综合五月| 欧美日本在线一区| 欧美一区二区在线不卡| 欧美本精品男人aⅴ天堂| 久久一区二区视频| 国产精品久久国产精麻豆99网站 | 欧美色视频在线| 91精品国产综合久久久蜜臀粉嫩|