3899 lines
141 KiB
C++
3899 lines
141 KiB
C++
|
|
#include "stdafx.h"
|
|
#include "KUITabControl.h"
|
|
#include "KUIControlButton.h"
|
|
#include "KUIControlCombo.h"
|
|
#include "SGameManager.h"
|
|
#include "SGameMessage.h"
|
|
//#include "SGameMessageUI.h"
|
|
#include "SUISystemWnd.h"
|
|
#include "SUIDisplayInfo.h"
|
|
#include "SgameWorldKeymapping.h"
|
|
#include "SStringDB.h"
|
|
#include "SGameOption.h"
|
|
#include "SUISysMsgDefine.h"
|
|
#include "KUIControlSlider.h"
|
|
#include "KUIControlStatic.h"
|
|
#include "KUIControlScroll.h"
|
|
#include <toolkit/khash.h>
|
|
#include <toolkit/XEnv.h>
|
|
#include "SDebug_Util.h"
|
|
|
|
using namespace SGAME_OPT_DATA;
|
|
|
|
// 2010.06.11 - prodongi
|
|
#include "SGameSystem.h"
|
|
#include "SGameAvatarEx.h"
|
|
extern SGameSystem * g_pCurrentGameSystem;
|
|
//SGameSystem * g_pCurrentGameSystem=NULL;
|
|
|
|
|
|
namespace{
|
|
|
|
enum { // 탭 타입
|
|
TAB_ENVIROMENT = 0,
|
|
TAB_PLAY,
|
|
TAB_KEYMAPPING
|
|
//TAB_INTERFACE = MODE_UI,
|
|
|
|
};
|
|
|
|
enum MODE
|
|
{
|
|
GRAPHIC_TEXTURE = 0,
|
|
GRAPHIC_BACKGROUND,
|
|
SOUND_BG,
|
|
SOUND_EFFECT,
|
|
GRAPHIC_RESOLUTION,
|
|
|
|
// 차후에 추가 될 것들
|
|
GRAPHIC_SCREENBIT,
|
|
GRAPHIC_SCREENBRIGHT,
|
|
GRAPHIC_BLOOMEFFECT,
|
|
GRAPHIC_MODELING,
|
|
GRAPHIC_SHADOW,
|
|
GRAPHIC_CHARACTER,
|
|
GRAPHIC_PROP,
|
|
|
|
SOUND_MAIN,
|
|
SOUND_SURROUND,
|
|
MINIMAP_ALPHA,
|
|
MINIMAP_OPEN,
|
|
|
|
INTERFACE_FACECUT,
|
|
INTERFACE_MINIMAP,
|
|
INTERFACE_ZOOM,
|
|
};
|
|
|
|
enum GRAPHIC
|
|
{
|
|
GRAPHIC_REAL = 0,
|
|
GRAPHIC_HIGH = 1,
|
|
GRAPHIC_NORMAL = 2,
|
|
GRAPHIC_LOW = 3,
|
|
GRAPHIC_LOW_MORE = 4,
|
|
};
|
|
|
|
enum SOUND
|
|
{
|
|
SOUND_00 = 0,
|
|
SOUND_01 = 1,
|
|
SOUND_02 = 2,
|
|
SOUND_03 = 3,
|
|
SOUND_04 = 4,
|
|
SOUND_05 = 5,
|
|
SOUND_06 = 6,
|
|
SOUND_07 = 7,
|
|
SOUND_08 = 8,
|
|
SOUND_09 = 9,
|
|
SOUND_10 = 10,
|
|
};
|
|
|
|
enum INTERFACE
|
|
{
|
|
INTERFACE_SMALL = 0,
|
|
INTERFACE_NORMAL,
|
|
INTERFACE_LARGE,
|
|
};
|
|
|
|
enum MINIMAP
|
|
{
|
|
MINIMAP_ALPHA_MIN = 0,
|
|
MINIMAP_ALPHA_MIDDLE,
|
|
MINIMAP_ALPHA_MAX,
|
|
};
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// 게임 환경 옵션 관련 ===================================================
|
|
enum CONTROL
|
|
{
|
|
WinBright, //바탕화면 밝기 적용 0
|
|
Bright, //화면 밝기 설정 1
|
|
StateEffect, //지속효과 표시 2
|
|
StateEffectPlayer, //자신과 크리처 3
|
|
StateEffectParty, //파티원 4
|
|
StateEffectEnemy, //타겟 5
|
|
GlowQual, //글로우 이펙트 6
|
|
//WaterQual, //물반사 효과 7 // 2011.11.29 - servantes : 사용하지 않아 주석 처리
|
|
TreeAlpha, //나무 투명화 8
|
|
Enhance, //무기 강화 효과 9
|
|
Shadow, //그림자 표시 10
|
|
HeightShadow, //자세히 11
|
|
LowShadow, //단순히 12
|
|
TownLimit, //마을 내 최소구조물 표시 13
|
|
BackGrondDis, //배경 표시거리 14
|
|
AvatarDis, //캐릭터 표시 거리 15
|
|
MipBias, //택스처 품질 16
|
|
//Repeat, //현재 배경음 반복 17 // 2011.11.29 - servantes : 옵션 nui에 해당 효과 없음 / 주석처리
|
|
AllMute, //전체음 소거 18
|
|
BGM_Mute, //배경음 소거 19
|
|
SFX_Mute, //효과음 소거 20
|
|
ENVS_Mute, //환경음 소거 21
|
|
BGM_Volume, //배경음 볼륨 22
|
|
SFX_Volume, //효과음 볼륨 23
|
|
ENVS_Volume, //환경음 볼륨 24
|
|
MASTER_Volume, //전체음 볼륨 25
|
|
Refreshrate, //주사율 26
|
|
RenderTree, //나무 표시 27
|
|
RenderGrass, //풀 표시 28
|
|
Effect, //이펙트 표시 29
|
|
EffectPlayer, //자신과 크리처 30
|
|
EffectParty, //파티원 31
|
|
EffectEnemy, //타겟 32
|
|
LightMap, //라이트멥 33
|
|
MAXCONTROL
|
|
};
|
|
|
|
//체크컨트롤과 서로 매치되야할 static컨트롤 ?
|
|
const char* c_Control[MAXCONTROL][2]
|
|
= { "common_checkbox01", "static_text_23", //바탕화면 밝기 적용 0
|
|
"hslider_light", "static_text_19", //화면 밝기 설정 1
|
|
"common_checkbox07", "static_text_27", //지속효과 표시 2
|
|
"common_checkbox08", "static_text_28", //자신과 크리처 3
|
|
"common_checkbox09", "static_text_29", //파티원 4
|
|
"common_checkbox10", "static_text_30", //타겟 5
|
|
"common_checkbox02", "static_text_10", //글로우 이펙트 6
|
|
//"common_checkbox04", "static_text_17", //물반사 효과 7 // 2011.11.24 - servantes : 옵션 nui에 해당 효과 없음 / 주석처리
|
|
//"common_checkbox04", "", // : 이름 버퍼의 개수를 맞추기 위해 "static_text_17" 를 ""로 변경
|
|
"common_checkbox05", "static_text_24", //나무 투명화 8
|
|
"common_checkbox06", "static_text_26", //무기 강화 효과 9
|
|
"common_checkbox11", "static_text_12", //그림자 표시 10
|
|
"common_radiobutton01", "static_text_25", //자세히 11
|
|
"common_radiobutton02", "static_text_22", //단순히 12
|
|
"common_checkbox12", "static_text_31", //마을 내 최소구조물 표시 13
|
|
"hslider_background_range", "static_text_03", //배경 표시거리 14
|
|
"hslider_char_range", "static_text_05", //캐릭터 표시 거리 15
|
|
"hslider_texture", "static_text_11", //택스처 품질 16
|
|
//"common_checkbox13", "static_text05", //현재 배경음 반복 17 // 2011.11.29 - servantes : 옵션 nui에 해당 효과 없음 / 주석처리
|
|
"check_mute00", "static_text32", //전체음 소거 18
|
|
"check_mute01", "static_text02", //배경음 소거 19
|
|
"check_mute02", "static_text04", //효과음 소거 20
|
|
"check_mute03", "static_text07", //환경음 소거 21
|
|
"hslider_back_sound", "static_text01", //배경음 볼륨 22
|
|
"hslider_effect_sound", "static_text03", //효과음 볼륨 23
|
|
"hslider_environment_sound","static_text06", //환경음 볼륨 24
|
|
"hslider_all_sound", "static_text08", //전체음 볼륨 25
|
|
"static_text_01", "static_text_01", //주사율 26
|
|
"common_checkbox14", "static_text_32", //나무 표시 27
|
|
"common_checkbox15", "static_text_33", //풀 표시 28
|
|
"common_checkbox16", "static_text_34", //이펙트 표시 29
|
|
"common_checkbox17", "static_text_35", //자신과 크리처 30
|
|
"common_checkbox18", "static_text_36", //파티원 31
|
|
"common_checkbox19", "static_text_37", //타겟 32
|
|
"common_checkbox_lightmap", "static_text_lightmap", //라이트멥 33
|
|
};
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
//게임 플레이 옵션 관련
|
|
enum PLAYCONTROL
|
|
{
|
|
PlayerGage, //자신과 파티원
|
|
MonsterGage, //몬스터
|
|
TargetGage, //타겟
|
|
OPlayerName, //플레이어
|
|
CreatureName, //크리처
|
|
MonsterName, //몬스터
|
|
NPCName, //NPC
|
|
PlayerDM, //자신
|
|
CratureDM, //크리처
|
|
PartyDM, //파티원
|
|
WinPosClear, //윈도우 위치 초기화
|
|
ChatBalloon, //말풍선
|
|
Tip, //게임팁
|
|
SimpleStore, //간단상점
|
|
DetailStore, //기본상점
|
|
AvatarStore, //아바타
|
|
CameraCollision, // 카메라 충돌
|
|
MAX
|
|
};
|
|
|
|
//체크컨트롤과 서로 매치되야할 static컨트롤 ?
|
|
const char* c_PlayControl[PLAYCONTROL::MAX][2]
|
|
= { "common_checkbox12", "static_text_26", //자신과 파티원
|
|
"common_checkbox13", "static_text_27", //몬스터
|
|
"common_checkbox14", "static_text_28", //타겟
|
|
"common_checkbox16", "static_text_30", //플레이어
|
|
"common_checkbox17", "static_text_12", //크리처
|
|
"common_checkbox18", "static_text_25", //몬스터
|
|
"common_checkbox19", "static_text_22", //NPC
|
|
"common_checkbox21", "static_text32", //자신
|
|
"common_checkbox22", "static_text01", //크리처
|
|
"common_checkbox23", "static_text03", //파티원
|
|
"button03", "static_text04", //초기화
|
|
"common_checkbox07", "static_text_05", //말풍선
|
|
"common_checkbox08", "static_text_11", //팁
|
|
"common_radiobutton02", "static_text_33", //간단상점
|
|
"common_radiobutton03", "static_text_34", //기본상점
|
|
"common_radiobutton04", "static_text_35", //아바타
|
|
"common_checkbox26", "static_text08", //카메라 충돌
|
|
};
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
///////////////////////////
|
|
// 키맵핑관련
|
|
///////////////////////////
|
|
enum KEYMAPPINGCONTROL
|
|
{
|
|
//이건 gui 순서대로....
|
|
//아마 이게 sgameoption으로 넘어가지 않을까?
|
|
STATIC_MENUKEY = 0, //메뉴키설정
|
|
KM1_CROWSHOP,
|
|
KM1_EQUIP_WND, // 장작창
|
|
KM1_INVENTORY,
|
|
KM1_UPGRADE_WND, // 강화창
|
|
KM1_ITEMCOMBINE_WND, // 조합창
|
|
KM1_REPAIR_WND, // 수리/복원/충전
|
|
KM1_SKILL,
|
|
KM1_CHARACTER,
|
|
KM1_CREATUREFORMATION,
|
|
KM1_CREATURESKILL,
|
|
KM1_CREATUREINFO,
|
|
KM1_MESSENGER,
|
|
KM1_GUILD,
|
|
KM1_PARTY,
|
|
KM1_QUEST,
|
|
KM1_WOLRDMAP,
|
|
KM1_CONTROL,
|
|
KM1_HELP,
|
|
KM1_SYSTEM,
|
|
KM1_OPTION,
|
|
KM1_SLOTUPDOWN,
|
|
KM1_SLOTCHANGE, // 2010.08.17. 무기스왑.
|
|
KM1_DURABILITY, // 2010.08.17. 내구도출력UI.
|
|
KM1_DESTRUCTION, // 2010.09.02. 파괴창.
|
|
KM1_TITLE, // 2012. 6. 7 - marine 호칭창
|
|
KM1_ARENASCORE, // 아레나 스코어
|
|
KM1_PARTYMATCHING_WND,// 파티매칭
|
|
STATIC_KEYMOVMENU,
|
|
KM1_HMOVE_UP,
|
|
KM1_HMOVE_LEFT,
|
|
KM1_HMOVE_RIGHT,
|
|
KM1_HMOVE_DOWN,
|
|
/// 2011.11.23 파티창 - prodongi
|
|
STATIC_PARTYMENU,
|
|
KM1_PARTY_1,
|
|
KM1_PARTY_2,
|
|
KM1_PARTY_3,
|
|
KM1_PARTY_4,
|
|
KM1_PARTY_5,
|
|
KM1_PARTY_6,
|
|
KM1_PARTY_7,
|
|
KM1_PARTY_8,
|
|
|
|
//STATIC_MOUSEMENU, //마우스메뉴
|
|
//KM2_MOVECLICK,
|
|
//KM2_CAMERAMOVE,
|
|
STATIC_TIPMENU, //팁메뉴
|
|
KM3_EXIT,
|
|
KM3_TARGETWINDOW,
|
|
KM3_INTERFACEHIDE,
|
|
KM3_MINIMAPZOOMIN,
|
|
KM3_MINIMAPZOOMOUT,
|
|
KM3_PKMODE,
|
|
KM3_MOVETARGET,
|
|
KM3_PICKUPITEM,
|
|
|
|
//일단 귀찮으니 생략.
|
|
STATIC_SLOT1, //슬롯1
|
|
KM4_01,
|
|
KM4_02,
|
|
KM4_03,
|
|
KM4_04,
|
|
KM4_05,
|
|
KM4_06,
|
|
KM4_07,
|
|
KM4_08,
|
|
KM4_09,
|
|
KM4_10,
|
|
KM4_11,
|
|
KM4_12,
|
|
|
|
STATIC_SLOT2, //슬롯2
|
|
KM5_01,
|
|
KM5_02,
|
|
KM5_03,
|
|
KM5_04,
|
|
KM5_05,
|
|
KM5_06,
|
|
KM5_07,
|
|
KM5_08,
|
|
KM5_09,
|
|
KM5_10,
|
|
KM5_11,
|
|
KM5_12,
|
|
|
|
STATIC_SLOT3, //슬롯3
|
|
KM6_01,
|
|
KM6_02,
|
|
KM6_03,
|
|
KM6_04,
|
|
KM6_05,
|
|
KM6_06,
|
|
KM6_07,
|
|
KM6_08,
|
|
KM6_09,
|
|
KM6_10,
|
|
KM6_11,
|
|
KM6_12,
|
|
|
|
STATIC_SLOT4, //슬롯4
|
|
KM7_01,
|
|
KM7_02,
|
|
KM7_03,
|
|
KM7_04,
|
|
KM7_05,
|
|
KM7_06,
|
|
KM7_07,
|
|
KM7_08,
|
|
KM7_09,
|
|
KM7_10,
|
|
KM7_11,
|
|
KM7_12,
|
|
|
|
STATIC_SLOT5, //슬롯5
|
|
KM8_01,
|
|
KM8_02,
|
|
KM8_03,
|
|
KM8_04,
|
|
KM8_05,
|
|
KM8_06,
|
|
KM8_07,
|
|
KM8_08,
|
|
KM8_09,
|
|
KM8_10,
|
|
KM8_11,
|
|
KM8_12,
|
|
|
|
STATIC_SLOT6, //슬롯6
|
|
KM9_01,
|
|
KM9_02,
|
|
KM9_03,
|
|
KM9_04,
|
|
KM9_05,
|
|
KM9_06,
|
|
KM9_07,
|
|
KM9_08,
|
|
KM9_09,
|
|
KM9_10,
|
|
KM9_11,
|
|
KM9_12,
|
|
|
|
STATIC_SLOT7, //슬롯7
|
|
KM10_01,
|
|
KM10_02,
|
|
KM10_03,
|
|
KM10_04,
|
|
KM10_05,
|
|
KM10_06,
|
|
KM10_07,
|
|
KM10_08,
|
|
KM10_09,
|
|
KM10_10,
|
|
KM10_11,
|
|
KM10_12,
|
|
|
|
STATIC_SLOT8, //슬롯8
|
|
KM11_01,
|
|
KM11_02,
|
|
KM11_03,
|
|
KM11_04,
|
|
KM11_05,
|
|
KM11_06,
|
|
KM11_07,
|
|
KM11_08,
|
|
KM11_09,
|
|
KM11_10,
|
|
KM11_11,
|
|
KM11_12,
|
|
|
|
KEYMAPPINGCONTROLMAX
|
|
};
|
|
|
|
struct KeymappingInfo
|
|
{
|
|
int hotkeycode;
|
|
char *editbuttonid;
|
|
char *outboxid;
|
|
char *undobuttonid;
|
|
int original_y;
|
|
char *text;
|
|
char *tip;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const int nPrevKeyCount = 5; // undo 가능횟수..
|
|
|
|
std::list<KEYEX> PrevKeyList[HOTKEYCODE::MAX];
|
|
|
|
KeymappingInfo KeymappingInfoList[KEYMAPPINGCONTROL::KEYMAPPINGCONTROLMAX]
|
|
= {
|
|
-1,"static_slot_1000","","",-1,"<$6840:메뉴키_설정>","",
|
|
HOTKEYCODE::CROWSHOP,"button_key1001","static_outbox1001","button_undo1001",-1,"<$6860:크루샵>","<$6912:메뉴키의크루샵>",
|
|
HOTKEYCODE::EQUIP_WND, "button_key1002","static_outbox1002","button_undo1002",-1,"장착창","메뉴키의 '장착창",
|
|
HOTKEYCODE::INVENTORY,"button_key1003","static_outbox1003","button_undo1003",-1,"<$6861:인벤토리>","<$6913:인벤>",
|
|
HOTKEYCODE::UPGRADE_WND, "button_key1004","static_outbox1004","button_undo1004",-1,"강화창","메뉴키의 '강화창",
|
|
HOTKEYCODE::ITEMCOMBINE_WND,"button_key1005","static_outbox1005","button_undo1005",-1,"조합창","메뉴키의 '조합창",
|
|
HOTKEYCODE::REPAIR_WND, "button_key1006","static_outbox1006","button_undo1006",-1,"수리/복원/충전","메뉴키의 '수리/복원/충전",
|
|
|
|
HOTKEYCODE::SKILL,"button_key1007","static_outbox1007","button_undo1007",-1,"<$6862:스킬>","<$6914:스킬>",
|
|
HOTKEYCODE::CHARACTER,"button_key1008","static_outbox1008","button_undo1008",-1,"<$6863:캐릭터>","<$6915:캐릭>",
|
|
HOTKEYCODE::CREATUREFORMATION,"button_key1009","static_outbox1009","button_undo1009",-1,"<$6864:크리쳐편성>","<$6916:크리쳐편성>",
|
|
HOTKEYCODE::CREATURESKILL,"button_key1010","static_outbox1010","button_undo1010",-1,"<$6865:크리쳐스킬>","<$6917:크리쳐스킬>",
|
|
HOTKEYCODE::CREATUREINFO,"button_key1011","static_outbox1011","button_undo1011",-1, "<$6866:크리쳐정보>","<$6918:몰라>",
|
|
HOTKEYCODE::MESSENGER,"button_key1012","static_outbox1012","button_undo1012",-1,"<$6867:메신저>","<$6919:몰라>",
|
|
HOTKEYCODE::GUILD,"button_key1013","static_outbox1013","button_undo1013",-1,"<$6868:길드>","<$6920:몰라>",
|
|
HOTKEYCODE::PARTY_FOLD,"button_key1014","static_outbox1014","button_undo1014",-1,"<$9842:파티>","<$6921:몰라>",
|
|
HOTKEYCODE::QUEST,"button_key1015","static_outbox1015","button_undo1015",-1,"<$6869:퀘스트>","<$6922:몰라>",
|
|
HOTKEYCODE::WOLRDMAP,"button_key1016","static_outbox1016","button_undo1016",-1,"<$6870:월드맵>","<$6923:몰라>",
|
|
HOTKEYCODE::CONTROL,"button_key1017","static_outbox1017","button_undo1017",-1,"<$6871:조작>","<$6924:몰라>",
|
|
HOTKEYCODE::HELP,"button_key1018","static_outbox1018","button_undo1018",-1,"<$6872:도움말>","<$6925:몰라>",
|
|
HOTKEYCODE::SYSTEM,"button_key1019","static_outbox1019","button_undo1019",-1,"<$6873:시스템>","<$6926:몰라>",
|
|
HOTKEYCODE::OPTION,"button_key1020","static_outbox1020","button_undo1020",-1,"<$6899:옵션>","<$6927:몰라>",
|
|
HOTKEYCODE::SLOTUPDOWN,"button_key1021","static_outbox1021","button_undo1021",-1,"<$6874:슬롯올리기/내리기>","<$6928:몰라>",
|
|
HOTKEYCODE::SLOTCHANGE,"button_key1023","static_outbox1023","button_undo1023",-1,"무기교체","메뉴키의 '무기교체",
|
|
HOTKEYCODE::DURABILITY,"button_key1024","static_outbox1024","button_undo1024",-1,"내구도출력","메뉴키의 '내구도출력",
|
|
HOTKEYCODE::DESTRUCTION,"button_key1025","static_outbox1025","button_undo1025",-1,"파괴창","메뉴키의 '파괴창",
|
|
HOTKEYCODE::TITLE,"button_key1026","static_outbox1026","button_undo1026",-1,"<$690000014:호칭>","<$690000014:호칭>",
|
|
HOTKEYCODE::ARENASCORE,"button_key1027","static_outbox1027","button_undo1027",-1,"<$2401:아레나 경기 현황 보기>","<$2401:아레나 경기 현황 보기>",
|
|
HOTKEYCODE::PARTYMATCHING_WND, "button_key1028","static_outbox1028","button_undo1028",-1,"파티매칭","메뉴키의 '파티매칭창",// 파티매칭
|
|
-1,"static_slot_13001","","",-1,"<$1165:이동_키_설정>","<$1165:이동_키_설정>",
|
|
HOTKEYCODE::HMOVE_UP,"button_key13001","static_outbox13001","button_undo13001",-1,"전방이동","이동 키의 '전방이동",
|
|
HOTKEYCODE::HMOVE_LEFT,"button_key13002","static_outbox13002","button_undo13002",-1,"좌현이동","이동 키의 '좌현이동",
|
|
HOTKEYCODE::HMOVE_RIGHT,"button_key13003","static_outbox13003","button_undo13003",-1,"우현이동","이동 키의 '우현이동",
|
|
HOTKEYCODE::HMOVE_DOWN,"button_key13004","static_outbox13004","button_undo13004",-1,"후방이동","이동 키의 '후방이동",
|
|
/// 2011.11.23 - prodongi
|
|
-1,"static_slot_12000","","",-1,"<$1213:파티원_선택>","",
|
|
HOTKEYCODE::PARTY_1,"button_key12001","static_outbox12001","button_undo12001",-1,"1번 파티원","<$1214:몰라>",
|
|
HOTKEYCODE::PARTY_2,"button_key12002","static_outbox12002","button_undo12002",-1,"2번 파티원","<$1215:몰라>",
|
|
HOTKEYCODE::PARTY_3,"button_key12003","static_outbox12003","button_undo12003",-1,"3번 파티원","<$1216:몰라>",
|
|
HOTKEYCODE::PARTY_4,"button_key12004","static_outbox12004","button_undo12004",-1,"4번 파티원","<$1217:몰라>",
|
|
HOTKEYCODE::PARTY_5,"button_key12005","static_outbox12005","button_undo12005",-1,"5번 파티원","<$1218:몰라>",
|
|
HOTKEYCODE::PARTY_6,"button_key12006","static_outbox12006","button_undo12006",-1,"6번 파티원","<$1219:몰라>",
|
|
HOTKEYCODE::PARTY_7,"button_key12007","static_outbox12007","button_undo12007",-1,"7번 파티원","<$1220:몰라>",
|
|
HOTKEYCODE::PARTY_8,"button_key12008","static_outbox12008","button_undo12008",-1,"8번 파티원","<$1221:몰라>",
|
|
|
|
//-1,"static_slot_2000","","",-1,"<$6841:마우스_메뉴>",
|
|
//MOVECLICK,"button_key2001","static_outbox2001","button_undo2001",-1,"<$6876:이동클릭>",
|
|
//CAMERAMOVE,"button_key2002","static_outbox2002","button_undo2002",-1,"<$6877:카메라_움직이기>",
|
|
|
|
-1,"static_slot_3000","","",-1,"<$6842:팁_메뉴>","",
|
|
HOTKEYCODE::EXIT,"button_key3001","static_outbox3001","button_undo3001",-1,"<$6900:게임_종료>","<$6930:몰라>",
|
|
HOTKEYCODE::TARGETWINDOW,"button_key3002","static_outbox3002","button_undo3002",-1,"<$6878:타겟창>","<$6931:몰라>",
|
|
HOTKEYCODE::INTERFACEHIDE,"button_key3003","static_outbox3003","button_undo3003",-1,"<$6879:인터페이스_숨기기>","<$6932:몰라>",
|
|
HOTKEYCODE::MINIMAPZOOMIN,"button_key3004","static_outbox3004","button_undo3004",-1,"<$6901:미니맵_확대>","<$6933:몰라>",
|
|
HOTKEYCODE::MINIMAPZOOMOUT,"button_key3005","static_outbox3005","button_undo3005",-1,"<$6902:미니맵_축소>","<$6934:몰라>",
|
|
HOTKEYCODE::PKMODE,"button_key3006","static_outbox3006","button_undo3006",-1,"<$6903:PK_모드켜기/_ 끄기>","<$6935:몰라>",
|
|
HOTKEYCODE::AUTOTARGETING,"button_key3007","static_outbox3007","button_undo3007",-1,"<$6881:타겟이동>","<$6936:몰라>",
|
|
HOTKEYCODE::PICKUPITEM,"button_key3008","static_outbox3008","button_undo3008",-1,"<$6904:아이템_줍기>","<$6937:몰라>",
|
|
|
|
|
|
-1,"static_slot_4000","","",-1,"<$6843:1슬롯_설정>","",
|
|
HOTKEYCODE::SLOT1_01,"button_key4001","static_outbox4001","button_undo4001",-1,"<$6847:1번>","<$6938:몰라>",
|
|
HOTKEYCODE::SLOT1_02,"button_key4002","static_outbox4002","button_undo4002",-1,"<$6848:2번>","<$6939:몰라>",
|
|
HOTKEYCODE::SLOT1_03,"button_key4003","static_outbox4003","button_undo4003",-1,"<$6849:3번>","<$6940:몰라>",
|
|
HOTKEYCODE::SLOT1_04,"button_key4004","static_outbox4004","button_undo4004",-1,"<$6850:4번>","<$6941:몰라>",
|
|
HOTKEYCODE::SLOT1_05,"button_key4005","static_outbox4005","button_undo4005",-1,"<$6851:5번>","<$6942:몰라>",
|
|
HOTKEYCODE::SLOT1_06,"button_key4006","static_outbox4006","button_undo4006",-1,"<$6852:6번>","<$6943:몰라>",
|
|
HOTKEYCODE::SLOT1_07,"button_key4007","static_outbox4007","button_undo4007",-1,"<$6853:7번>","<$6944:몰라>",
|
|
HOTKEYCODE::SLOT1_08,"button_key4008","static_outbox4008","button_undo4008",-1,"<$6854:8번>","<$6945:몰라>",
|
|
HOTKEYCODE::SLOT1_09,"button_key4009","static_outbox4009","button_undo4009",-1,"<$6855:9번>","<$6946:몰라>",
|
|
HOTKEYCODE::SLOT1_10,"button_key4010","static_outbox4010","button_undo4010",-1,"<$6856:10번>","<$6947:몰라>",
|
|
HOTKEYCODE::SLOT1_11,"button_key4011","static_outbox4011","button_undo4011",-1,"<$6857:11번>","<$6948:몰라>",
|
|
HOTKEYCODE::SLOT1_12,"button_key4012","static_outbox4012","button_undo4012",-1,"<$6858:12번>","<$6949:몰라>",
|
|
|
|
-1,"static_slot_5000","","",-1,"<$6844:2슬롯_설정>","",
|
|
HOTKEYCODE::SLOT2_01,"button_key5001","static_outbox5001","button_undo5001",-1,"<$6847:1번>","<$6950:몰라>",
|
|
HOTKEYCODE::SLOT2_02,"button_key5002","static_outbox5002","button_undo5002",-1,"<$6848:2번>","<$6951:몰라>",
|
|
HOTKEYCODE::SLOT2_03,"button_key5003","static_outbox5003","button_undo5003",-1,"<$6849:3번>","<$6952:몰라>",
|
|
HOTKEYCODE::SLOT2_04,"button_key5004","static_outbox5004","button_undo5004",-1,"<$6850:4번>","<$6953:몰라>",
|
|
HOTKEYCODE::SLOT2_05,"button_key5005","static_outbox5005","button_undo5005",-1,"<$6851:5번>","<$6954:몰라>",
|
|
HOTKEYCODE::SLOT2_06,"button_key5006","static_outbox5006","button_undo5006",-1,"<$6852:6번>","<$6955:몰라>",
|
|
HOTKEYCODE::SLOT2_07,"button_key5007","static_outbox5007","button_undo5007",-1,"<$6853:7번>","<$6956:몰라>",
|
|
HOTKEYCODE::SLOT2_08,"button_key5008","static_outbox5008","button_undo5008",-1,"<$6854:8번>","<$6957:몰라>",
|
|
HOTKEYCODE::SLOT2_09,"button_key5009","static_outbox5009","button_undo5009",-1,"<$6855:9번>","<$6958:몰라>",
|
|
HOTKEYCODE::SLOT2_10,"button_key5010","static_outbox5010","button_undo5010",-1,"<$6856:10번>","<$6959:몰라>",
|
|
HOTKEYCODE::SLOT2_11,"button_key5011","static_outbox5011","button_undo5011",-1,"<$6857:11번>","<$6960:몰라>",
|
|
HOTKEYCODE::SLOT2_12,"button_key5012","static_outbox5012","button_undo5012",-1,"<$6858:12번>","<$6961:몰라>",
|
|
|
|
-1,"static_slot_6000","","",-1,"<$6845:3슬롯_설정>","",
|
|
HOTKEYCODE::SLOT3_01,"button_key6001","static_outbox6001","button_undo6001",-1,"<$6847:1번>","<$6962:몰라>",
|
|
HOTKEYCODE::SLOT3_02,"button_key6002","static_outbox6002","button_undo6002",-1,"<$6848:2번>","<$6963:몰라>",
|
|
HOTKEYCODE::SLOT3_03,"button_key6003","static_outbox6003","button_undo6003",-1,"<$6849:3번>","<$6964:몰라>",
|
|
HOTKEYCODE::SLOT3_04,"button_key6004","static_outbox6004","button_undo6004",-1,"<$6850:4번>","<$6965:몰라>",
|
|
HOTKEYCODE::SLOT3_05,"button_key6005","static_outbox6005","button_undo6005",-1,"<$6851:5번>","<$6966:몰라>",
|
|
HOTKEYCODE::SLOT3_06,"button_key6006","static_outbox6006","button_undo6006",-1,"<$6852:6번>","<$6967:몰라>",
|
|
HOTKEYCODE::SLOT3_07,"button_key6007","static_outbox6007","button_undo6007",-1,"<$6853:7번>","<$6968:몰라>",
|
|
HOTKEYCODE::SLOT3_08,"button_key6008","static_outbox6008","button_undo6008",-1,"<$6854:8번>","<$6969:몰라>",
|
|
HOTKEYCODE::SLOT3_09,"button_key6009","static_outbox6009","button_undo6009",-1,"<$6855:9번>","<$6970:몰라>",
|
|
HOTKEYCODE::SLOT3_10,"button_key6010","static_outbox6010","button_undo6010",-1,"<$6856:10번>","<$6971:몰라>",
|
|
HOTKEYCODE::SLOT3_11,"button_key6011","static_outbox6011","button_undo6011",-1,"<$6857:11번>","<$6972:몰라>",
|
|
HOTKEYCODE::SLOT3_12,"button_key6012","static_outbox6012","button_undo6012",-1,"<$6858:12번>","<$6973:몰라>",
|
|
|
|
-1,"static_slot_7000","","",-1,"<$6846:4슬롯_설정>","",
|
|
HOTKEYCODE::SLOT4_01,"button_key7001","static_outbox7001","button_undo7001",-1,"<$6847:1번>","<$6974:몰라>",
|
|
HOTKEYCODE::SLOT4_02,"button_key7002","static_outbox7002","button_undo7002",-1,"<$6848:2번>","<$6975:몰라>",
|
|
HOTKEYCODE::SLOT4_03,"button_key7003","static_outbox7003","button_undo7003",-1,"<$6849:3번>","<$6976:몰라>",
|
|
HOTKEYCODE::SLOT4_04,"button_key7004","static_outbox7004","button_undo7004",-1,"<$6850:4번>","<$6977:몰라>",
|
|
HOTKEYCODE::SLOT4_05,"button_key7005","static_outbox7005","button_undo7005",-1,"<$6851:5번>","<$6978:몰라>",
|
|
HOTKEYCODE::SLOT4_06,"button_key7006","static_outbox7006","button_undo7006",-1,"<$6852:6번>","<$6979:몰라>",
|
|
HOTKEYCODE::SLOT4_07,"button_key7007","static_outbox7007","button_undo7007",-1,"<$6853:7번>","<$6980:몰라>",
|
|
HOTKEYCODE::SLOT4_08,"button_key7008","static_outbox7008","button_undo7008",-1,"<$6854:8번>","<$6981:몰라>",
|
|
HOTKEYCODE::SLOT4_09,"button_key7009","static_outbox7009","button_undo7009",-1,"<$6855:9번>","<$6982:몰라>",
|
|
HOTKEYCODE::SLOT4_10,"button_key7010","static_outbox7010","button_undo7010",-1,"<$6856:10번>","<$6983:몰라>",
|
|
HOTKEYCODE::SLOT4_11,"button_key7011","static_outbox7011","button_undo7011",-1,"<$6857:11번>","<$6984:몰라>",
|
|
HOTKEYCODE::SLOT4_12,"button_key7012","static_outbox7012","button_undo7012",-1,"<$6858:12번>","<$6985:몰라>",
|
|
|
|
-1,"static_slot_8000","","",-1,"<$6766:5슬롯_설정>","",
|
|
HOTKEYCODE::SLOT5_01,"button_key8001","static_outbox8001","button_undo8001",-1,"<$6847:1번>","<$6974:몰라>",
|
|
HOTKEYCODE::SLOT5_02,"button_key8002","static_outbox8002","button_undo8002",-1,"<$6848:2번>","<$6975:몰라>",
|
|
HOTKEYCODE::SLOT5_03,"button_key8003","static_outbox8003","button_undo8003",-1,"<$6849:3번>","<$6976:몰라>",
|
|
HOTKEYCODE::SLOT5_04,"button_key8004","static_outbox8004","button_undo8004",-1,"<$6850:4번>","<$6977:몰라>",
|
|
HOTKEYCODE::SLOT5_05,"button_key8005","static_outbox8005","button_undo8005",-1,"<$6851:5번>","<$6978:몰라>",
|
|
HOTKEYCODE::SLOT5_06,"button_key8006","static_outbox8006","button_undo8006",-1,"<$6852:6번>","<$6979:몰라>",
|
|
HOTKEYCODE::SLOT5_07,"button_key8007","static_outbox8007","button_undo8007",-1,"<$6853:7번>","<$6980:몰라>",
|
|
HOTKEYCODE::SLOT5_08,"button_key8008","static_outbox8008","button_undo8008",-1,"<$6854:8번>","<$6981:몰라>",
|
|
HOTKEYCODE::SLOT5_09,"button_key8009","static_outbox8009","button_undo8009",-1,"<$6855:9번>","<$6982:몰라>",
|
|
HOTKEYCODE::SLOT5_10,"button_key8010","static_outbox8010","button_undo8010",-1,"<$6856:10번>","<$6983:몰라>",
|
|
HOTKEYCODE::SLOT5_11,"button_key8011","static_outbox8011","button_undo8011",-1,"<$6857:11번>","<$6984:몰라>",
|
|
HOTKEYCODE::SLOT5_12,"button_key8012","static_outbox8012","button_undo8012",-1,"<$6858:12번>","<$6985:몰라>",
|
|
|
|
-1,"static_slot_9000","","",-1,"<$6767:6슬롯_설정>","",
|
|
HOTKEYCODE::SLOT6_01,"button_key9001","static_outbox9001","button_undo9001",-1,"<$6847:1번>","<$6974:몰라>",
|
|
HOTKEYCODE::SLOT6_02,"button_key9002","static_outbox9002","button_undo9002",-1,"<$6848:2번>","<$6975:몰라>",
|
|
HOTKEYCODE::SLOT6_03,"button_key9003","static_outbox9003","button_undo9003",-1,"<$6849:3번>","<$6976:몰라>",
|
|
HOTKEYCODE::SLOT6_04,"button_key9004","static_outbox9004","button_undo9004",-1,"<$6850:4번>","<$6977:몰라>",
|
|
HOTKEYCODE::SLOT6_05,"button_key9005","static_outbox9005","button_undo9005",-1,"<$6851:5번>","<$6978:몰라>",
|
|
HOTKEYCODE::SLOT6_06,"button_key9006","static_outbox9006","button_undo9006",-1,"<$6852:6번>","<$6979:몰라>",
|
|
HOTKEYCODE::SLOT6_07,"button_key9007","static_outbox9007","button_undo9007",-1,"<$6853:7번>","<$6980:몰라>",
|
|
HOTKEYCODE::SLOT6_08,"button_key9008","static_outbox9008","button_undo9008",-1,"<$6854:8번>","<$6981:몰라>",
|
|
HOTKEYCODE::SLOT6_09,"button_key9009","static_outbox9009","button_undo9009",-1,"<$6855:9번>","<$6982:몰라>",
|
|
HOTKEYCODE::SLOT6_10,"button_key9010","static_outbox9010","button_undo9010",-1,"<$6856:10번>","<$6983:몰라>",
|
|
HOTKEYCODE::SLOT6_11,"button_key9011","static_outbox9011","button_undo9011",-1,"<$6857:11번>","<$6984:몰라>",
|
|
HOTKEYCODE::SLOT6_12,"button_key9012","static_outbox9012","button_undo9012",-1,"<$6858:12번>","<$6985:몰라>",
|
|
|
|
-1,"static_slot_10000","","",-1,"<$6767:7슬롯_설정>","",
|
|
HOTKEYCODE::SLOT7_01,"button_key10001","static_outbox10001","button_undo10001",-1,"<$6847:1번>","<$6974:몰라>",
|
|
HOTKEYCODE::SLOT7_02,"button_key10002","static_outbox10002","button_undo10002",-1,"<$6848:2번>","<$6975:몰라>",
|
|
HOTKEYCODE::SLOT7_03,"button_key10003","static_outbox10003","button_undo10003",-1,"<$6849:3번>","<$6976:몰라>",
|
|
HOTKEYCODE::SLOT7_04,"button_key10004","static_outbox10004","button_undo10004",-1,"<$6850:4번>","<$6977:몰라>",
|
|
HOTKEYCODE::SLOT7_05,"button_key10005","static_outbox10005","button_undo10005",-1,"<$6851:5번>","<$6978:몰라>",
|
|
HOTKEYCODE::SLOT7_06,"button_key10006","static_outbox10006","button_undo10006",-1,"<$6852:6번>","<$6979:몰라>",
|
|
HOTKEYCODE::SLOT7_07,"button_key10007","static_outbox10007","button_undo10007",-1,"<$6853:7번>","<$6980:몰라>",
|
|
HOTKEYCODE::SLOT7_08,"button_key10008","static_outbox10008","button_undo10008",-1,"<$6854:8번>","<$6981:몰라>",
|
|
HOTKEYCODE::SLOT7_09,"button_key10009","static_outbox10009","button_undo10009",-1,"<$6855:9번>","<$6982:몰라>",
|
|
HOTKEYCODE::SLOT7_10,"button_key10010","static_outbox10010","button_undo10010",-1,"<$6856:10번>","<$6983:몰라>",
|
|
HOTKEYCODE::SLOT7_11,"button_key10011","static_outbox10011","button_undo10011",-1,"<$6857:11번>","<$6984:몰라>",
|
|
HOTKEYCODE::SLOT7_12,"button_key10012","static_outbox10012","button_undo10012",-1,"<$6858:12번>","<$6985:몰라>",
|
|
|
|
-1,"static_slot_11000","","",-1,"<$6869:8슬롯_설정>","",
|
|
HOTKEYCODE::SLOT8_01,"button_key11001","static_outbox11001","button_undo11001",-1,"<$6847:1번>","<$6974:몰라>",
|
|
HOTKEYCODE::SLOT8_02,"button_key11002","static_outbox11002","button_undo11002",-1,"<$6848:2번>","<$6975:몰라>",
|
|
HOTKEYCODE::SLOT8_03,"button_key11003","static_outbox11003","button_undo11003",-1,"<$6849:3번>","<$6976:몰라>",
|
|
HOTKEYCODE::SLOT8_04,"button_key11004","static_outbox11004","button_undo11004",-1,"<$6850:4번>","<$6977:몰라>",
|
|
HOTKEYCODE::SLOT8_05,"button_key11005","static_outbox11005","button_undo11005",-1,"<$6851:5번>","<$6978:몰라>",
|
|
HOTKEYCODE::SLOT8_06,"button_key11006","static_outbox11006","button_undo11006",-1,"<$6852:6번>","<$6979:몰라>",
|
|
HOTKEYCODE::SLOT8_07,"button_key11007","static_outbox11007","button_undo11007",-1,"<$6853:7번>","<$6980:몰라>",
|
|
HOTKEYCODE::SLOT8_08,"button_key11008","static_outbox11008","button_undo11008",-1,"<$6854:8번>","<$6981:몰라>",
|
|
HOTKEYCODE::SLOT8_09,"button_key11009","static_outbox11009","button_undo11009",-1,"<$6855:9번>","<$6982:몰라>",
|
|
HOTKEYCODE::SLOT8_10,"button_key11010","static_outbox11010","button_undo11010",-1,"<$6856:10번>","<$6983:몰라>",
|
|
HOTKEYCODE::SLOT8_11,"button_key11011","static_outbox11011","button_undo11011",-1,"<$6857:11번>","<$6984:몰라>",
|
|
HOTKEYCODE::SLOT8_12,"button_key11012","static_outbox11012","button_undo11012",-1,"<$6858:12번>","<$6985:몰라>",
|
|
};
|
|
|
|
enum TIPLEVEL
|
|
{
|
|
READYINPUT = 0,
|
|
CLICK,
|
|
ROLLOVER,
|
|
};
|
|
};
|
|
|
|
|
|
void SUISystemMainWnd::PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam )
|
|
{
|
|
switch(nMessage)
|
|
{
|
|
case KUI_MESSAGE::KBUTTON_CLICK:
|
|
{
|
|
if( ::_stricmp( lpszControlID, "button_close" ) == 0 )
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSTEM_MAIN ) );
|
|
// 캐릭터 변경
|
|
else if( ::_stricmp( lpszControlID, "button_character_choice" ) == 0 ) //servantes 2010.10.13
|
|
{
|
|
// sonador #2.3.1.39
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSTEM_MAIN ) );
|
|
|
|
SMSG_GAME_OUT* msg = new SMSG_GAME_OUT;
|
|
msg->character_select = true;
|
|
m_pGameManager->PostMsgAtDynamic( msg );
|
|
}
|
|
|
|
// 게임 종료
|
|
else if( ::_stricmp( lpszControlID, "button_game_end" ) == 0 ) //servantes 2010.10.13
|
|
{
|
|
// sonador #2.3.1.39
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSTEM_MAIN ) );
|
|
|
|
SMSG_GAME_OUT* msg = new SMSG_GAME_OUT;
|
|
msg->character_select = false;
|
|
m_pGameManager->PostMsgAtDynamic( msg );
|
|
}
|
|
|
|
// 세부 옵션 설정
|
|
else if( ::_stricmp( lpszControlID, "button_option" ) == 0 ) //servantes 2010.10.13
|
|
{
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSTEM ) );
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSTEM_MAIN ) );
|
|
}
|
|
}
|
|
break;
|
|
case KUI_MESSAGE::KGENWND_MOVE: // 윈도우 이동
|
|
{
|
|
LimitMoveWnd(); // 게임 외부로 나가지 못하게 제한
|
|
|
|
//// 좌측 메뉴도 이동시켜 준다
|
|
//m_pGameManager->PostMsgAtDynamic( new SIMSG_UI_MOVE( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSMENU, GetRect().left, GetRect().top ) );
|
|
}
|
|
break;
|
|
}
|
|
SUIWnd::PumpUpMessage( lpszControlID, nMessage, lparam, wparam );
|
|
}
|
|
|
|
bool SUISystemMainWnd::InitControls( KPoint kPos )
|
|
{
|
|
SetCustomMovingRect( KRect( 0, 0, 600, 20 ) ); // 타이틀 바 선택 영역, 이동위해 클릭 Area
|
|
|
|
return SUIWnd::InitControls(kPos);
|
|
}
|
|
|
|
void SUISystemMainWnd::OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd /*= true*/ )
|
|
{
|
|
if( bOpen )
|
|
m_pGameManager->StartSound( "ui_popup_window01.wav" );
|
|
|
|
SUIWnd::OnNotifyUIWindowOpen( bOpen, bLimitWnd );
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//SUISystemWnd
|
|
|
|
void SUISystemWnd::OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd /*= true*/ )
|
|
{
|
|
if( bOpen )
|
|
m_pGameManager->StartSound( "ui_popup_window01.wav" );
|
|
|
|
SUIWnd::OnNotifyUIWindowOpen( bOpen, bLimitWnd );
|
|
|
|
switch( m_nTabType )
|
|
{
|
|
case TAB_ENVIROMENT: { if( m_pEnvironmentChild ) m_pEnvironmentChild->OnNotifyUIWindowOpen(bOpen, bLimitWnd); } break;
|
|
case TAB_PLAY: { if( m_pPlayChild ) m_pPlayChild->OnNotifyUIWindowOpen(bOpen, bLimitWnd); } break;
|
|
case TAB_KEYMAPPING: { if( m_pKeymappingChild ) m_pKeymappingChild->OnNotifyUIWindowOpen(bOpen, bLimitWnd); } break;
|
|
}
|
|
}
|
|
|
|
SUIWnd* SUISystemWnd::CreateWnd( const char* szFile, KUIWndManager* pWndManager, KPoint kPos, int nWindowID )
|
|
{
|
|
SUIWnd::CreateWnd( szFile, pWndManager, kPos, nWindowID );
|
|
|
|
// 게임 환경 옵션
|
|
SUISystemEnvironmentChild* pEnvironment = new SUISystemEnvironmentChild( m_pGameManager );
|
|
pEnvironment->CreateWnd( "window_system_environment.nui", pWndManager, KPoint(kPos.x, kPos.y+40) );
|
|
//// 플레이 관련 옵션
|
|
SUISystemPlayChild* pPlay = new SUISystemPlayChild( m_pGameManager );
|
|
pPlay->CreateWnd( "window_system_play.nui", pWndManager, KPoint(kPos.x, kPos.y+40) );
|
|
|
|
//// 인터페이스 옵션
|
|
SUISystemKeymappingChild* pKeymapping = new SUISystemKeymappingChild( m_pGameManager,m_pDisplayInfo );
|
|
pKeymapping->SetParent(this);
|
|
pKeymapping->CreateWnd( "window_system_keymapping.nui", pWndManager, KPoint(kPos.x, kPos.y+40) );
|
|
|
|
AddChild(pEnvironment); m_pEnvironmentChild = pEnvironment;
|
|
AddChild(pPlay); m_pPlayChild = pPlay;
|
|
AddChild(pKeymapping); m_pKeymappingChild = pKeymapping;
|
|
|
|
|
|
pEnvironment->SetSystemParent(this);
|
|
|
|
return this;
|
|
}
|
|
|
|
bool SUISystemWnd::InitControls( KPoint kPos )
|
|
{
|
|
SetCustomMovingRect( KRect( 0, 0, 600, 20 ) ); // 타이틀 바 선택 영역, 이동위해 클릭 Area
|
|
|
|
// 탭 만들기
|
|
KUISimpleTabControl* pTabControl = dynamicCast<KUISimpleTabControl*>(GetChild("tab_setup_type"));
|
|
if( pTabControl )
|
|
{
|
|
pTabControl->SetTabProperty( 0, false, 2 );
|
|
pTabControl->AddTabItem( S(3002)/*"<size:10>게임 환경 설정"*/, S(3001)/*"게임 환경 설정 옵션"*/ );
|
|
pTabControl->AddTabItem( S(3003)/*"<size:10>게임 플레이 설정"*/, S(3001)/*"게임 플레이 설정 옵션"*/ );
|
|
pTabControl->AddTabItem( "<$6989:사용자키설정>", "<$6989:사용자키설정>" ); //sfreer 2009.03.05 제거.
|
|
}
|
|
|
|
SetChildShow( "window_system_environment" );
|
|
SetChildShow( "window_system_play" );
|
|
SetChildShow( "window_system_keymapping" );
|
|
|
|
return SUIWnd::InitControls(kPos);
|
|
}
|
|
bool SUISystemWnd::InitData( bool bReload )
|
|
{
|
|
m_nTabType = -1;
|
|
|
|
return SUIWnd::InitData(bReload);
|
|
}
|
|
void SUISystemWnd::PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam )
|
|
{
|
|
switch(nMessage)
|
|
{
|
|
case KUI_MESSAGE::KBUTTON_CLICK:
|
|
{
|
|
if( ::_stricmp( lpszControlID, "button_close" ) == 0 )
|
|
{
|
|
switch( m_nTabType )
|
|
{
|
|
case TAB_ENVIROMENT: { if( m_pEnvironmentChild ) m_pEnvironmentChild->PumpUpMessage(lpszControlID, nMessage, lparam, wparam); } break;
|
|
case TAB_PLAY: { if( m_pPlayChild ) m_pPlayChild->PumpUpMessage(lpszControlID, nMessage, lparam, wparam); } break;
|
|
case TAB_KEYMAPPING: { if( m_pKeymappingChild ) m_pKeymappingChild->PumpUpMessage(lpszControlID, nMessage, lparam, wparam); } break;
|
|
}
|
|
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSTEM ) );
|
|
}
|
|
}
|
|
break;
|
|
case KUI_MESSAGE::KGENWND_MOVE: // 윈도우 이동
|
|
{
|
|
LimitMoveWnd(); // 게임 외부로 나가지 못하게 제한
|
|
}
|
|
break;
|
|
case KUI_MESSAGE::KSCROLL_SELECT: // 스크롤 선택
|
|
break;
|
|
case KUI_MESSAGE::KTAB_SELECT: // 탭 변경
|
|
ShowTabChild((int)lparam);
|
|
m_pGameManager->StartSound( "ui_button_click.wav" );
|
|
break;
|
|
}
|
|
|
|
SUIWnd::PumpUpMessage( lpszControlID, nMessage, lparam, wparam );
|
|
}
|
|
|
|
void SUISystemWnd::ApplyOption()
|
|
{
|
|
switch( m_nTabType )
|
|
{
|
|
case TAB_ENVIROMENT: { if( m_pEnvironmentChild ) m_pEnvironmentChild->ApplyOption(); } break;
|
|
case TAB_PLAY: { if( m_pPlayChild ) m_pPlayChild->ApplyOption(); } break;
|
|
case TAB_KEYMAPPING: { if( m_pKeymappingChild ) m_pKeymappingChild->ApplyOption(); } break;
|
|
}
|
|
}
|
|
|
|
void SUISystemWnd::ApplyCancel()
|
|
{
|
|
switch( m_nTabType )
|
|
{
|
|
case TAB_ENVIROMENT: { if( m_pEnvironmentChild ) m_pEnvironmentChild->ApplyCancel(); } break;
|
|
case TAB_PLAY: { if( m_pPlayChild ) m_pPlayChild->ApplyCancel(); } break;
|
|
case TAB_KEYMAPPING: { if( m_pKeymappingChild ) m_pKeymappingChild->ApplyCancel(); } break;
|
|
}
|
|
}
|
|
|
|
void SUISystemWnd::ProcMsgAtStatic( SGameMessage* pMsg )
|
|
{
|
|
switch( pMsg->nType )
|
|
{
|
|
//case IMSG_UI_OPTION_APPLY :
|
|
// {
|
|
// SIMSG_UI_OPTION_APPLY * pApplyOption = static_cast<SIMSG_UI_OPTION_APPLY *>(pMsg);
|
|
// if( pApplyOption->m_bApply == 0 )
|
|
// ApplyOption();
|
|
// else if( pApplyOption->m_bApply == 1 )
|
|
// ApplyCancel();
|
|
// }
|
|
// break;
|
|
case IMSG_TOGGLE_UIWINDOW:
|
|
case IMSG_SHOW_UIWINDOW:
|
|
{
|
|
ShowTabChild(m_nTabType);
|
|
// if( m_nSysMenuPosX > -99 && m_nSysMenuPosY > -99 ) MovePos(m_nSysMenuPosX, m_nSysMenuPosY);
|
|
|
|
pMsg->bUse = true;
|
|
}
|
|
break;
|
|
case IMSG_UI_MOVE:
|
|
{
|
|
//SIMSG_UI_MOVE* pMoveMsg = ( SIMSG_UI_MOVE* )pMsg;
|
|
|
|
//m_nSysMenuPosX = pMoveMsg->m_nX;
|
|
//m_nSysMenuPosY = pMoveMsg->m_nY;
|
|
|
|
pMsg->bUse = true;
|
|
}
|
|
break;
|
|
case IMSG_UI_FOCUS:
|
|
{
|
|
m_pManager->SetFocus(this);
|
|
pMsg->bUse = true;
|
|
}
|
|
break;
|
|
case IMSG_UI_CONSOLE_RELUST:
|
|
{
|
|
if( m_pEnvironmentChild ) m_pEnvironmentChild->UpdateOption();
|
|
if( m_pPlayChild ) m_pPlayChild->UpdateOption();
|
|
if( m_pKeymappingChild ) m_pKeymappingChild->UpdateOption();
|
|
}
|
|
break;
|
|
case IMSG_UI_BOOTH_OPTION_CHANGE:
|
|
{
|
|
SIMSG_UI_BOOTH_OPTION_CHANGE* pBooth = dynamicCast<SIMSG_UI_BOOTH_OPTION_CHANGE*>(pMsg);
|
|
GetGameOption().SetBoothRendType( pBooth->m_nType );
|
|
SUISystemPlayChild* pWnd = (dynamicCast<SUISystemPlayChild*>(GetChild("window_system_play")));
|
|
if( pWnd ) pWnd->UpdateControl();
|
|
}
|
|
break;
|
|
// 2010.05.20 로그인 할때는 m_nTabType 정보가 세팅이 안되어 있어서 IMSG_HIDE_EQUIP_INFO 일경우에 m_pPlayChild->ProcMsgAtStatic를 호출함 - prodongi
|
|
case IMSG_HIDE_EQUIP_INFO:
|
|
if (m_pPlayChild) m_pPlayChild->ProcMsgAtStatic(pMsg);
|
|
break;
|
|
/// 2012.05.09 - prodongi
|
|
case IMSG_UI_SEND_DATA:
|
|
procMsgData(pMsg);
|
|
break;
|
|
}
|
|
|
|
SUIWnd::ProcMsgAtStatic( pMsg );//
|
|
|
|
switch( m_nTabType )
|
|
{
|
|
case TAB_ENVIROMENT: { if( m_pEnvironmentChild ) m_pEnvironmentChild->ProcMsgAtStatic(pMsg); } break;
|
|
case TAB_PLAY: { if( m_pPlayChild ) m_pPlayChild->ProcMsgAtStatic(pMsg); } break;
|
|
case TAB_KEYMAPPING: { if( m_pKeymappingChild ) m_pKeymappingChild ->ProcMsgAtStatic(pMsg); } break;
|
|
}
|
|
}
|
|
|
|
void SUISystemWnd::ShowTabChild( int nTabType )
|
|
{
|
|
KUISimpleTabControl* pTab = dynamicCast<KUISimpleTabControl*>(GetChild( "tab_setup_type" ));
|
|
if( pTab == NULL ) return;
|
|
|
|
if( m_nTabType == pTab->GetSelectedItem() ) return;
|
|
m_nTabType = pTab->GetSelectedItem();
|
|
|
|
//SetChildShow( "window_system_def" , ( TAB_NORMAL == m_nTabType ) );
|
|
SetChildShow( "window_system_environment", ( TAB_ENVIROMENT == m_nTabType ) );
|
|
SetChildShow( "window_system_play", ( TAB_PLAY == m_nTabType ) );
|
|
SetChildShow( "window_system_keymapping", ( TAB_KEYMAPPING == m_nTabType ) );
|
|
|
|
//
|
|
switch( m_nTabType )
|
|
{
|
|
case TAB_ENVIROMENT: { if( m_pEnvironmentChild ) m_pEnvironmentChild->UpdateOption(); } break;
|
|
case TAB_PLAY: { if( m_pPlayChild ) m_pPlayChild->UpdateOption(); } break;
|
|
case TAB_KEYMAPPING: { if( m_pKeymappingChild ) m_pKeymappingChild ->UpdateOption(); } break;
|
|
}
|
|
}
|
|
|
|
void SUISystemWnd::EnableButton( const char* szChildName, bool bEnable )
|
|
{
|
|
if( NULL == m_pKeymappingChild )
|
|
return;
|
|
|
|
KUIControl* pWndChild = (KUIControl*)m_pKeymappingChild->GetChild( szChildName );
|
|
if( pWndChild )
|
|
bEnable ? pWndChild->Enable() : pWndChild->Disable() ;
|
|
}
|
|
|
|
void SUISystemWnd::procMsgData(SGameMessage* msg)
|
|
{
|
|
msg->bUse = true;
|
|
|
|
SIMSG_UI_SEND_DATA* msgData = dynamicCast<SIMSG_UI_SEND_DATA*>(msg);
|
|
|
|
/// 사용자 키 설정창 열기
|
|
if ("openWithKeyMapping" == msgData->m_strString)
|
|
{
|
|
if (!IsShow())
|
|
{
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSTEM, true) );
|
|
|
|
KUISimpleTabControl* pTab = dynamicCast<KUISimpleTabControl*>(GetChild( "tab_setup_type" ));
|
|
if (pTab)
|
|
{
|
|
pTab->SetSelectedItem(TAB_KEYMAPPING);
|
|
ShowTabChild(m_nTabType);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSTEM, false) );
|
|
}
|
|
}
|
|
}
|
|
|
|
//void SUISystemWnd::ChangeTabChild( int nTabType )
|
|
//{
|
|
// KUISimpleTabControl* pTab = ( KUISimpleTabControl* )GetChild( "tab_setup_type" );
|
|
// if( pTab == NULL ) return;
|
|
//
|
|
// pTab->SetSelectedItem( TAB_ENVIROMENT, true );
|
|
// ShowTabChild( nTabType );
|
|
//}
|
|
//////////////////////////////////////////////////
|
|
//
|
|
// SUISystemNormalChild
|
|
// normal
|
|
//
|
|
/////////////////////////////////////////////////
|
|
|
|
//void SUISystemNormalChild::PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam )
|
|
//{
|
|
// switch(nMessage)
|
|
// {
|
|
// case KUI_MESSAGE::KBUTTON_CLICK:
|
|
// {
|
|
// m_pGameManager->PlaySound( "ui_button_click.wav" );
|
|
//
|
|
// // 캐릭터 변경
|
|
// if( ::_stricmp( lpszControlID, "system_normal_button01" ) == 0 )
|
|
// m_pGameManager->PostMsgAtDynamic( new SIMSG_UI_REQ_RETURN_LOBBY() );
|
|
//
|
|
// // 게임 종료
|
|
// if( ::_stricmp( lpszControlID, "system_normal_button02" ) == 0 )
|
|
// m_pGameManager->ProcMsgAtStatic( &STMSG_REQ_CLOSE( false ) );
|
|
//
|
|
// // 채널 선택
|
|
// else if( ::_stricmp( lpszControlID, "system_normal_button03" ) == 0 )
|
|
// {
|
|
// //if( m_pWnd == NULL ) return;
|
|
// //
|
|
// //m_pWnd->ChangeTabChild(TAB_ENVIROMENT);
|
|
// }
|
|
// }
|
|
// break;
|
|
// }
|
|
// SUIWnd::PumpUpMessage( lpszControlID, nMessage, lparam, wparam );
|
|
//}
|
|
//////////////////////////////////////////////////
|
|
//
|
|
// SUISystemEnvironmentChild
|
|
// graphic
|
|
//
|
|
///////////////////////////////////////////////////
|
|
bool SUISystemEnvironmentChild::InitControls( KPoint kPos )
|
|
{
|
|
KUIControlSlider* pSliderBright = dynamicCast<KUIControlSlider *>(GetChild(c_Control[CONTROL::Bright][0])); //화면밝기 조절
|
|
if( pSliderBright )
|
|
{
|
|
pSliderBright->SetSliderRange( MaxWinAlpha );
|
|
pSliderBright->SetPosition( GetGameOption().GetBright() );
|
|
}
|
|
|
|
KUIControlSlider* pSliderBackGround = dynamicCast<KUIControlSlider *>(GetChild(c_Control[CONTROL::BackGrondDis][0])); //배경 표시 거리
|
|
if( pSliderBackGround ) pSliderBackGround->SetSliderRange( MaxBakGrondDis );
|
|
|
|
KUIControlSlider* pSliderChar = dynamicCast<KUIControlSlider *>(GetChild(c_Control[CONTROL::AvatarDis][0])); //캐릭터 표시 거리
|
|
if( pSliderChar ) pSliderChar->SetSliderRange( MaxCharDis );
|
|
|
|
KUIControlSlider* pSliderTexture = dynamicCast<KUIControlSlider *>(GetChild(c_Control[CONTROL::MipBias][0])); //택스처 품질
|
|
if( pSliderTexture ) pSliderTexture->SetSliderRange( MaxTextureQuality );
|
|
|
|
KUIControlSlider* pSliderBakcSound = dynamicCast<KUIControlSlider *>(GetChild(c_Control[CONTROL::BGM_Volume][0])); //배경음 크기
|
|
if( pSliderBakcSound ) pSliderBakcSound->SetSliderRange( MaxBackSound );
|
|
|
|
KUIControlSlider* pSliderEffectSound = dynamicCast<KUIControlSlider *>(GetChild(c_Control[CONTROL::SFX_Volume][0])); //효과음 크기
|
|
if( pSliderEffectSound ) pSliderEffectSound->SetSliderRange( MaxEffectSound );
|
|
|
|
KUIControlSlider* pSliderEnvSound = dynamicCast<KUIControlSlider *>(GetChild(c_Control[CONTROL::ENVS_Volume][0])); //환경음 크기
|
|
if( pSliderEnvSound ) pSliderEnvSound->SetSliderRange( MaxEnvSound );
|
|
|
|
KUIControlSlider* pSliderMasterSound = dynamicCast<KUIControlSlider *>(GetChild(c_Control[CONTROL::MASTER_Volume][0])); //전체음 크기
|
|
if( pSliderMasterSound ) pSliderMasterSound->SetSliderRange( MaxEnvSound );
|
|
|
|
// { //이펙트 관련은 우선 보류
|
|
// SetControlEnableWithColor(c_Control[CONTROL::RenderTree][0], false, "<#8e8e8e>");
|
|
// SetControlEnableWithColor(c_Control[CONTROL::RenderGrass][0], false, "<#8e8e8e>");
|
|
// }
|
|
|
|
{ //이펙트 관련은 우선 보류
|
|
SetControlEnableWithColor(c_Control[CONTROL::Effect][0], false, "<#8e8e8e>");
|
|
SetControlEnableWithColor(c_Control[CONTROL::EffectPlayer][0], false, "<#8e8e8e>");
|
|
SetControlEnableWithColor(c_Control[CONTROL::EffectParty][0], false, "<#8e8e8e>");
|
|
SetControlEnableWithColor(c_Control[CONTROL::EffectEnemy][0], false, "<#8e8e8e>");
|
|
}
|
|
|
|
InitStaticControlEnableOption();
|
|
InitControlText();
|
|
|
|
return SUIWnd::InitControls(kPos);
|
|
}
|
|
|
|
bool SUISystemEnvironmentChild::InitData( bool bReload )
|
|
{
|
|
const std::vector< DISP_MODE > & disp_list = GetGameOption().GetDispMode();
|
|
|
|
KUIControlCombo * pCombo00_01 = dynamicCast<KUIControlCombo *>(GetChild("combo_00_01")); //그래픽 프리셋트
|
|
if( pCombo00_01 )
|
|
{
|
|
pCombo00_01->SetEnableColor( "<#ffffff>" );
|
|
|
|
for( int i(0); 6>i; i++ )
|
|
pCombo00_01->AddItem( CStringUtil::StringFormat( "%s%s", S(6425), S(6332+i) ).c_str() );
|
|
pCombo00_01->SetCurSel(0);
|
|
}
|
|
|
|
KUIControlCombo * pCombo10_00 = dynamicCast<KUIControlCombo *>(GetChild("combo_10_00")); //해상도
|
|
if( pCombo10_00 )
|
|
{
|
|
pCombo10_00->SetEnableColor( "<#ffffff>" );
|
|
|
|
for( UINT i(0); disp_list.size()>i; i++ )
|
|
{
|
|
pCombo10_00->AddItem( CStringUtil::StringFormat( "%s%dx%d", S(6425), disp_list[i].width, disp_list[i].height ).c_str() );
|
|
}
|
|
|
|
#ifdef _DEV
|
|
// kkr 전체창 test 컬럼 추가
|
|
pCombo10_00->AddItem( CStringUtil::StringFormat( "%s", "전체창_dev" ).c_str() );
|
|
#endif
|
|
|
|
pCombo10_00->SetCurSel(0);
|
|
}
|
|
|
|
KUIControlCombo * pCombo10_01 = dynamicCast<KUIControlCombo *>(GetChild("combo_10_01")); //주사율
|
|
if( pCombo10_01 )
|
|
{
|
|
pCombo10_01->SetEnableColor( "<#ffffff>" );
|
|
|
|
for( UINT i(0); disp_list.size()>i; i++ )
|
|
{
|
|
int nCurIndex = -1;
|
|
for( UINT j(0); disp_list[i].refreshrate_list.size()>j; j++ )
|
|
{
|
|
if( disp_list[i].refreshrate_list[j] == GetGameOption().GetCurrentRefreshRate() )
|
|
nCurIndex = j;
|
|
pCombo10_01->AddItem( CStringUtil::StringFormat( "%s%d Hz", S(6425), disp_list[i].refreshrate_list[j] ).c_str() );
|
|
}
|
|
//현재 인덱스 설정
|
|
if( nCurIndex != -1 )
|
|
pCombo10_01->SetCurSel( nCurIndex );
|
|
break;
|
|
}
|
|
}
|
|
|
|
SetChildShow( "button_def", false );
|
|
UpdateOption();
|
|
|
|
return SUIWnd::InitData(bReload);
|
|
}
|
|
|
|
void SUISystemEnvironmentChild::InitStaticControlEnableOption()
|
|
{
|
|
KUIControlStatic* pControl(NULL);
|
|
for( int i(0); i<CONTROL::MAXCONTROL; ++i )
|
|
{
|
|
// 2011.11.29 - servantes : 유효한 파일 이름인지 길이로 검사
|
|
if( strlen( c_Control[i][1] ) <= 0)
|
|
continue;
|
|
|
|
pControl = dynamicCast<KUIControlStatic *>(GetChild( c_Control[i][1] ));
|
|
if( pControl ) pControl->SetEnableOption( true );
|
|
}
|
|
}
|
|
|
|
void SUISystemEnvironmentChild::InitControlText()
|
|
{
|
|
KUIControlStatic* pControl(NULL);
|
|
for( int i(0); i<CONTROL::MAXCONTROL; ++i )
|
|
{
|
|
m_hsControlText.add( c_Control[i][0], c_Control[i][1] );
|
|
}
|
|
}
|
|
|
|
void SUISystemEnvironmentChild::SetControlEnableWithColor( const char* lpControl, bool bEnable, const char* lpColor )
|
|
{
|
|
std::string strStaticText;
|
|
if( m_hsControlText.lookup( lpControl, strStaticText ) )
|
|
{
|
|
if( !strStaticText.empty() )
|
|
{
|
|
SetControlEnable(lpControl, bEnable);
|
|
|
|
if( bEnable ) SetControlEnableColor(strStaticText.c_str(), lpColor);
|
|
else SetControlDisableColor(strStaticText.c_str(), lpColor);
|
|
SetControlEnable( strStaticText.c_str(), bEnable );
|
|
}
|
|
}
|
|
}
|
|
|
|
void SUISystemEnvironmentChild::CheckControlEnable()
|
|
{
|
|
bool bEnable(false);
|
|
std::string strColor;
|
|
|
|
bool bGraphicOp = true;
|
|
bool bEnableTexture = true;
|
|
bool bEnableLightMap = true;
|
|
bool bReflectionWater = true;
|
|
bool bHighShadow = true;
|
|
bool bGlowEffect = true;
|
|
|
|
bool bMinimumSystem = ENV().IsExist( "minimum_system" );
|
|
if( bMinimumSystem )
|
|
{
|
|
bEnableTexture = false;
|
|
bEnableLightMap = false;
|
|
bReflectionWater = false;
|
|
bHighShadow = false;
|
|
bGraphicOp = false;
|
|
bGlowEffect = false;
|
|
}
|
|
else if( ENV().IsExist( "maximum_system" ) )
|
|
{
|
|
bEnableTexture = false;
|
|
bGraphicOp = false;
|
|
}
|
|
|
|
KUIControlCombo * pCombo = dynamicCast<KUIControlCombo *>(GetChild("combo_00_01"));
|
|
if( pCombo && bGraphicOp == false )
|
|
{
|
|
pCombo->SetCurSel( 0 );
|
|
pCombo->Disable();
|
|
|
|
KUIControl* pStaticCtrl = dynamicCast<KUIControlCombo *>(GetChild("static_text_21"));
|
|
if( pStaticCtrl )
|
|
{
|
|
pStaticCtrl->SetDisableColor( "<#8e8e8e>" );
|
|
pStaticCtrl->Disable();
|
|
}
|
|
}
|
|
|
|
if( bMinimumSystem )
|
|
{
|
|
SetControlEnable( "combo_10_00", false );
|
|
SetControlEnable( "combo_10_01", false );
|
|
|
|
if( GetCheckBoxValue( c_Control[CONTROL::WinBright][0] ) )
|
|
SetControlEnableWithColor(c_Control[CONTROL::Bright][0], false, "<#8e8e8e>"); //화면 밝기 설정
|
|
else
|
|
SetControlEnableWithColor(c_Control[CONTROL::Bright][0], true, "<#fbe6af>"); //화면 밝기 설정
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::StateEffect][0], false, "<#8e8e8e>"); //지속효과 표시
|
|
SetControlEnableWithColor(c_Control[CONTROL::StateEffectPlayer][0], false, "<#8e8e8e>"); //자신과 크리처
|
|
SetControlEnableWithColor(c_Control[CONTROL::StateEffectParty][0], false, "<#8e8e8e>"); //파티원
|
|
SetControlEnableWithColor(c_Control[CONTROL::StateEffectEnemy][0], false, "<#8e8e8e>"); //타겟
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::GlowQual][0], false, "<#8e8e8e>"); //글로우 이펙트
|
|
// SetControlEnableWithColor(c_Control[CONTROL::WaterQual][0], false, "<#8e8e8e>"); //물반사 효과 // 2011.11.29 - servantes : 사용하지 않아 주석 처리
|
|
SetControlEnableWithColor(c_Control[CONTROL::TreeAlpha][0], false, "<#8e8e8e>"); //나무 투명화
|
|
SetControlEnableWithColor(c_Control[CONTROL::Enhance][0], false, "<#8e8e8e>"); //무기 강화 효과
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::Shadow][0], false, "<#8e8e8e>"); //그림자 표시
|
|
SetControlEnableWithColor(c_Control[CONTROL::HeightShadow][0], false, "<#8e8e8e>"); //자세히
|
|
SetControlEnableWithColor(c_Control[CONTROL::LowShadow][0], false, "<#8e8e8e>"); //단순히
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::TownLimit][0], false, "<#8e8e8e>"); //마을 내 최소구조물 표시
|
|
SetControlEnableWithColor(c_Control[CONTROL::LightMap][0], false, "<#8e8e8e>"); //라이트멥
|
|
|
|
//저사양 클라이언트 버전이여도 지형 표시 거리와 캐릭터 표시 거리는 수정 가능하다
|
|
SetControlEnableWithColor(c_Control[CONTROL::BackGrondDis][0], true, "<#fbe6af>"); //배경 표시거리
|
|
SetControlEnableWithColor(c_Control[CONTROL::AvatarDis][0], true, "<#fbe6af>"); //캐릭터 표시 거리
|
|
SetControlEnableWithColor(c_Control[CONTROL::MipBias][0], false, "<#8e8e8e>"); //택스처 품질
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::RenderTree][0], false, "<#8e8e8e>"); //나무 표시
|
|
SetControlEnableWithColor(c_Control[CONTROL::RenderGrass][0], false, "<#8e8e8e>"); //풀 표시
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::Effect][0], false, "<#8e8e8e>"); //이펙트 표시
|
|
SetControlEnableWithColor(c_Control[CONTROL::EffectPlayer][0], false, "<#8e8e8e>"); //자신과 크리처
|
|
SetControlEnableWithColor(c_Control[CONTROL::EffectParty][0], false, "<#8e8e8e>"); //파티원
|
|
SetControlEnableWithColor(c_Control[CONTROL::EffectEnemy][0], false, "<#8e8e8e>"); //타겟
|
|
}
|
|
else if( IsCustomMode() )
|
|
{
|
|
SetControlEnable( "combo_10_00", true );
|
|
SetControlEnable( "combo_10_01", true );
|
|
|
|
if( GetCheckBoxValue( "common_checkbox00" ) )
|
|
{
|
|
bEnable = false;
|
|
strColor = "<#8e8e8e>";
|
|
}
|
|
else
|
|
{
|
|
bEnable = true; strColor = "<#fbe6af>";
|
|
}
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::WinBright][0], bEnable, strColor.c_str()); //바탕화면 밝기 적용
|
|
|
|
if( GetCheckBoxValue( "common_checkbox00" ) || GetCheckBoxValue( c_Control[CONTROL::WinBright][0] ) )
|
|
{
|
|
bEnable = false;
|
|
strColor = "<#8e8e8e>";
|
|
}
|
|
else
|
|
{
|
|
bEnable = true;
|
|
strColor = "<#fbe6af>";
|
|
}
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::Bright][0], bEnable, strColor.c_str()); //화면 밝기 설정
|
|
SetControlEnableWithColor(c_Control[CONTROL::StateEffect][0], true, "<#fbe6af>"); //지속효과 표시
|
|
|
|
if( !GetCheckBoxValue( c_Control[CONTROL::StateEffect][0] ) )
|
|
{
|
|
bEnable = false;
|
|
strColor = "<#8e8e8e>";
|
|
}
|
|
else
|
|
{
|
|
bEnable = true;
|
|
strColor = "<#ffffff>";
|
|
}
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::StateEffectPlayer][0], bEnable, strColor.c_str()); //자신과 크리처
|
|
SetControlEnableWithColor(c_Control[CONTROL::StateEffectParty][0], bEnable, strColor.c_str()); //파티원
|
|
SetControlEnableWithColor(c_Control[CONTROL::StateEffectEnemy][0], bEnable, strColor.c_str()); //타겟
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::GlowQual][0], bGlowEffect, bGlowEffect ? "<#fbe6af>" : "<#8e8e8e>" ); //글로우 이펙트
|
|
// SetControlEnableWithColor(c_Control[CONTROL::WaterQual][0], bReflectionWater, bReflectionWater ? "<#fbe6af>" : "<#8e8e8e>" ); //물반사 효과 // 2011.11.29 - servantes : 사용하지 않아 주석 처리
|
|
SetControlEnableWithColor(c_Control[CONTROL::TreeAlpha][0], true, "<#fbe6af>"); //나무 투명화
|
|
SetControlEnableWithColor(c_Control[CONTROL::Enhance][0], true, "<#fbe6af>"); //무기 강화 효과
|
|
|
|
if( bHighShadow )
|
|
{
|
|
SetControlEnableWithColor(c_Control[CONTROL::Shadow][0], true, "<#fbe6af>" ); //그림자 표시
|
|
if( !GetCheckBoxValue( c_Control[CONTROL::Shadow][0] ) )
|
|
{
|
|
bEnable = false;
|
|
strColor = "<#8e8e8e>";
|
|
}
|
|
else
|
|
{
|
|
bEnable = true;
|
|
strColor = "<#ffffff>";
|
|
}
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::HeightShadow][0], bEnable, strColor.c_str()); //자세히
|
|
SetControlEnableWithColor(c_Control[CONTROL::LowShadow][0], bEnable, strColor.c_str()); //단순히
|
|
}
|
|
else
|
|
{
|
|
SetControlEnableWithColor(c_Control[CONTROL::Shadow][0], false, "<#8e8e8e>" ); //그림자 표시
|
|
SetControlEnableWithColor(c_Control[CONTROL::HeightShadow][0], false, "<#8e8e8e>"); //자세히
|
|
SetControlEnableWithColor(c_Control[CONTROL::LowShadow][0], false, "<#8e8e8e>"); //단순히
|
|
}
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::TownLimit][0], true, "<#fbe6af>"); //마을 내 최소구조물 표시
|
|
SetControlEnableWithColor(c_Control[CONTROL::LightMap][0], bEnableLightMap, bEnableLightMap ? "<#fbe6af>" : "<#8e8e8e>" ); //라이트멥
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::BackGrondDis][0], true, "<#fbe6af>"); //배경 표시거리
|
|
SetControlEnableWithColor(c_Control[CONTROL::AvatarDis][0], true, "<#fbe6af>"); //캐릭터 표시 거리
|
|
SetControlEnableWithColor(c_Control[CONTROL::MipBias][0], bEnableTexture, bEnableTexture ? "<#fbe6af>" : "<#8e8e8e>" ); //택스처 품질
|
|
|
|
|
|
bool bAllMute = GetCheckBoxValue( c_Control[CONTROL::AllMute][0] );
|
|
SetControlEnableWithColor(c_Control[CONTROL::AllMute][0], true, "<#fbe6af>"); //전체음소거
|
|
if( bAllMute )
|
|
{
|
|
bEnable = false;
|
|
strColor = "<#8e8e8e>";
|
|
}
|
|
else
|
|
{
|
|
bEnable = true;
|
|
strColor = "<#fbe6af>";
|
|
}
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::BGM_Mute][0], bEnable, strColor.c_str()); //배경음 소거
|
|
SetControlEnableWithColor(c_Control[CONTROL::SFX_Mute][0], bEnable, strColor.c_str()); //효과음 소거
|
|
SetControlEnableWithColor(c_Control[CONTROL::ENVS_Mute][0], bEnable, strColor.c_str()); //환경음 소거
|
|
SetControlEnableWithColor(c_Control[CONTROL::MASTER_Volume][0], bEnable, strColor.c_str()); //전체음 볼륨
|
|
|
|
bool bBGM_Mute = GetCheckBoxValue( c_Control[CONTROL::BGM_Mute][0] );
|
|
if( bAllMute || bBGM_Mute )
|
|
{
|
|
bEnable = false;
|
|
strColor = "<#8e8e8e>";
|
|
}
|
|
else
|
|
{ bEnable = true;
|
|
strColor = "<#fbe6af>";
|
|
}
|
|
|
|
//SetControlEnableWithColor(c_Control[CONTROL::Repeat][0], bEnable, strColor.c_str()); //현재 배경음 반복 // 2011.11.29 - servantes : 옵션 nui에 해당 효과 없음 / 주석처리
|
|
SetControlEnableWithColor(c_Control[CONTROL::BGM_Volume][0], bEnable, strColor.c_str()); //배경음 볼륨
|
|
|
|
|
|
bool bSFX_Mute = GetCheckBoxValue( c_Control[CONTROL::SFX_Mute][0] );
|
|
if( bAllMute || bSFX_Mute ){
|
|
bEnable = false;
|
|
strColor = "<#8e8e8e>";
|
|
}
|
|
else
|
|
{ bEnable = true;
|
|
strColor = "<#fbe6af>";
|
|
}
|
|
SetControlEnableWithColor(c_Control[CONTROL::SFX_Volume][0], bEnable, strColor.c_str()); //효과음 볼륨
|
|
|
|
bool bENVS_Mute = GetCheckBoxValue( c_Control[CONTROL::ENVS_Mute][0] );
|
|
if( bAllMute || bENVS_Mute ){
|
|
bEnable = false;
|
|
strColor = "<#8e8e8e>";
|
|
}
|
|
else
|
|
{ bEnable = true;
|
|
strColor = "<#fbe6af>";
|
|
}
|
|
SetControlEnableWithColor(c_Control[CONTROL::ENVS_Volume][0], bEnable, strColor.c_str()); //환경음 볼륨
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::RenderTree][0], true, "<#fbe6af>"); //나무 표시
|
|
SetControlEnableWithColor(c_Control[CONTROL::RenderGrass][0], true, "<#fbe6af>"); //풀 표시
|
|
|
|
//이펙트 관련 우선 보류
|
|
//SetControlEnableWithColor(c_Control[CONTROL::Effect][0], true, "<#fbe6af>"); //이펙트 표시
|
|
//if( !GetCheckBoxValue( c_Control[CONTROL::Effect][0] ) )
|
|
//{ bEnable = false; strColor = "<#8e8e8e>"; }
|
|
//else { bEnable = true; strColor = "<#ffffff>"; }
|
|
//SetControlEnableWithColor(c_Control[CONTROL::EffectPlayer][0], bEnable, strColor.c_str()); //자신과 크리처
|
|
//SetControlEnableWithColor(c_Control[CONTROL::EffectParty][0], bEnable, strColor.c_str()); //파티원
|
|
//SetControlEnableWithColor(c_Control[CONTROL::EffectEnemy][0], bEnable, strColor.c_str()); //타겟
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::Effect][0], false, "<#8e8e8e>"); //자신과 크리처
|
|
SetControlEnableWithColor(c_Control[CONTROL::EffectPlayer][0], false, "<#8e8e8e>"); //자신과 크리처
|
|
SetControlEnableWithColor(c_Control[CONTROL::EffectParty][0], false, "<#8e8e8e>"); //파티원
|
|
SetControlEnableWithColor(c_Control[CONTROL::EffectEnemy][0], false, "<#8e8e8e>"); //타겟
|
|
|
|
SetControlEnableWithColor("common_show_player_checkbox", true, "<#fbe6af>"); //다른 플레이어 렌더
|
|
}
|
|
else
|
|
{
|
|
SetControlEnable( "combo_10_00", false );
|
|
SetControlEnable( "combo_10_01", false );
|
|
|
|
if( GetCheckBoxValue( c_Control[CONTROL::WinBright][0] ) )
|
|
SetControlEnableWithColor(c_Control[CONTROL::Bright][0], false, "<#8e8e8e>"); //화면 밝기 설정
|
|
else SetControlEnableWithColor(c_Control[CONTROL::Bright][0], true, "<#fbe6af>"); //화면 밝기 설정
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::StateEffect][0], false, "<#8e8e8e>"); //지속효과 표시
|
|
SetControlEnableWithColor(c_Control[CONTROL::StateEffectPlayer][0], false, "<#8e8e8e>"); //자신과 크리처
|
|
SetControlEnableWithColor(c_Control[CONTROL::StateEffectParty][0], false, "<#8e8e8e>"); //파티원
|
|
SetControlEnableWithColor(c_Control[CONTROL::StateEffectEnemy][0], false, "<#8e8e8e>"); //타겟
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::GlowQual][0], false, "<#8e8e8e>"); //글로우 이펙트
|
|
// SetControlEnableWithColor(c_Control[CONTROL::WaterQual][0], false, "<#8e8e8e>"); //물반사 효과 // 2011.11.29 - servantes : 사용하지 않아 주석 처리
|
|
SetControlEnableWithColor(c_Control[CONTROL::TreeAlpha][0], false, "<#8e8e8e>"); //나무 투명화
|
|
SetControlEnableWithColor(c_Control[CONTROL::Enhance][0], false, "<#8e8e8e>"); //무기 강화 효과
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::Shadow][0], false, "<#8e8e8e>"); //그림자 표시
|
|
SetControlEnableWithColor(c_Control[CONTROL::HeightShadow][0], false, "<#8e8e8e>"); //자세히
|
|
SetControlEnableWithColor(c_Control[CONTROL::LowShadow][0], false, "<#8e8e8e>"); //단순히
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::TownLimit][0], false, "<#8e8e8e>"); //마을 내 최소구조물 표시
|
|
SetControlEnableWithColor(c_Control[CONTROL::LightMap][0], false, "<#8e8e8e>"); //라이트멥
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::BackGrondDis][0], false, "<#8e8e8e>"); //배경 표시거리
|
|
SetControlEnableWithColor(c_Control[CONTROL::AvatarDis][0], false, "<#8e8e8e>"); //캐릭터 표시 거리
|
|
SetControlEnableWithColor(c_Control[CONTROL::MipBias][0], false, "<#8e8e8e>"); //택스처 품질
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::RenderTree][0], false, "<#8e8e8e>"); //나무 표시
|
|
SetControlEnableWithColor(c_Control[CONTROL::RenderGrass][0], false, "<#8e8e8e>"); //풀 표시
|
|
|
|
SetControlEnableWithColor(c_Control[CONTROL::Effect][0], false, "<#8e8e8e>"); //이펙트 표시
|
|
SetControlEnableWithColor(c_Control[CONTROL::EffectPlayer][0], false, "<#8e8e8e>"); //자신과 크리처
|
|
SetControlEnableWithColor(c_Control[CONTROL::EffectParty][0], false, "<#8e8e8e>"); //파티원
|
|
SetControlEnableWithColor(c_Control[CONTROL::EffectEnemy][0], false, "<#8e8e8e>"); //타겟
|
|
}
|
|
}
|
|
|
|
void SUISystemEnvironmentChild::PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam )
|
|
{
|
|
switch(nMessage)
|
|
{
|
|
case KUI_MESSAGE::SLIDER_SELECT:
|
|
{
|
|
m_pGameManager->StartSound( "ui_button_click.wav" ); //그외
|
|
|
|
if( ::_stricmp( lpszControlID, c_Control[CONTROL::Bright][0] ) == 0 ) //화면 밝기 설정
|
|
{
|
|
m_optData.nBright = (int)lparam;
|
|
_oprint( "Bright : %d\n", m_optData.nBright );
|
|
}
|
|
else if( ::_stricmp( lpszControlID, c_Control[CONTROL::BackGrondDis][0] ) == 0 ) //배경 표시거리
|
|
{
|
|
if( !IsCustomMode() )
|
|
{
|
|
if( ENV().IsExist( "minimum_system" ) == false )
|
|
return;
|
|
}
|
|
|
|
m_optData.nBackGrondDis = (int)lparam;
|
|
_oprint( "BackGroundDis : %d\n", m_optData.nBackGrondDis );
|
|
|
|
m_optData.nTerrainDis = LandDis[ m_optData.nBackGrondDis ]; //지면
|
|
_oprint( "TerrainDis : %d\n", m_optData.nTerrainDis );
|
|
|
|
m_optData.nPropDis = PropDis[ m_optData.nBackGrondDis ]; //구조물
|
|
_oprint( "PropDis : %d\n", m_optData.nPropDis );
|
|
|
|
m_optData.nSpeedDis = TreeDis[ m_optData.nBackGrondDis ]; //나무
|
|
_oprint( "SpeedDis : %d\n", m_optData.nSpeedDis );
|
|
|
|
m_optData.nGrassDis = GraseDis[ m_optData.nBackGrondDis ]; //풀
|
|
_oprint( "GrassDis : %d\n", m_optData.nGrassDis );
|
|
|
|
m_optData.nSpeedQual = TreeQuality[ m_optData.nBackGrondDis ]; //나무 품질
|
|
_oprint( "SpeedQual : %d\n", m_optData.nSpeedQual );
|
|
}
|
|
else if( ::_stricmp( lpszControlID, c_Control[CONTROL::AvatarDis][0] ) == 0 ) //캐릭터 표시거리
|
|
{
|
|
if( !IsCustomMode() )
|
|
{
|
|
if( ENV().IsExist( "minimum_system" ) == false )
|
|
return;
|
|
}
|
|
|
|
m_optData.nAvatarDis = (int)lparam;
|
|
_oprint( "AvatarDis : %d\n", m_optData.nAvatarDis );
|
|
|
|
m_optData.nShadowDis = (int)lparam;
|
|
_oprint( "ShadowDis : %d\n", m_optData.nShadowDis );
|
|
}
|
|
else if( ::_stricmp( lpszControlID, c_Control[CONTROL::MipBias][0] ) == 0 ) //택스처 품질
|
|
{
|
|
if( !IsCustomMode() ) return;
|
|
|
|
m_optData.nMipBias = (int)lparam;
|
|
_oprint( "MipBias : %d\n", m_optData.nMipBias );
|
|
|
|
m_optData.nFaceAni = (int)lparam; //눈깜박임
|
|
|
|
m_optData.nSelfShadowQual = SlfeShadowQuality[ m_optData.nMipBias ];
|
|
_oprint( "SelfShadowQual : %d\n", m_optData.nSelfShadowQual );
|
|
|
|
m_optData.nResourceQual = RscQuality[ m_optData.nMipBias ];
|
|
}
|
|
else if( ::_stricmp( lpszControlID, c_Control[CONTROL::BGM_Volume][0] ) == 0 ) //배경 볼륨
|
|
{
|
|
// m_pGameManager->PlaySound( "ui_button_click.wav" );
|
|
|
|
m_optData.nBGM_Volume = (int)lparam;
|
|
_oprint( "BGM : %d\n", m_optData.nBGM_Volume );
|
|
}
|
|
else if( ::_stricmp( lpszControlID, c_Control[CONTROL::SFX_Volume][0] ) == 0 ) //효과 볼륨
|
|
{
|
|
// m_pGameManager->PlaySound( "ui_button_click.wav" );
|
|
|
|
m_optData.nSFX_Volume = (int)lparam;
|
|
_oprint( "SFX : %d\n", m_optData.nSFX_Volume );
|
|
}
|
|
else if( ::_stricmp( lpszControlID, c_Control[CONTROL::ENVS_Volume][0] ) == 0 ) //효과 볼륨
|
|
{
|
|
// m_pGameManager->PlaySound( "ui_button_click.wav" );
|
|
|
|
m_optData.nENVS_Volume = (int)lparam;
|
|
_oprint( "SFX : %d\n", m_optData.nENVS_Volume );
|
|
}
|
|
else if( ::_stricmp( lpszControlID, c_Control[CONTROL::MASTER_Volume][0] ) == 0 ) //전체 볼륨
|
|
{
|
|
// m_pGameManager->PlaySound( "ui_button_click.wav" );
|
|
|
|
m_optData.nMASTER_Volume = (int)lparam;
|
|
_oprint( "SFX : %d\n", m_optData.nMASTER_Volume );
|
|
}
|
|
break;
|
|
}
|
|
case KUI_MESSAGE::KCOMBO_SELECT:
|
|
{
|
|
m_pGameManager->StartSound( "ui_button_click.wav" );
|
|
|
|
if( ::_stricmp( lpszControlID, "combo_00_01" ) == 0 ) //프리셋 모드
|
|
{
|
|
if( m_optData.nPresetOption == (int)lparam ) return;
|
|
|
|
m_optData.nPresetOption = (int)lparam;
|
|
|
|
_oprint( "PresetOption : %d\n", m_optData.nPresetOption );
|
|
|
|
GetGameOption().GetPresetOptData( m_optData.nPresetOption, m_optData );
|
|
//UI 갱신
|
|
UpdateControl( m_optData );
|
|
|
|
//UI On/Off
|
|
CheckControlEnable();
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "combo_10_00" ) == 0 ) //해상도 변경
|
|
{
|
|
if( !IsCustomMode() ) return;
|
|
|
|
int nIndex = (int)lparam;
|
|
|
|
const std::vector< DISP_MODE > & disp_list = GetGameOption().GetDispMode();
|
|
|
|
if( nIndex >= 0 && nIndex < disp_list.size() )
|
|
{
|
|
m_optData.nResolution_OldWidth = m_optData.nResolution_Width; // servantes 2010.11.29
|
|
m_optData.nResolution_OldHeight = m_optData.nResolution_Height; // save old resolution
|
|
|
|
m_optData.nResolution_Width = disp_list[nIndex].width;
|
|
m_optData.nResolution_Height = disp_list[nIndex].height;
|
|
|
|
m_optData.nFullWinMode = 0;
|
|
GetGameOption().SetFullWinMode( 0 );
|
|
((K3DRenderDeviceDX*) KDeviceManagerDX::GetDeviceManager()->GetRenderDevice())->SetFullWinMode( false );
|
|
}
|
|
#ifdef _DEV
|
|
//kkr 전체창 테스트
|
|
else if( nIndex == 11 )
|
|
{
|
|
m_optData.nResolution_OldWidth = m_optData.nResolution_Width;
|
|
m_optData.nResolution_OldHeight = m_optData.nResolution_Height;
|
|
|
|
int cx = GetSystemMetrics(SM_CXSCREEN);
|
|
int cy = GetSystemMetrics(SM_CYSCREEN);
|
|
|
|
m_optData.nResolution_Width = cx;
|
|
m_optData.nResolution_Height = cy;
|
|
|
|
m_optData.nFullWinMode = 1;
|
|
GetGameOption().SetFullWinMode( 1 );
|
|
((K3DRenderDeviceDX*) KDeviceManagerDX::GetDeviceManager()->GetRenderDevice())->SetFullWinMode( true );
|
|
}
|
|
#endif
|
|
else
|
|
{
|
|
assert(0);
|
|
return;
|
|
}
|
|
|
|
// 2010.07.12 720 해상도 경고 - prodongi
|
|
if (720 == m_optData.nResolution_Height)
|
|
{
|
|
m_pGameManager->InterfaceMsg(&SIMSG_REQ_OPEN_MSGBOX(SIMSG_REQ_OPEN_MSGBOX::MSGBOX_GENERAL, S(729)));
|
|
}
|
|
|
|
_oprint( "Resolution : %dx%d\n", m_optData.nResolution_Width, m_optData.nResolution_Height );
|
|
|
|
//해상도 맞는 주사율 갱신
|
|
KUIControlCombo * pCombo10_01 = dynamicCast<KUIControlCombo *>(GetChild("combo_10_01")); //주사율
|
|
if( pCombo10_01 )
|
|
{
|
|
pCombo10_01->ClearItem(); //데이타 삭제
|
|
{
|
|
int nCurIndex = -1;
|
|
for( UINT j(0); disp_list[nIndex].refreshrate_list.size()>j; j++ )
|
|
{
|
|
if( disp_list[nIndex].refreshrate_list[j] == GetGameOption().GetCurrentRefreshRate() )
|
|
nCurIndex = j;
|
|
pCombo10_01->AddItem( CStringUtil::StringFormat( "%d Hz", disp_list[nIndex].refreshrate_list[j] ).c_str() );
|
|
}
|
|
//현재 인덱스 설정
|
|
if( nCurIndex != -1 )
|
|
pCombo10_01->SetCurSel( nCurIndex );
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "combo_10_01" ) == 0 ) //주사율 변경
|
|
{
|
|
if( !IsCustomMode() ) return;
|
|
|
|
m_optData.nRefreshRate = (int)lparam;
|
|
_oprint( "RefreshRate : %d\n", m_optData.nRefreshRate );
|
|
}
|
|
}
|
|
break;
|
|
case KUI_MESSAGE::KBUTTON_CLICK:
|
|
{
|
|
m_pGameManager->StartSound( "ui_button_click.wav" );
|
|
|
|
if( ::_stricmp( lpszControlID, "button_def" ) == 0 )
|
|
{
|
|
//초기값으로
|
|
UpdateDef();
|
|
}
|
|
if( ::_stricmp( lpszControlID, "button_apply" ) == 0 )
|
|
{
|
|
//MSG 박스 OK -> 적용, Cancel -> 취소
|
|
ApplyOption();
|
|
// m_pGameManager->ProcMsgAtStatic( &SIMSG_REQ_OPEN_MSGBOX( SIMSG_REQ_OPEN_MSGBOX::MSGBOX_OPTION_APPLY, c_szOPTION_APPLY ) );
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "button_ok" ) == 0 )
|
|
{
|
|
ApplyOption();
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSTEM, false ) );
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "button_cancel" ) == 0 )
|
|
{
|
|
ApplyCancel();
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSTEM, false ) );
|
|
}
|
|
}
|
|
break;
|
|
case KUI_MESSAGE::KCHECK_CHANGE:
|
|
{
|
|
m_pGameManager->StartSound( "ui_button_click.wav" ); //그외
|
|
|
|
if( ::_stricmp( "common_checkbox00", lpszControlID ) == 0 )
|
|
{ //창모드
|
|
m_optData.nWinMode = GetCheckBoxValue( lpszControlID );
|
|
|
|
//주사율 변경 금지
|
|
std::string strColor;
|
|
if( m_optData.nWinMode ) strColor = "<#8e8e8e>";
|
|
else strColor = "<#fbe6af>";
|
|
SetControlEnableWithColor(c_Control[CONTROL::Refreshrate][0], !m_optData.nWinMode, strColor.c_str()); //주사율
|
|
SetControlEnable( "combo_10_01", !m_optData.nWinMode ); //주사율 콤보
|
|
SetControlEnableWithColor(c_Control[CONTROL::WinBright][0], !m_optData.nWinMode, strColor.c_str()); //바탕화면 밝기 적용
|
|
SetControlEnableWithColor(c_Control[CONTROL::Bright][0], !m_optData.nWinMode, strColor.c_str()); //화면 밝기 설정
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::WinBright][0], lpszControlID ) == 0 )
|
|
{ //바탕화면 밝기 적용
|
|
m_optData.nWinBright = GetCheckBoxValue( lpszControlID );
|
|
|
|
std::string strColor;
|
|
if( m_optData.nWinBright ) strColor = "<#8e8e8e>";
|
|
else strColor = "<#fbe6af>";
|
|
SetControlEnableWithColor(c_Control[CONTROL::Bright][0], !m_optData.nWinBright, strColor.c_str()); //화면 밝기 설정
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::GlowQual][0], lpszControlID ) == 0 )
|
|
{ //글로우 이펙트
|
|
if( !IsCustomMode() ) return;
|
|
m_optData.nGlowQual = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
//else if( ::_stricmp( c_Control[CONTROL::Specular][0], lpszControlID ) == 0 )
|
|
// else if( ::_stricmp( c_Control[CONTROL::WaterQual][0], lpszControlID ) == 0 )
|
|
// { //물반사 효과
|
|
// if( !IsCustomMode() ) return;
|
|
// m_optData.nWaterQual = GetCheckBoxValue( lpszControlID );
|
|
// }
|
|
else if( ::_stricmp( c_Control[CONTROL::TreeAlpha][0], lpszControlID ) == 0 )
|
|
{ //나무 투명화
|
|
m_optData.nTreeAlpha = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::Enhance][0], lpszControlID ) == 0 )
|
|
{ //무기 강화 효과
|
|
if( !IsCustomMode() ) return;
|
|
m_optData.nEnhance = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::StateEffect][0], lpszControlID ) == 0 )
|
|
{ //지속효과표시
|
|
if( !IsCustomMode() ) return;
|
|
m_optData.nStateEffect = GetCheckBoxValue( lpszControlID );
|
|
|
|
std::string strColor;
|
|
if( m_optData.nStateEffect ) strColor = "<#ffffff>";
|
|
else strColor = "<#8e8e8e>";
|
|
SetControlEnableWithColor(c_Control[CONTROL::StateEffectPlayer][0], m_optData.nStateEffect, strColor.c_str()); //자신과 크리처
|
|
SetControlEnableWithColor(c_Control[CONTROL::StateEffectParty][0], m_optData.nStateEffect, strColor.c_str()); //파티원
|
|
SetControlEnableWithColor(c_Control[CONTROL::StateEffectEnemy][0], m_optData.nStateEffect, strColor.c_str()); //타겟
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::StateEffectPlayer][0], lpszControlID ) == 0 )
|
|
{ //지속효과 -> 자신과 크리처
|
|
if( !IsCustomMode() ) return;
|
|
m_optData.nStateEffectPlayer = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::StateEffectParty][0], lpszControlID ) == 0 )
|
|
{ //지속효과 -> 파티원
|
|
if( !IsCustomMode() ) return;
|
|
m_optData.nStateEffectParty = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::StateEffectEnemy][0], lpszControlID ) == 0 )
|
|
{ //지속효과 -> 타겟
|
|
if( !IsCustomMode() ) return;
|
|
m_optData.nStateEffectEnemy = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::Shadow][0], lpszControlID ) == 0 )
|
|
{ //그림자 표시
|
|
if( !IsCustomMode() ) return;
|
|
m_optData.nShadow = GetCheckBoxValue( lpszControlID );
|
|
|
|
std::string strColor;
|
|
if( m_optData.nShadow ) strColor = "<#ffffff>";
|
|
else strColor = "<#8e8e8e>";
|
|
SetControlEnableWithColor(c_Control[CONTROL::HeightShadow][0], m_optData.nShadow, strColor.c_str()); //자세히
|
|
SetControlEnableWithColor(c_Control[CONTROL::LowShadow][0], m_optData.nShadow, strColor.c_str()); //단순히
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::TownLimit][0], lpszControlID ) == 0 )
|
|
{ //마을내 최소 구조물
|
|
if( !IsCustomMode() ) return;
|
|
m_optData.nTownLimit = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
// 2011.11.29 - servantes : 옵션 nui에 해당 효과 없음 / 주석처리
|
|
//else if( ::_stricmp( c_Control[CONTROL::Repeat][0], lpszControlID ) == 0 )
|
|
//{ //현재 배경음 반복
|
|
// m_optData.nRepeat = GetCheckBoxValue( lpszControlID );
|
|
//}
|
|
else if( ::_stricmp( c_Control[CONTROL::AllMute][0], lpszControlID ) == 0 )
|
|
{ //전체음소거
|
|
m_optData.nAllMute = GetCheckBoxValue( lpszControlID );
|
|
|
|
std::string strColor;
|
|
if( m_optData.nAllMute ) strColor = "<#8e8e8e>";
|
|
else strColor = "<#fbe6af>";
|
|
//SetControlEnableWithColor( c_Control[CONTROL::Repeat][0], !m_optData.nAllMute, strColor.c_str()); //현재 배경음 반복 // 2011.11.29 - servantes : 옵션 nui에 해당 효과 없음 / 주석처리
|
|
SetControlEnableWithColor( c_Control[CONTROL::BGM_Mute][0], !m_optData.nAllMute, strColor.c_str()); //배경음 소거
|
|
SetControlEnableWithColor( c_Control[CONTROL::SFX_Mute][0], !m_optData.nAllMute, strColor.c_str()); //효과음 소거
|
|
SetControlEnableWithColor( c_Control[CONTROL::ENVS_Mute][0], !m_optData.nAllMute, strColor.c_str()); //환경음 소거
|
|
|
|
SetControlEnableWithColor( c_Control[CONTROL::BGM_Volume][0], !m_optData.nAllMute, strColor.c_str()); //배경음 볼륨
|
|
SetControlEnableWithColor( c_Control[CONTROL::SFX_Volume][0], !m_optData.nAllMute, strColor.c_str()); //효과음 볼륨
|
|
SetControlEnableWithColor( c_Control[CONTROL::ENVS_Volume][0], !m_optData.nAllMute, strColor.c_str()); //환경음 볼륨
|
|
SetControlEnableWithColor( c_Control[CONTROL::MASTER_Volume][0],!m_optData.nAllMute, strColor.c_str()); //전체음 볼륨
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::BGM_Mute][0], lpszControlID ) == 0 )
|
|
{ //배경음 소거
|
|
m_optData.nBGM_Mute = GetCheckBoxValue( lpszControlID );
|
|
|
|
std::string strColor;
|
|
if( m_optData.nBGM_Mute ) strColor = "<#8e8e8e>";
|
|
else strColor = "<#fbe6af>";
|
|
SetControlEnableWithColor( c_Control[CONTROL::BGM_Volume][0], !m_optData.nBGM_Mute, strColor.c_str()); //배경음 볼륨
|
|
// SetControlEnableWithColor( c_Control[CONTROL::Repeat][0], !m_optData.nBGM_Mute, strColor.c_str()); //현재 배경음 반복 // 2011.11.29 - servantes : 옵션 nui에 해당 효과 없음 / 주석처리
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::SFX_Mute][0], lpszControlID ) == 0 )
|
|
{ //효과음 소거
|
|
m_optData.nSFX_Mute = GetCheckBoxValue( lpszControlID );
|
|
|
|
std::string strColor;
|
|
if( m_optData.nSFX_Mute ) strColor = "<#8e8e8e>";
|
|
else strColor = "<#fbe6af>";
|
|
SetControlEnableWithColor( c_Control[CONTROL::SFX_Volume][0], !m_optData.nSFX_Mute, strColor.c_str()); //효과음 볼륨
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::ENVS_Mute][0], lpszControlID ) == 0 )
|
|
{ //환경음 소거
|
|
m_optData.nENVS_Mute = GetCheckBoxValue( lpszControlID );
|
|
|
|
std::string strColor;
|
|
if( m_optData.nENVS_Mute ) strColor = "<#8e8e8e>";
|
|
else strColor = "<#fbe6af>";
|
|
SetControlEnableWithColor( c_Control[CONTROL::ENVS_Volume][0], !m_optData.nENVS_Mute, strColor.c_str()); //효과음 볼륨
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::HeightShadow][0], lpszControlID ) == 0 )
|
|
{ //그림자 효과 자세히
|
|
if( !IsCustomMode() ) return;
|
|
SetCheckBox(c_Control[CONTROL::HeightShadow][0], true);
|
|
SetCheckBox(c_Control[CONTROL::LowShadow][0], false);
|
|
m_optData.nLowShadow = false;
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::LowShadow][0], lpszControlID ) == 0 )
|
|
{ //그림자 효과 단순히
|
|
if( !IsCustomMode() ) return;
|
|
SetCheckBox(c_Control[CONTROL::HeightShadow][0], false);
|
|
SetCheckBox(c_Control[CONTROL::LowShadow][0], true);
|
|
m_optData.nLowShadow = true;
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::RenderTree][0], lpszControlID ) == 0 )
|
|
{ //나무 표시
|
|
if( !IsCustomMode() ) return;
|
|
m_optData.nRenderTree = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::RenderGrass][0], lpszControlID ) == 0 )
|
|
{ //풀 표시
|
|
if( !IsCustomMode() ) return;
|
|
m_optData.nRenderGrass = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::LightMap][0], lpszControlID ) == 0 )
|
|
{ //라이트멥
|
|
if( !IsCustomMode() ) return;
|
|
m_optData.nLightMap = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::Effect][0], lpszControlID ) == 0 )
|
|
{ //이펙트표시
|
|
if( !IsCustomMode() ) return;
|
|
m_optData.nEffect = GetCheckBoxValue( lpszControlID );
|
|
|
|
std::string strColor;
|
|
if( m_optData.nEffect ) strColor = "<#ffffff>";
|
|
else strColor = "<#8e8e8e>";
|
|
SetControlEnableWithColor(c_Control[CONTROL::EffectPlayer][0], m_optData.nEffect, strColor.c_str()); //자신과 크리처
|
|
SetControlEnableWithColor(c_Control[CONTROL::EffectParty][0], m_optData.nEffect, strColor.c_str()); //파티원
|
|
SetControlEnableWithColor(c_Control[CONTROL::EffectEnemy][0], m_optData.nEffect, strColor.c_str()); //타겟
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::EffectPlayer][0], lpszControlID ) == 0 )
|
|
{ //이펙트표시 -> 자신과 크리처
|
|
if( !IsCustomMode() ) return;
|
|
m_optData.nEffectPlayer = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::EffectParty][0], lpszControlID ) == 0 )
|
|
{ //이펙트표시 -> 파티원
|
|
if( !IsCustomMode() ) return;
|
|
m_optData.nEffectParty = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_Control[CONTROL::EffectEnemy][0], lpszControlID ) == 0 )
|
|
{ //이펙트표시 -> 타겟
|
|
if( !IsCustomMode() ) return;
|
|
m_optData.nEffectEnemy = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( "common_show_player_checkbox", lpszControlID ) == 0 )
|
|
{
|
|
m_optData.nRenderOtherPlayer = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
SUIWnd::PumpUpMessage( lpszControlID, nMessage, lparam, wparam );
|
|
}
|
|
|
|
int SUISystemEnvironmentChild::GetCheckBoxValue( const char * pControlName )
|
|
{
|
|
KUIControlCheck* pCheck = dynamicCast<KUIControlCheck*>( GetChild(pControlName) );
|
|
if( pCheck )
|
|
{
|
|
bool bFlag = pCheck->GetCheck();
|
|
return bFlag ? 1 : 0;
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
void SUISystemEnvironmentChild::SetControlEnable( const char * pControlName, bool bEnable )
|
|
{
|
|
KUIControl * pControl = dynamicCast<KUIControl *>(GetChild(pControlName));
|
|
if( pControl )
|
|
{
|
|
if( bEnable )
|
|
pControl->Enable();
|
|
else
|
|
pControl->Disable();
|
|
}
|
|
}
|
|
|
|
void SUISystemEnvironmentChild::SetControlEnableColor( const char * pControlName, const char* lpColor )
|
|
{
|
|
KUIControl * pControl = dynamicCast<KUIControl *>(GetChild(pControlName));
|
|
if( pControl )
|
|
{
|
|
pControl->SetEnableColor(lpColor);
|
|
}
|
|
}
|
|
|
|
void SUISystemEnvironmentChild::SetControlDisableColor( const char * pControlName, const char* lpColor )
|
|
{
|
|
KUIControl * pControl = dynamicCast<KUIControl *>(GetChild(pControlName));
|
|
if( pControl )
|
|
{
|
|
pControl->SetDisableColor(lpColor);
|
|
}
|
|
}
|
|
|
|
void SUISystemEnvironmentChild::SetComboBox( const char * pControlName, int nValue )
|
|
{
|
|
KUIControlCombo * pCombo = dynamicCast<KUIControlCombo *>(GetChild(pControlName));
|
|
if( pCombo )
|
|
{
|
|
pCombo->SetCurSel( nValue );
|
|
}
|
|
}
|
|
|
|
void SUISystemEnvironmentChild::SetCheckBox( const char * pControlName, int nValue )
|
|
{
|
|
KUIControlCheck* pCheck = dynamicCast<KUIControlCheck*>( GetChild(pControlName) );
|
|
if( pCheck ) pCheck->SetCheck( nValue > 0 ? true : false );
|
|
}
|
|
|
|
void SUISystemEnvironmentChild::SetSlider( const char * pControlName, int nValue )
|
|
{
|
|
KUIControlSlider* pSlider = dynamicCast<KUIControlSlider*>( GetChild(pControlName) );
|
|
if( pSlider ) pSlider->SetPosition(nValue);
|
|
}
|
|
|
|
// 취소
|
|
void SUISystemEnvironmentChild::UpdateOption()
|
|
{
|
|
m_optData = GetGameOption().GetOptData();
|
|
|
|
UpdateControl( m_optData );
|
|
|
|
CheckControlEnable();
|
|
}
|
|
|
|
void SUISystemEnvironmentChild::UpdateDef()
|
|
{
|
|
//시스템에 맞는 초기값
|
|
m_optData = GetGameOption().GetDefOptData();
|
|
|
|
UpdateControl( m_optData );
|
|
|
|
CheckControlEnable();
|
|
}
|
|
|
|
void SUISystemEnvironmentChild::UpdateControl( const _OPT_DATA & opt_data )
|
|
{
|
|
SetComboBox( "combo_00_01", opt_data.nPresetOption ); //프리셋트
|
|
int nIndex = GetGameOption().GetResolution_Index( opt_data.nResolution_Width, opt_data.nResolution_Height );
|
|
SetComboBox( "combo_10_00", nIndex ); //해상도 변경
|
|
SetComboBox( "combo_10_01", opt_data.nRefreshRate ); //주사율 변경
|
|
|
|
SetCheckBox( "common_checkbox00", opt_data.nWinMode );//창모드
|
|
|
|
bool bFlag = opt_data.nWinMode ? true : false;
|
|
KUIControlCombo * pCombo10_01 = dynamicCast<KUIControlCombo *>(GetChild("combo_10_01")); //주사율
|
|
if( pCombo10_01 ) pCombo10_01->SetShow( !bFlag );
|
|
|
|
SetSlider( c_Control[CONTROL::Bright][0], opt_data.nBright ); //화면 밝기 설정
|
|
SetSlider( c_Control[CONTROL::BackGrondDis][0], opt_data.nBackGrondDis ); //배경 표시거리
|
|
SetSlider( c_Control[CONTROL::AvatarDis][0], opt_data.nAvatarDis ); //캐릭터 표시거리
|
|
SetSlider( c_Control[CONTROL::MipBias][0], opt_data.nMipBias ); //택스처 품질
|
|
SetSlider( c_Control[CONTROL::BGM_Volume][0], opt_data.nBGM_Volume ); //배경 볼륨
|
|
SetSlider( c_Control[CONTROL::SFX_Volume][0], opt_data.nSFX_Volume ); //효과 볼륨
|
|
SetSlider( c_Control[CONTROL::ENVS_Volume][0], opt_data.nENVS_Volume ); //환경 볼륨
|
|
SetSlider( c_Control[CONTROL::MASTER_Volume][0], opt_data.nMASTER_Volume ); //전체음 볼륨
|
|
|
|
SetCheckBox( c_Control[CONTROL::WinBright][0], opt_data.nWinBright ); //바탕화면 밝기 적용
|
|
SetCheckBox( c_Control[CONTROL::GlowQual][0], opt_data.nGlowQual ); //글로우 이펙트
|
|
// SetCheckBox( c_Control[CONTROL::WaterQual][0], opt_data.nWaterQual ); //물반사 효과 // 2011.11.29 - servantes : 사용하지 않아 주석 처리
|
|
SetCheckBox( c_Control[CONTROL::TreeAlpha][0], opt_data.nTreeAlpha ); //나무 투명화
|
|
SetCheckBox( c_Control[CONTROL::Enhance][0], opt_data.nEnhance ); //무기 강화 효과
|
|
SetCheckBox( c_Control[CONTROL::StateEffect][0], opt_data.nStateEffect ); //지속효과표시
|
|
SetCheckBox( c_Control[CONTROL::StateEffectPlayer][0], opt_data.nStateEffectPlayer ); //지속효과 -> 자신과 크리처
|
|
SetCheckBox( c_Control[CONTROL::StateEffectParty][0], opt_data.nStateEffectParty ); //지속효과 -> 파티원
|
|
SetCheckBox( c_Control[CONTROL::StateEffectEnemy][0], opt_data.nStateEffectEnemy ); //지속효과 -> 타겟
|
|
SetCheckBox( c_Control[CONTROL::Shadow][0], opt_data.nShadow ); //그림자 표시
|
|
SetCheckBox( c_Control[CONTROL::TownLimit][0], opt_data.nTownLimit ); //마을내 최소 구조물
|
|
// SetCheckBox( c_Control[CONTROL::Repeat][0], opt_data.nRepeat ); //현재 배경음 반복 // 2011.11.29 - servantes : 옵션 nui에 해당 효과 없음 / 주석처리
|
|
SetCheckBox( c_Control[CONTROL::AllMute][0], opt_data.nAllMute ); //전체음소거
|
|
SetCheckBox( c_Control[CONTROL::BGM_Mute][0], opt_data.nBGM_Mute ); //배경음 소거
|
|
SetCheckBox( c_Control[CONTROL::SFX_Mute][0], opt_data.nSFX_Mute ); //효과음 소거
|
|
SetCheckBox( c_Control[CONTROL::ENVS_Mute][0], opt_data.nENVS_Mute ); //환경음 소거
|
|
|
|
SetCheckBox(c_Control[CONTROL::HeightShadow][0], !opt_data.nLowShadow ); //저사향 그림자(자세히)
|
|
SetCheckBox(c_Control[CONTROL::LowShadow][0], opt_data.nLowShadow ); //저사향 그림자(단순히)
|
|
|
|
SetCheckBox(c_Control[CONTROL::RenderTree][0], opt_data.nRenderTree ); //나무 표시
|
|
SetCheckBox(c_Control[CONTROL::RenderGrass][0], opt_data.nRenderGrass ); //풀 표시
|
|
SetCheckBox(c_Control[CONTROL::LightMap][0], opt_data.nLightMap ); //라이트멥
|
|
|
|
SetCheckBox( c_Control[CONTROL::Effect][0], opt_data.nEffect ); //지속효과표시
|
|
SetCheckBox( c_Control[CONTROL::EffectPlayer][0], opt_data.nEffectPlayer ); //지속효과 -> 자신과 크리처
|
|
SetCheckBox( c_Control[CONTROL::EffectParty][0], opt_data.nEffectParty ); //지속효과 -> 파티원
|
|
SetCheckBox( c_Control[CONTROL::EffectEnemy][0], opt_data.nEffectEnemy ); //지속효과 -> 타겟
|
|
|
|
KUIControlCheck* pShowPlayerCheck = dynamicCast<KUIControlCheck*>( GetChild("common_show_player_checkbox") );
|
|
if(pShowPlayerCheck)
|
|
{
|
|
pShowPlayerCheck->SetCheck( opt_data.nRenderOtherPlayer == 1 ? true : false );
|
|
}
|
|
|
|
}
|
|
|
|
void SUISystemEnvironmentChild::ApplyCancel()
|
|
{
|
|
UpdateOption(); //재 갱신
|
|
}
|
|
|
|
// 적용
|
|
void SUISystemEnvironmentChild::ApplyOption()
|
|
{
|
|
GetGameOption().SetOptData( m_optData );
|
|
|
|
GetGameOption().Apply( MODE_ENVIRONMENT );
|
|
m_pGameManager->ApplyOption( MODE_ENVIRONMENT );
|
|
}
|
|
|
|
//////////////////////////////////////////////////
|
|
//
|
|
// SUISystemPlayChild
|
|
// sound
|
|
//
|
|
///////////////////////////////////////////////////
|
|
bool SUISystemPlayChild::InitData( bool bReload/* = false*/ )
|
|
{
|
|
//m_optData = GetGameOption().GetOptData(); //여기서 m_optData를 초기화 안해주면 pCombo->SetCurSel( m_optData.nTABKey ); 에서 쓰레기값을 쎄팅해버린다 주의
|
|
|
|
KUIControlCombo * pCombo = dynamicCast<KUIControlCombo *>(GetChild("combo_00_01")); //TAB키 설정
|
|
if( pCombo )
|
|
{
|
|
pCombo->SetEnableColor( "<#ffffff>" );
|
|
|
|
// pCombo->AddItem( S(6410) );
|
|
pCombo->AddItem( S(6411) );
|
|
pCombo->SetCurSel( 0 );
|
|
// pCombo->SetCurSel( m_optData.nTABKey );
|
|
}
|
|
UpdateOption();
|
|
|
|
return SUIWnd::InitData( bReload );
|
|
}
|
|
|
|
bool SUISystemPlayChild::InitControls( KPoint kPos )
|
|
{
|
|
KUIControlSlider* pSlider = dynamicCast<KUIControlSlider *>(GetChild("hslider_winalpha")); //윈도우 투명도 설정
|
|
if( pSlider ) pSlider->SetSliderRange( MaxWinAlpha );
|
|
|
|
KUIControlSlider* pWeatherQuality = dynamicCast< KUIControlSlider* >( GetChild( "hslider_winalpha-1" ) ); // 날씨 효과 품질 설정
|
|
if( pWeatherQuality ) pWeatherQuality->SetSliderRange( MaxWeatherQuality );
|
|
|
|
InitStaticControlEnableOption();
|
|
InitControlText();
|
|
|
|
return SUIWnd::InitControls(kPos);
|
|
}
|
|
|
|
void SUISystemPlayChild::UpdateSubCheckControl()
|
|
{
|
|
int nCheck(0);
|
|
{ //체력게이지 표시
|
|
nCheck = GetCheckBoxValue( "common_checkbox11" );
|
|
|
|
std::string strColor;
|
|
if( nCheck ) strColor = "<#ffffff>";
|
|
else strColor = "<#8e8e8e>";
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::PlayerGage][0], nCheck, strColor.c_str()); //자신과 파티원
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::MonsterGage][0], nCheck, strColor.c_str()); //몬스터
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::TargetGage][0], nCheck, strColor.c_str()); //타겟
|
|
}
|
|
{ //이름 표시
|
|
nCheck = GetCheckBoxValue( "common_checkbox15" );
|
|
|
|
std::string strColor;
|
|
if( nCheck ) strColor = "<#ffffff>";
|
|
else strColor = "<#8e8e8e>";
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::OPlayerName][0], nCheck, strColor.c_str()); //플레이어
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::CreatureName][0], nCheck, strColor.c_str()); //크리처
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::MonsterName][0], nCheck, strColor.c_str()); //몬스터
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::NPCName][0], nCheck, strColor.c_str()); //NPC
|
|
}
|
|
{ //데미지 표시
|
|
nCheck = GetCheckBoxValue( "common_checkbox20" );
|
|
|
|
std::string strColor;
|
|
if( nCheck ) strColor = "<#ffffff>";
|
|
else strColor = "<#8e8e8e>";
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::PlayerDM][0], nCheck, strColor.c_str()); //자신
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::CratureDM][0], nCheck, strColor.c_str()); //크리처
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::PartyDM][0], nCheck, strColor.c_str()); //파티원
|
|
}
|
|
|
|
{ //노점표시관련
|
|
int nBoothType = GetGameOption().GetBoothType();
|
|
nCheck = (nBoothType == BOOTH_TYPE::RENDER_NONE_BOOTH) ? false : true;
|
|
|
|
std::string strColor;
|
|
if( nCheck ) strColor = "<#ffffff>";
|
|
else strColor = "<#8e8e8e>";
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::SimpleStore][0], nCheck, strColor.c_str());
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::DetailStore][0], nCheck, strColor.c_str());
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::AvatarStore][0], nCheck, strColor.c_str());
|
|
}
|
|
|
|
{ //미구현 컨트롤
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::ChatBalloon][0], false, "<#8e8e8e>"); //(말풍선 표시)
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::Tip][0], false, "<#8e8e8e>"); //(게임팁 표시)
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::PartyDM][0], false, "<#8e8e8e>"); //파티원
|
|
}
|
|
}
|
|
|
|
void SUISystemPlayChild::InitStaticControlEnableOption()
|
|
{
|
|
KUIControlStatic* pControl(NULL);
|
|
for( int i(0); i<PLAYCONTROL::MAX; ++i )
|
|
{
|
|
pControl = dynamicCast<KUIControlStatic *>(GetChild( c_PlayControl[i][1] ));
|
|
if( pControl ) pControl->SetEnableOption( true );
|
|
}
|
|
}
|
|
|
|
void SUISystemPlayChild::InitControlText()
|
|
{
|
|
KUIControlStatic* pControl(NULL);
|
|
for( int i(0); i<PLAYCONTROL::MAX; ++i )
|
|
{
|
|
m_hsControlText.add( c_PlayControl[i][0], c_PlayControl[i][1] );
|
|
}
|
|
}
|
|
|
|
void SUISystemPlayChild::SetControlEnableWithColor( const char* lpControl, bool bEnable, const char* lpColor )
|
|
{
|
|
std::string strStaticText;
|
|
if( m_hsControlText.lookup( lpControl, strStaticText ) )
|
|
{
|
|
SetControlEnable(lpControl, bEnable);
|
|
|
|
if( bEnable ) SetControlEnableColor(strStaticText.c_str(), lpColor);
|
|
else SetControlDisableColor(strStaticText.c_str(), lpColor);
|
|
SetControlEnable( strStaticText.c_str(), bEnable );
|
|
}
|
|
}
|
|
|
|
void SUISystemPlayChild::PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam )
|
|
{
|
|
switch(nMessage)
|
|
{
|
|
case KUI_MESSAGE::KCOMBO_SELECT:
|
|
{
|
|
m_pGameManager->StartSound( "ui_button_click.wav" );
|
|
|
|
// if( ::_stricmp( lpszControlID, "combo_00_01" ) == 0 ) //TAB키 설정
|
|
// {
|
|
// SetComboBox( "combo_00_01", (int)lparam );
|
|
// m_optData.nTABKey = (int)lparam;
|
|
// }
|
|
}
|
|
break;
|
|
case KUI_MESSAGE::KBUTTON_CLICK:
|
|
{
|
|
// ========================
|
|
if( ::_stricmp( lpszControlID, "button_def" ) == 0 )
|
|
{
|
|
//초기값으로
|
|
UpdateDef();
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "button_apply" ) == 0 )
|
|
{
|
|
//MSG 박스 OK -> 적용
|
|
ApplyOption();
|
|
// m_pGameManager->ProcMsgAtStatic( &SIMSG_REQ_OPEN_MSGBOX( SIMSG_REQ_OPEN_MSGBOX::MSGBOX_OPTION_APPLY, c_szOPTION_APPLY ) );
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "button_ok" ) == 0 )
|
|
{
|
|
ApplyOption();
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSTEM, false ) );
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "button_cancel" ) == 0 )
|
|
{
|
|
ApplyCancel();
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSTEM, false ) );
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "button03" ) == 0 )
|
|
{ //초기화 ( 윈도우 위치 초기화 하는 버튼 )
|
|
m_pGameManager->ResetDefaultWinPos();
|
|
}
|
|
}
|
|
break;
|
|
case KUI_MESSAGE::SLIDER_SELECT:
|
|
{
|
|
m_pGameManager->StartSound( "ui_button_click.wav" );
|
|
|
|
if( ::_stricmp( lpszControlID, "hslider_winalpha" ) == 0 ) //윈도우 투명도 설정
|
|
{
|
|
m_optData.nWinAlpha = (int)lparam;
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "hslider_winalpha-1" ) == 0 ) //날씨 효과 품질
|
|
{
|
|
m_optData.nWeatherQuality = (int)lparam;
|
|
}
|
|
break;
|
|
}
|
|
case KUI_MESSAGE::KCHECK_CHANGE:
|
|
{
|
|
m_pGameManager->StartSound( "ui_button_click.wav" );
|
|
|
|
/*if( ::_stricmp( "common_checkbox00", lpszControlID ) == 0 )
|
|
{ //앤터체팅사용
|
|
m_optData.nEnterChat = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else*/ // 엔터채팅설정 키맵핑쪽으로 이동함. sfreer
|
|
if( ::_stricmp( "common_checkbox01", lpszControlID ) == 0 )
|
|
{ //포스칩 후 자동 공격
|
|
m_optData.nChipAttack = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( "common_checkbox02", lpszControlID ) == 0 )
|
|
{ //거래 및 초대 거절
|
|
m_optData.nTrade = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( "common_checkbox27", lpszControlID ) == 0 )
|
|
{ // 대련신청_거부
|
|
m_optData.nPVP = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( "common_checkbox31", lpszControlID ) == 0 )
|
|
{ // 공격_시_자동타겟팅
|
|
m_optData.nAutoTarget = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( "common_checkbox30", lpszControlID ) == 0 )
|
|
{ // 휠방향_반전
|
|
m_optData.nWheel = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( "common_checkbox04", lpszControlID ) == 0 )
|
|
{ //체팅창 자동숨김
|
|
m_optData.nChatHide = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( "common_checkbox05", lpszControlID ) == 0 )
|
|
{ //몬스터 페이스컷
|
|
m_optData.nMobFace = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( "common_radiobutton00", lpszControlID ) == 0 )
|
|
{ //라크 자세히
|
|
SetCheckBox("common_radiobutton00", true);
|
|
SetCheckBox("common_radiobutton01", false);
|
|
m_optData.nSimpleRak = false;
|
|
}
|
|
else if( ::_stricmp( "common_radiobutton01", lpszControlID ) == 0 )
|
|
{ //라크 단순히
|
|
SetCheckBox("common_radiobutton00", false);
|
|
SetCheckBox("common_radiobutton01", true);
|
|
m_optData.nSimpleRak = true;
|
|
}
|
|
else if( ::_stricmp( "common_checkbox07", lpszControlID ) == 0 )
|
|
{ //말풍선 표시
|
|
m_optData.nChatBalloon = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( "common_checkbox08", lpszControlID ) == 0 )
|
|
{ //게임팁 표시
|
|
m_optData.nTip = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( "common_checkbox09", lpszControlID ) == 0 )
|
|
{ //투구 보이기
|
|
// 2010.05.19 - prodongi
|
|
PendMessageHideEquipInfo(ItemBase::HIDE_EQUIP_HELM, GetCheckBoxValue( lpszControlID ));
|
|
//m_optData.nHelm = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( "common_checkbox10", lpszControlID ) == 0 )
|
|
{ //망토 보이기
|
|
m_optData.nMantle = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( "common_checkbox11", lpszControlID ) == 0 )
|
|
{ //체력게이지 표시
|
|
m_optData.nHPGage = GetCheckBoxValue( lpszControlID );
|
|
|
|
int nCheck = GetCheckBoxValue( lpszControlID );
|
|
|
|
std::string strColor;
|
|
if( nCheck ) strColor = "<#ffffff>";
|
|
else strColor = "<#8e8e8e>";
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::PlayerGage][0], nCheck, strColor.c_str()); //자신과 파티원
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::MonsterGage][0], nCheck, strColor.c_str()); //몬스터
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::TargetGage][0], nCheck, strColor.c_str()); //타겟
|
|
}
|
|
else if( ::_stricmp( c_PlayControl[PLAYCONTROL::PlayerGage][0], lpszControlID ) == 0 )
|
|
{ //자신과 파티원
|
|
m_optData.nPlayerGage = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_PlayControl[PLAYCONTROL::MonsterGage][0], lpszControlID ) == 0 )
|
|
{ //몬스터
|
|
m_optData.nMobGage = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_PlayControl[PLAYCONTROL::TargetGage][0], lpszControlID ) == 0 )
|
|
{ //타겟
|
|
m_optData.nTargetGage = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( "common_checkbox15", lpszControlID ) == 0 )
|
|
{ //이름 표시
|
|
m_optData.nName = GetCheckBoxValue( lpszControlID );
|
|
|
|
int nCheck = GetCheckBoxValue( lpszControlID );
|
|
|
|
std::string strColor;
|
|
if( nCheck ) strColor = "<#ffffff>";
|
|
else strColor = "<#8e8e8e>";
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::OPlayerName][0], nCheck, strColor.c_str()); //플레이어
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::CreatureName][0], nCheck, strColor.c_str()); //크리처
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::MonsterName][0], nCheck, strColor.c_str()); //몬스터
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::NPCName][0], nCheck, strColor.c_str()); //NPC
|
|
}
|
|
else if( ::_stricmp( c_PlayControl[PLAYCONTROL::OPlayerName][0], lpszControlID ) == 0 )
|
|
{ //플레이어
|
|
m_optData.nPlayerName = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_PlayControl[PLAYCONTROL::CreatureName][0], lpszControlID ) == 0 )
|
|
{ //크리처
|
|
m_optData.nCreatureName = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_PlayControl[PLAYCONTROL::MonsterName][0], lpszControlID ) == 0 )
|
|
{ //몬스터
|
|
m_optData.nMobName = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_PlayControl[PLAYCONTROL::NPCName][0], lpszControlID ) == 0 )
|
|
{ //NPC
|
|
m_optData.nNPCName = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( "common_checkbox20", lpszControlID ) == 0 )
|
|
{ //데미지 표시
|
|
m_optData.ndamage = GetCheckBoxValue( lpszControlID );
|
|
|
|
int nCheck = GetCheckBoxValue( lpszControlID );
|
|
|
|
std::string strColor;
|
|
if( nCheck ) strColor = "<#ffffff>";
|
|
else strColor = "<#8e8e8e>";
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::PlayerDM][0], nCheck, strColor.c_str()); //자신
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::CratureDM][0], nCheck, strColor.c_str()); //크리처
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::PartyDM][0], false, "<#8e8e8e>"); //파티원(미구현)
|
|
// SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::PartyDM][0], nCheck, strColor.c_str()); //파티원
|
|
}
|
|
else if( ::_stricmp( c_PlayControl[PLAYCONTROL::PlayerDM][0], lpszControlID ) == 0 )
|
|
{ //자신
|
|
m_optData.nPlayerDM = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_PlayControl[PLAYCONTROL::CratureDM][0], lpszControlID ) == 0 )
|
|
{ //크리처
|
|
m_optData.nCreatureDM = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( c_PlayControl[PLAYCONTROL::PartyDM][0], lpszControlID ) == 0 )
|
|
{ //파티원(미구현)
|
|
// m_optData.nPartyDM = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if( ::_stricmp( "common_checkbox24", lpszControlID ) == 0 )
|
|
{ //현재윈도우장금
|
|
int nCheck = GetCheckBoxValue( lpszControlID );
|
|
m_optData.nWinLock = nCheck;
|
|
|
|
//gmpbigsun( 20131030 ) : 윈도우 잠금시 이동불가 설정
|
|
AbleMoveWin(!nCheck);
|
|
|
|
std::string strColor;
|
|
if( nCheck ) strColor = "<#8e8e8e>";
|
|
else strColor = "<#fbe6af>";
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::WinPosClear][0], !nCheck, strColor.c_str()); //윈도우 위치 초기화
|
|
}
|
|
else if( ::_stricmp( "common_checkbox25", lpszControlID ) == 0 )
|
|
{
|
|
int nCheck = GetCheckBoxValue( lpszControlID );
|
|
if( nCheck > 0 )
|
|
{
|
|
if( GetCheckBoxValue( c_PlayControl[PLAYCONTROL::SimpleStore][0] ) )
|
|
m_optData.nSelfBoothType = BOOTH_TYPE::RENDER_SIMPLE_BOOTH;
|
|
else if( GetCheckBoxValue( c_PlayControl[PLAYCONTROL::DetailStore][0] ) )
|
|
m_optData.nSelfBoothType = BOOTH_TYPE::RENDER_DETAIL_BOOTH;
|
|
else if( GetCheckBoxValue( c_PlayControl[PLAYCONTROL::AvatarStore][0] ) )
|
|
m_optData.nSelfBoothType = BOOTH_TYPE::RENDER_AVATAR_BOOTH;
|
|
}
|
|
else
|
|
{
|
|
nCheck = 0;
|
|
m_optData.nSelfBoothType = BOOTH_TYPE::RENDER_NONE_BOOTH;
|
|
}
|
|
|
|
std::string strColor;
|
|
if( nCheck ) strColor = "<#ffffff>";
|
|
else strColor = "<#8e8e8e>";
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::SimpleStore][0], nCheck, strColor.c_str()); //간단상점
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::DetailStore][0], nCheck, strColor.c_str()); //기본상점
|
|
SetControlEnableWithColor(c_PlayControl[PLAYCONTROL::AvatarStore][0], nCheck, strColor.c_str()); //아바타
|
|
}
|
|
else if( ::_stricmp( c_PlayControl[PLAYCONTROL::SimpleStore][0], lpszControlID ) == 0 )
|
|
{ //간단상점
|
|
SetCheckBox(c_PlayControl[PLAYCONTROL::SimpleStore][0], true);
|
|
SetCheckBox(c_PlayControl[PLAYCONTROL::DetailStore][0], false);
|
|
SetCheckBox(c_PlayControl[PLAYCONTROL::AvatarStore][0], false);
|
|
|
|
m_optData.nSelfBoothType = BOOTH_TYPE::RENDER_SIMPLE_BOOTH;
|
|
}
|
|
else if( ::_stricmp( c_PlayControl[PLAYCONTROL::DetailStore][0], lpszControlID ) == 0 )
|
|
{ //기본상점
|
|
SetCheckBox(c_PlayControl[PLAYCONTROL::SimpleStore][0], false);
|
|
SetCheckBox(c_PlayControl[PLAYCONTROL::DetailStore][0], true);
|
|
SetCheckBox(c_PlayControl[PLAYCONTROL::AvatarStore][0], false);
|
|
|
|
m_optData.nSelfBoothType = BOOTH_TYPE::RENDER_DETAIL_BOOTH;
|
|
}
|
|
else if( ::_stricmp( c_PlayControl[PLAYCONTROL::AvatarStore][0], lpszControlID ) == 0 )
|
|
{ //아바타
|
|
SetCheckBox(c_PlayControl[PLAYCONTROL::SimpleStore][0], false);
|
|
SetCheckBox(c_PlayControl[PLAYCONTROL::DetailStore][0], false);
|
|
SetCheckBox(c_PlayControl[PLAYCONTROL::AvatarStore][0], true);
|
|
|
|
m_optData.nSelfBoothType = BOOTH_TYPE::RENDER_AVATAR_BOOTH;
|
|
}
|
|
else if( ::_stricmp( c_PlayControl[ PLAYCONTROL::CameraCollision ][ 0 ], lpszControlID ) == 0 )
|
|
{
|
|
m_optData.nCameraCollision = GetCheckBoxValue( lpszControlID );
|
|
}
|
|
else if(::_stricmp( "common_checkbox_shake", lpszControlID ) == 0 )
|
|
{
|
|
int nCheck = GetCheckBoxValue( lpszControlID );
|
|
m_optData.nCriticalCamera = nCheck;
|
|
}
|
|
else if( ::_stricmp("common_checkbox28",lpszControlID) == 0 ) // 2012. 5. 24 - marine 호칭 보이기/안보이기 옵션
|
|
{
|
|
int nCheck = GetCheckBoxValue( lpszControlID );
|
|
m_optData.nTitleShow = nCheck;
|
|
}
|
|
else if( ::_stricmp("common_checkbox29",lpszControlID) == 0 ) // 2012. 5. 24 - marine 호칭 보이기/안보이기 옵션
|
|
{
|
|
int nCheck = GetCheckBoxValue( lpszControlID );
|
|
m_optData.isShowSelectOutLine = nCheck;
|
|
}
|
|
|
|
// 제거. bintitle. 2010.10.07.
|
|
/*else if(::_stricmp( "common_checkbox_deco", lpszControlID ) == 0 )
|
|
{
|
|
int nCheck = GetCheckBoxValue( lpszControlID );
|
|
m_optData.nAvatarDeco = nCheck;
|
|
}*/
|
|
|
|
// combo_00_01 TAB키 설정
|
|
// common_checkbox01 포스칩 후 자동 공격
|
|
// common_checkbox02 거래 및 초대 거절
|
|
// common_checkbox27 대련신청_거부
|
|
// common_checkbox04 체팅창 자동숨김
|
|
// common_checkbox05 몬스터 페이스컷
|
|
// common_checkbox07 말풍선 표시
|
|
// common_checkbox08 게임팁 표시
|
|
// common_checkbox09 투구 보이기
|
|
// common_checkbox10 망토 보이기
|
|
// common_checkbox11 체력게이지 표시
|
|
// common_checkbox12 자신과 파티원
|
|
// common_checkbox13 몬스터
|
|
// common_checkbox14 타겟
|
|
// common_checkbox15 이름 표시
|
|
// common_checkbox16 플레이어
|
|
// common_checkbox17 크리처
|
|
// common_checkbox18 몬스터
|
|
// common_checkbox19 NPC
|
|
// common_checkbox20 데미지 표시
|
|
// common_checkbox21 자신
|
|
// common_checkbox22 크리처
|
|
// common_checkbox23 파티원
|
|
// common_checkbox24 현재윈도우장금
|
|
// common_checkbox26 간단상점
|
|
// common_checkbox27 기본상점
|
|
// common_checkbox28 아바타
|
|
// hslider_winalpha 윈도우 투명도 설정
|
|
// button03 초기화
|
|
}
|
|
break;
|
|
}
|
|
SUIWnd::PumpUpMessage( lpszControlID, nMessage, lparam, wparam );
|
|
}
|
|
|
|
// 2010.05.20 - prodongi
|
|
void SUISystemPlayChild::ProcMsgAtStatic(SGameMessage* pMsg)
|
|
{
|
|
switch (pMsg->nType)
|
|
{
|
|
case IMSG_HIDE_EQUIP_INFO: OnMsgHideEquipInfo(dynamicCast<SIMSG_HIDE_EQUIP_INFO*>(pMsg)); break;
|
|
}
|
|
}
|
|
|
|
int SUISystemPlayChild::GetCheckBoxValue( const char * pControlName )
|
|
{
|
|
KUIControlCheck* pCheck = dynamicCast<KUIControlCheck*>( GetChild(pControlName) );
|
|
if( pCheck )
|
|
{
|
|
bool bFlag = pCheck->GetCheck();
|
|
return bFlag ? 1 : 0;
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
void SUISystemPlayChild::SetControlEnable( const char * pControlName, bool bEnable )
|
|
{
|
|
KUIControl * pControl = dynamicCast<KUIControl *>(GetChild(pControlName));
|
|
if( pControl )
|
|
{
|
|
if( bEnable )
|
|
pControl->Enable();
|
|
else
|
|
pControl->Disable();
|
|
}
|
|
}
|
|
|
|
void SUISystemPlayChild::SetControlEnableColor( const char * pControlName, const char* lpColor )
|
|
{
|
|
KUIControl * pControl = dynamicCast<KUIControl *>(GetChild(pControlName));
|
|
if( pControl )
|
|
{
|
|
pControl->SetEnableColor(lpColor);
|
|
}
|
|
}
|
|
|
|
void SUISystemPlayChild::SetControlDisableColor( const char * pControlName, const char* lpColor )
|
|
{
|
|
KUIControl * pControl = dynamicCast<KUIControl *>(GetChild(pControlName));
|
|
if( pControl )
|
|
{
|
|
pControl->SetDisableColor(lpColor);
|
|
}
|
|
}
|
|
|
|
void SUISystemPlayChild::SetComboBox( const char * pControlName, int nValue )
|
|
{
|
|
KUIControlCombo * pCombo = dynamicCast<KUIControlCombo *>(GetChild(pControlName));
|
|
if( pCombo )
|
|
{
|
|
pCombo->SetCurSel( nValue );
|
|
}
|
|
}
|
|
|
|
void SUISystemPlayChild::SetCheckBox( const char * pControlName, int nValue )
|
|
{
|
|
KUIControlCheck* pCheck = dynamicCast<KUIControlCheck*>( GetChild(pControlName) );
|
|
if( pCheck ) pCheck->SetCheck( nValue ? true : false );
|
|
}
|
|
|
|
void SUISystemPlayChild::SetSlider( const char * pControlName, int nValue )
|
|
{
|
|
KUIControlSlider* pSlider = dynamicCast<KUIControlSlider*>( GetChild(pControlName) );
|
|
if( pSlider ) pSlider->SetPosition(nValue);
|
|
}
|
|
|
|
void SUISystemPlayChild::UpdateDef()
|
|
{
|
|
//시스템에 맞는 초기값
|
|
GetGameOption().GetDefPlayOptData(m_optData);
|
|
|
|
UpdateControl();
|
|
}
|
|
|
|
void SUISystemPlayChild::UpdateControl()
|
|
{
|
|
//SetCheckBox("common_checkbox00", m_optData.nEnterChat); //앤터체팅사용
|
|
SetCheckBox("common_checkbox01", m_optData.nChipAttack); //포스칩 후 자동 공격
|
|
SetCheckBox("common_checkbox02", m_optData.nTrade); //거래 및 초대 거절
|
|
// SetCheckBox("common_checkbox03", m_optData); //
|
|
SetCheckBox("common_checkbox27", m_optData.nPVP); //대련신청_거부
|
|
SetCheckBox("common_checkbox31", m_optData.nAutoTarget); //공격_시_자동타겟팅
|
|
SetCheckBox("common_checkbox30", m_optData.nWheel); //휠방향_반전
|
|
SetCheckBox("common_checkbox04", m_optData.nChatHide); //체팅창 자동숨김
|
|
//SetCheckBox("common_checkbox05", m_optData.nMobFace); //몬스터 페이스컷
|
|
SetCheckBox("common_checkbox07", m_optData.nChatBalloon); //말풍선 표시
|
|
SetCheckBox("common_checkbox08", m_optData.nTip); //게임팁 표시
|
|
// 2010.05.20 - prodongi
|
|
//SetCheckBox("common_checkbox09", m_optData.nHelm); //투구 보이기
|
|
SetCheckBox("common_checkbox10", m_optData.nMantle); //망토 보이기
|
|
SetCheckBox("common_checkbox11", m_optData.nHPGage); //체력게이지 표시
|
|
SetCheckBox("common_checkbox12", m_optData.nPlayerGage); //자신과 파티원 c_PlayControl[PLAYCONTROL::PlayerGage][0]
|
|
SetCheckBox("common_checkbox13", m_optData.nMobGage); //몬스터 c_PlayControl[PLAYCONTROL::MonsterGage][0]
|
|
SetCheckBox("common_checkbox14", m_optData.nTargetGage); //타겟 c_PlayControl[PLAYCONTROL::TargetGage][0]
|
|
SetCheckBox("common_checkbox15", m_optData.nName); //이름 표시
|
|
SetCheckBox("common_checkbox16", m_optData.nPlayerGage); //플레이어 표시 c_PlayControl[PLAYCONTROL::OPlayerName][0]
|
|
SetCheckBox("common_checkbox17", m_optData.nCreatureName); //크리처 c_PlayControl[PLAYCONTROL::CreatureName][0]
|
|
SetCheckBox("common_checkbox18", m_optData.nMobName); //몬스터 c_PlayControl[PLAYCONTROL::MonsterName][0]
|
|
SetCheckBox("common_checkbox19", m_optData.nNPCName); //NPC c_PlayControl[PLAYCONTROL::NPCName][0]
|
|
SetCheckBox("common_checkbox20", m_optData.ndamage); //데미지 표시
|
|
SetCheckBox("common_checkbox21", m_optData.nPlayerDM); //자신 c_PlayControl[PLAYCONTROL::PlayerDM][0]
|
|
SetCheckBox("common_checkbox22", m_optData.nCreatureDM); //크리처 c_PlayControl[PLAYCONTROL::CratureDM][0]
|
|
SetCheckBox("common_checkbox23", m_optData.nPartyDM); //파티원 c_PlayControl[PLAYCONTROL::PartyDM][0]
|
|
SetCheckBox("common_checkbox24", m_optData.nWinLock); //현재윈도우장금
|
|
SetCheckBox("common_checkbox25", m_optData.nSelfBoothType != BOOTH_TYPE::RENDER_NONE_BOOTH); //개인상점 아바타 표시
|
|
SetCheckBox("common_radiobutton02", m_optData.nSelfBoothType == BOOTH_TYPE::RENDER_SIMPLE_BOOTH);
|
|
SetCheckBox("common_radiobutton03", m_optData.nSelfBoothType == BOOTH_TYPE::RENDER_DETAIL_BOOTH);
|
|
SetCheckBox("common_radiobutton04", m_optData.nSelfBoothType == BOOTH_TYPE::RENDER_AVATAR_BOOTH);
|
|
|
|
SetCheckBox("common_radiobutton00", m_optData.nSimpleRak<=0);
|
|
SetCheckBox("common_radiobutton01", m_optData.nSimpleRak>0);
|
|
|
|
SetCheckBox("common_checkbox_shake", m_optData.nCriticalCamera );
|
|
SetCheckBox("common_checkbox28", m_optData.nTitleShow ); // 2012. 5. 24 - mainre 호칭
|
|
SetCheckBox("common_checkbox29", m_optData.isShowSelectOutLine);
|
|
//SetCheckBox("common_checkbox_deco" , m_optData.nAvatarDeco ); // 제거. bintitle. 2010.10.07.
|
|
|
|
SetCheckBox("common_checkbox26", m_optData.nCameraCollision);
|
|
|
|
KUIControlSlider* pSliderAlpha = dynamicCast<KUIControlSlider *>(GetChild("hslider_winalpha")); //윈도우 알파 설정 슬라이더
|
|
if( pSliderAlpha )
|
|
{
|
|
pSliderAlpha->SetSliderRange( MaxWinAlpha );
|
|
pSliderAlpha->SetPosition( m_optData.nWinAlpha );
|
|
}
|
|
|
|
KUIControlSlider* pWeatherQuality = dynamicCast< KUIControlSlider* >( GetChild( "hslider_winalpha-1" ) ); // 날씨 효과 슬라이더
|
|
if( pWeatherQuality )
|
|
{
|
|
pWeatherQuality->SetSliderRange( MaxWeatherQuality );
|
|
pWeatherQuality->SetPosition( m_optData.nWeatherQuality );
|
|
}
|
|
|
|
UpdateSubCheckControl();
|
|
}
|
|
|
|
void SUISystemPlayChild::UpdateOption()
|
|
{
|
|
m_optData = GetGameOption().GetOptData();
|
|
|
|
m_nMinimapAlpha = GetGameOption().GetMinimapAlpha();
|
|
m_bMinimapOpen = GetGameOption().IsMinimapOpen();
|
|
|
|
UpdateControl();
|
|
|
|
//STMSG_REQ_SYSTEM_OPTION msg( STMSG_SYSTEM_OPTION::SYSOPTION_BGSOUND );
|
|
|
|
// bg
|
|
//msg.m_Type = STMSG_SYSTEM_OPTION::SYSOPTION_BGSOUND;
|
|
//m_pGameManager->ProcMsgAtStatic( &msg );
|
|
//if( m_nBGVolum != msg.m_nGetOption )
|
|
// m_pGameManager->ProcMsgAtStatic( &STMSG_SYSTEM_OPTION( STMSG_SYSTEM_OPTION::SYSOPTION_BGSOUND, m_nBGVolum * 10 ) );
|
|
//// effect
|
|
//msg.m_Type = STMSG_SYSTEM_OPTION::SYSOPTION_EFFECTSOUND;
|
|
//m_pGameManager->ProcMsgAtStatic( &msg );
|
|
//if( m_nEffectVolum != msg.m_nGetOption )
|
|
//{
|
|
// int nRealVolume[100] = { 0, 3, 5, 8, 10,
|
|
// 20, 40, 60, 80, 90, 100, };
|
|
|
|
//
|
|
// m_pGameManager->ProcMsgAtStatic( &STMSG_SYSTEM_OPTION( STMSG_SYSTEM_OPTION::SYSOPTION_EFFECTSOUND, nRealVolume[m_nEffectVolum] ) );
|
|
//}
|
|
|
|
// minimap alpha
|
|
//m_pGameManager->ProcMsgAtStatic( &SIMSG_UI_MINIMAP_ALPHA( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_MINIMAP, m_nMinimapAlpha ) );
|
|
|
|
// minimap open
|
|
//m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_MINIMAP, m_bMinimapOpen ) );
|
|
|
|
RefreshValue( MINIMAP_ALPHA, m_nMinimapAlpha );
|
|
RefreshValue( MINIMAP_OPEN, ( m_bMinimapOpen ) ? 1 : 0 );
|
|
}
|
|
|
|
void SUISystemPlayChild::ApplyCancel()
|
|
{
|
|
UpdateOption(); //재 갱신
|
|
}
|
|
|
|
void SUISystemPlayChild::ApplyOption()
|
|
{
|
|
GetGameOption().SetOptData( m_optData );
|
|
|
|
GetGameOption().Apply( MODE_PLAY );
|
|
m_pGameManager->ApplyOption( MODE_PLAY );
|
|
|
|
//// 배경 사운드 게임에 요청
|
|
//if( m_nBGVolum != GetGameOption().GetBGVolum() )
|
|
//{
|
|
// m_pGameManager->ProcMsgAtStatic( &STMSG_SYSTEM_OPTION( STMSG_SYSTEM_OPTION::SYSOPTION_BGSOUND, m_nBGVolum * 10 ) );
|
|
// RefreshValue( SOUND_BG, m_nBGVolum );
|
|
//}
|
|
//// 이펙트 사운드 게임에 요청
|
|
//if( m_nEffectVolum != GetGameOption().GetEffectVolum() )
|
|
//{
|
|
// int nRealVolume[100] = { 0, 3, 5, 8, 10,
|
|
// 20, 40, 60, 80, 90, 100, };
|
|
|
|
// m_pGameManager->ProcMsgAtStatic( &STMSG_SYSTEM_OPTION( STMSG_SYSTEM_OPTION::SYSOPTION_EFFECTSOUND, nRealVolume[ m_nEffectVolum ] ) );
|
|
// RefreshValue( SOUND_EFFECT, m_nEffectVolum );
|
|
//}
|
|
//// 미니맵
|
|
//if( m_nMinimapAlpha != GetGameOption().GetMinimapAlpha() )
|
|
//{
|
|
// GetGameOption().SetMinimapAlpha( m_nMinimapAlpha );
|
|
// m_pGameManager->ProcMsgAtStatic( &SIMSG_UI_MINIMAP_ALPHA( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_MINIMAP, m_nMinimapAlpha ) );
|
|
// RefreshValue( MINIMAP_ALPHA, m_nMinimapAlpha );
|
|
//}
|
|
//// 온/오프
|
|
//if( m_bMinimapOpen != GetGameOption().IsMinimapOpen() )
|
|
//{
|
|
// GetGameOption().SetMinimapOpen( m_bMinimapOpen );
|
|
// m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_MINIMAP, true ) );
|
|
// RefreshValue( MINIMAP_OPEN, ( m_bMinimapOpen ) ? 1 : 0 );
|
|
//}
|
|
|
|
//GetGameOption().SetBGVolum( m_nBGVolum * 10 );
|
|
//GetGameOption().SetEffectVolum( m_nEffectVolum * 10 );
|
|
|
|
//GetGameOption().Apply( MODE_PLAY );
|
|
}
|
|
|
|
void SUISystemPlayChild::SetMinimapAlpha( int nLevel )
|
|
{
|
|
if( nLevel < MINIMAP_ALPHA_MIN ) return;
|
|
if( nLevel > MINIMAP_ALPHA_MAX ) return;
|
|
|
|
m_nMinimapAlpha = nLevel;
|
|
|
|
RefreshValue( MINIMAP_ALPHA, m_nMinimapAlpha );
|
|
}
|
|
void SUISystemPlayChild::SetMinimapOpen()
|
|
{
|
|
m_bMinimapOpen = !m_bMinimapOpen;
|
|
|
|
RefreshValue( MINIMAP_OPEN, m_bMinimapOpen );
|
|
}
|
|
void SUISystemPlayChild::RefreshValue( int nMode, int nLevel )
|
|
{
|
|
switch(nMode)
|
|
{
|
|
case MINIMAP_ALPHA:
|
|
{
|
|
std::string strMinimap;
|
|
switch(nLevel)
|
|
{
|
|
case MINIMAP_ALPHA_MAX: strMinimap = "미니맵 투명도: 높음"; break;
|
|
case MINIMAP_ALPHA_MIDDLE: strMinimap = "미니맵 투명도: 보통"; break;
|
|
case MINIMAP_ALPHA_MIN: strMinimap = "미니맵 투명도: 낮음"; break;
|
|
}
|
|
SetChildCaption( "soundop_text07", strMinimap.c_str() );
|
|
}
|
|
break;
|
|
case MINIMAP_OPEN:
|
|
{
|
|
std::string strMinimap = ( nLevel > 0 ) ? "미니맵 On/Off: on" : "미니맵 On/Off: off";
|
|
SetChildCaption( "soundop_text08", strMinimap.c_str() );
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
// 2010.05.19 - prodongi
|
|
// 수정. bintitle. 2010.10.08. 게임플레이설정 - 투구보이기 체크시에 기존의 꾸미기보임/숨김 정보를 참조하도록 수정.
|
|
void SUISystemPlayChild::PendMessageHideEquipInfo(unsigned int flag, int show)
|
|
{
|
|
TS_CS_HIDE_EQUIP_INFO info;
|
|
//info.nHideEquipFlag = 0;
|
|
//if (0 == show) info.nHideEquipFlag |= flag;
|
|
|
|
info.nHideEquipFlag = g_pCurrentGameSystem->GetLocalPlayer()->getHideEquipInfo();
|
|
if ( show ) info.nHideEquipFlag ^= flag;
|
|
else if (0 == show) info.nHideEquipFlag |= flag;
|
|
m_pGameManager->PendMessage(&info);
|
|
}
|
|
|
|
// 2010.05.20 - prodongi
|
|
void SUISystemPlayChild::OnMsgHideEquipInfo(SIMSG_HIDE_EQUIP_INFO* hideEquipInfo)
|
|
{
|
|
unsigned int flag = hideEquipInfo->m_flag;
|
|
int value;
|
|
// 투구
|
|
if (ItemBase::HIDE_EQUIP_HELM & flag) value = 0; // check
|
|
else value = 1; // uncheck
|
|
SetCheckBox("common_checkbox09", value);
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////
|
|
////
|
|
//// SUIKeymappingChild
|
|
//// sfreer 키맵핑 기능 추가 2009.03.16
|
|
////////////////////////////////////////////////////////////
|
|
bool SUISystemKeymappingChild::InitControls( KPoint kPos )
|
|
{
|
|
for(int i=0; i<KEYMAPPINGCONTROL::KEYMAPPINGCONTROLMAX ;i++)
|
|
{
|
|
KUIWnd *tempwnd = GetChild(KeymappingInfoList[i].editbuttonid);
|
|
if(tempwnd)
|
|
KeymappingInfoList[i].original_y = tempwnd->GetRect().top;
|
|
}
|
|
|
|
KUIControlScrollBase* scroll = dynamicCast< KUIControlScrollBase* >( GetChild( "key_menu_fund_scroll" ) );
|
|
|
|
if(scroll)
|
|
{
|
|
int ph = GetRect().GetHeight();
|
|
int range = 0;
|
|
//스크롤 범위...
|
|
for(int i=0; i<KEYMAPPINGCONTROL::KEYMAPPINGCONTROLMAX ;i++)
|
|
{
|
|
int dy = KeymappingInfoList[i].original_y - KeymappingInfoList[0].original_y;
|
|
bool bInner = true;
|
|
for(int j=0;j<3;j++)
|
|
{
|
|
int k= KEYMAPPINGCONTROL::KEYMAPPINGCONTROLMAX - 1;
|
|
KUIWnd *tempwnd = NULL;
|
|
if(j==0) tempwnd = GetChild(KeymappingInfoList[k].editbuttonid);
|
|
else if(j==1) tempwnd = GetChild(KeymappingInfoList[k].outboxid);
|
|
else if(j==2) tempwnd = GetChild(KeymappingInfoList[k].undobuttonid);
|
|
|
|
if(tempwnd)
|
|
{
|
|
if(KeymappingInfoList[k].original_y + tempwnd->GetRect().GetHeight() - dy > GetRect().GetHeight())
|
|
{
|
|
bInner = false;
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
if(bInner)
|
|
{
|
|
range = i+1;
|
|
break;
|
|
}
|
|
}
|
|
|
|
scroll->SetMaxRange(range); //임시땜빵 + 2
|
|
scroll->SetPosition(0);
|
|
UpdateControl();
|
|
}
|
|
|
|
// 2012.9.25 Metin 활성화로 변경
|
|
/*
|
|
// 이동키는 수정안되게 비활성
|
|
std::string strMoveKeyBtn[4] = {"button_key13001","button_key13002","button_key13003","button_key13004"};
|
|
for(int i= 0 ; i<4 ; ++i)
|
|
{
|
|
KUIControlButton *pUP = dynamicCast<KUIControlButton*>(GetChild(strMoveKeyBtn[i].c_str()));
|
|
if(pUP)
|
|
pUP->Disable();
|
|
}
|
|
*/
|
|
|
|
return SUIWnd::InitControls(kPos);
|
|
}
|
|
|
|
|
|
bool SUISystemKeymappingChild::InitData( bool bReload )
|
|
{
|
|
|
|
m_DefKeymapping.SetDefaultKeymapping();
|
|
m_PrevRappelzDefKeymapping.SetPrevRappelzDefaultKeymapping();
|
|
|
|
UpdateOption();
|
|
return SUIWnd::InitData(bReload);
|
|
}
|
|
|
|
|
|
int SUISystemKeymappingChild::SetHotkey(int hotkeycode, KEYEX &key, bool vailetest)
|
|
{
|
|
if(vailetest)
|
|
{
|
|
if(!m_GameWorldKeymapping.IsValidKey(key))
|
|
return -1;
|
|
}
|
|
|
|
|
|
if(KEYEX() != key)
|
|
{
|
|
int overlappingkey = m_GameWorldKeymapping.GetKeymapping(key);
|
|
if(overlappingkey>=0)
|
|
{
|
|
PrevKeyList[overlappingkey].push_front(key);
|
|
m_GameWorldKeymapping.SetKeymapping(overlappingkey,KEYEX(), true);
|
|
}
|
|
|
|
}
|
|
|
|
if(KEYEX() != m_GameWorldKeymapping.GetKeymapping(hotkeycode) )
|
|
{
|
|
PrevKeyList[hotkeycode].push_front(m_GameWorldKeymapping.GetKeymapping(hotkeycode));
|
|
if(PrevKeyList[hotkeycode].size() > nPrevKeyCount)
|
|
{
|
|
PrevKeyList[hotkeycode].pop_back();
|
|
}
|
|
}
|
|
|
|
m_GameWorldKeymapping.SetKeymapping(hotkeycode,key,!vailetest);
|
|
UpdateControl();
|
|
|
|
return hotkeycode;
|
|
}
|
|
|
|
std::string SUISystemKeymappingChild::GetControlTextName(int nhotkeycode)
|
|
{
|
|
int k=0;
|
|
|
|
/*std::string tip;
|
|
for(int i=0; i<KEYMAPPINGCONTROL::KEYMAPPINGCONTROLMAX;i++)
|
|
{
|
|
k=i;
|
|
if(KeymappingInfoList[i].hotkeycode == -1 && i>=KEYMAPPINGCONTROL::KM4_01)
|
|
tip = KeymappingInfoList[i].text;
|
|
else if(KeymappingInfoList[i].hotkeycode == nhotkeycode)
|
|
break;
|
|
}
|
|
|
|
KUIWnd *wnd = GetChild(KeymappingInfoList[nhotkeycode].editbuttonid);
|
|
|
|
tip += " ";
|
|
tip += KeymappingInfoList[k].text; */
|
|
|
|
for(int i=0; i<KEYMAPPINGCONTROL::KEYMAPPINGCONTROLMAX;i++)
|
|
{
|
|
if(KeymappingInfoList[i].hotkeycode == nhotkeycode)
|
|
{
|
|
return KeymappingInfoList[i].tip;
|
|
}
|
|
}
|
|
|
|
return "";
|
|
}
|
|
|
|
void SUISystemKeymappingChild::ProcMsgAtStatic( SGameMessage* pMsg )
|
|
{
|
|
switch(pMsg->nType)
|
|
{
|
|
case IMSG_HOTKEY_EX:
|
|
{
|
|
SIMSG_HOTKEY_EX* pHotKeyEx = dynamicCast<SIMSG_HOTKEY_EX*>(pMsg);
|
|
|
|
if(m_HighlightKeymappingNumber >= 0)
|
|
{
|
|
//if(m_GameWorldKeymapping.IsVaildUnityKey(pHotKeyEx->wParam))
|
|
if(m_GameWorldKeymapping.IsValidKey(KEYEX(*pHotKeyEx)))
|
|
{
|
|
int j = m_GameWorldKeymapping.GetKeymapping(KEYEX(*pHotKeyEx));
|
|
std::string tip;
|
|
|
|
// 2012.9.26 Metin 키보드 이동도 따른 키세팅 방법과 동일하다.
|
|
/*
|
|
if(m_GameWorldKeymapping.IsMovingKey( KEYEX(pHotKeyEx->bAlt, pHotKeyEx->bCtrlShift, pHotKeyEx->bCtrl, pHotKeyEx->wParam) ))
|
|
{
|
|
tip = "<#ed1c24><$1166:지정하신 키는 이동키로 사용되고 있어 이후에 사용 가능합니다.>";
|
|
SetTip(TIPLEVEL::READYINPUT, NULL, -1);
|
|
SetTip(TIPLEVEL::CLICK, tip.c_str(), -1);
|
|
UpdateControl();
|
|
}
|
|
else
|
|
{
|
|
*/
|
|
if(j>=0)
|
|
{
|
|
if(m_HighlightKeymappingNumber == j)
|
|
{
|
|
//만약 같은 동일키를 입력했다면, 해제 시켜준다.
|
|
//SetHotkey(m_HighlightKeymappingNumber, KEYEX(), false);
|
|
//tip = GetControlTextName(j);
|
|
//tip += "<$6910:키가 해제됨...>";
|
|
//동일키 입력하면 그냥 취소함.
|
|
UpdateControl();
|
|
|
|
}
|
|
else
|
|
{
|
|
//중복된키가 있음.
|
|
SetHotkey(m_HighlightKeymappingNumber, KEYEX(*pHotKeyEx));
|
|
|
|
tip = "<#ed1c24><$6906:중복된> ";
|
|
tip += GetControlTextName(j);
|
|
tip += "<$6907:는 해제 됩니다.>";
|
|
|
|
SetTip(TIPLEVEL::READYINPUT, NULL, -1);
|
|
SetTip(TIPLEVEL::CLICK, tip.c_str(), -1);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
SetHotkey(m_HighlightKeymappingNumber, KEYEX(*pHotKeyEx));
|
|
|
|
tip = GetControlTextName(j);
|
|
tip += "<$6909:키가 변경됨...>";
|
|
|
|
SetTip(TIPLEVEL::READYINPUT, NULL, -1);
|
|
SetTip(TIPLEVEL::CLICK, tip.c_str(), 4000);
|
|
UpdateControl();
|
|
}
|
|
//}
|
|
|
|
}
|
|
}
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
void SUISystemKeymappingChild::PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam )
|
|
{
|
|
switch( nMessage )
|
|
{
|
|
case KUI_MESSAGE::KSCROLL_SELECT: // 스크롤 선택
|
|
{
|
|
int nPos = int(lparam);
|
|
nPos = max( nPos, 0 );
|
|
|
|
//_oprint("SUISystemKeymappingChild::PumpUpMessage - nPos %d\n",nPos);
|
|
|
|
if( !_stricmp( lpszControlID, "key_menu_fund_scroll" ) )
|
|
{
|
|
UpdateScrollControl();
|
|
}
|
|
}
|
|
break;
|
|
case KUI_MESSAGE::KCHECK_CHANGE:
|
|
{
|
|
m_pGameManager->StartSound( "ui_button_click.wav" );
|
|
|
|
if( ::_stricmp( "common_checkbox", lpszControlID ) == 0 )
|
|
{ //앤터체팅사용
|
|
KUIControlCheck* pCheck = dynamicCast<KUIControlCheck*>( GetChild(lpszControlID) );
|
|
if( pCheck )
|
|
m_EnterChatMode = !pCheck->GetCheck();
|
|
|
|
if(m_EnterChatMode)
|
|
SetTip(TIPLEVEL::CLICK, "<$1114:엔터채팅모드>",4000);
|
|
else
|
|
SetTip(TIPLEVEL::CLICK, "<$1116:기본채팅>",4000);
|
|
|
|
UpdateControl();
|
|
}
|
|
}
|
|
break;
|
|
case KUI_MESSAGE::KBUTTON_CLICK:
|
|
{
|
|
|
|
if( ::_stricmp( lpszControlID, "button_def" ) == 0 )
|
|
{
|
|
UpdateDef();
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "button_ok" ) == 0 )
|
|
{
|
|
ApplyOption();
|
|
InitPrevKey();
|
|
UpdateControl();
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSTEM, false ) );
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "button_cancel" ) == 0 || ::_stricmp( lpszControlID, "button_close" ) == 0 )
|
|
{
|
|
ApplyCancel();
|
|
InitPrevKey();
|
|
UpdateControl();
|
|
if( ::_stricmp( lpszControlID, "button_cancel" ) == 0 )
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSTEM, false ) );
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "button_apply" ) == 0 )
|
|
{
|
|
ApplyOption();
|
|
}
|
|
|
|
else if( ::_stricmp( lpszControlID, "button_rappelz" ) == 0 )
|
|
{
|
|
UpdateRappelzDef();
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "button_user_open" ) == 0 )
|
|
{
|
|
UserLoad();
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "button_user_save" ) == 0 )
|
|
{
|
|
UserSave();
|
|
}
|
|
// 퀵버튼들..
|
|
else if( ::_stricmp( lpszControlID, "quick_button_menu" ) == 0 )
|
|
{
|
|
QuickScroll("static_slot_1000");
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "quick_button_mouse" ) == 0 )
|
|
{
|
|
QuickScroll("static_slot_2000");
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "quick_button_tip" ) == 0 )
|
|
{
|
|
QuickScroll("static_slot_3000");
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "quick_button_1slot" ) == 0 )
|
|
{
|
|
QuickScroll("static_slot_4000");
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "quick_button_2slot" ) == 0 )
|
|
{
|
|
QuickScroll("static_slot_5000");
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "quick_button_3slot" ) == 0 )
|
|
{
|
|
QuickScroll("static_slot_6000");
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "quick_button_4slot" ) == 0 )
|
|
{
|
|
QuickScroll("static_slot_7000");
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "quick_button_5slot" ) == 0 )
|
|
{
|
|
QuickScroll("static_slot_8000");
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "quick_button_6slot" ) == 0 )
|
|
{
|
|
QuickScroll("static_slot_9000");
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "quick_button_7slot" ) == 0 )
|
|
{
|
|
QuickScroll("static_slot_10000");
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "quick_button_8slot" ) == 0 )
|
|
{
|
|
QuickScroll("static_slot_11000");
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "button_notkeyset" ) == 0 && m_HighlightKeymappingNumber >= 0)
|
|
{
|
|
//아무키도 입력안함으로 만들기...
|
|
int j=m_HighlightKeymappingNumber;
|
|
SetHotkey(j, KEYEX(), false);
|
|
UpdateControl();
|
|
std::string tip2;
|
|
tip2 = GetControlTextName(j);
|
|
tip2 += "<$6987:키는 지정안함 으로 설정하였습니다.>";
|
|
SetTip(TIPLEVEL::READYINPUT, NULL, -1);
|
|
SetTip(TIPLEVEL::CLICK, tip2.c_str(),4000);
|
|
}
|
|
else
|
|
{
|
|
for(int i=0 ;i<KEYMAPPINGCONTROL::KEYMAPPINGCONTROLMAX;i++)
|
|
{
|
|
if( ::_stricmp( lpszControlID, KeymappingInfoList[i].editbuttonid ) == 0 )
|
|
{
|
|
if(KeymappingInfoList[i].hotkeycode == m_HighlightKeymappingNumber)
|
|
{
|
|
//키입력을 취소한것임.
|
|
UpdateControl();
|
|
SetTip(TIPLEVEL::READYINPUT, NULL, -1);
|
|
SetTip(TIPLEVEL::CLICK, "<$6986:키입력을취소하였습니다>",4000);
|
|
}
|
|
else
|
|
{
|
|
UpdateControl(KeymappingInfoList[i].hotkeycode);
|
|
SetTip(TIPLEVEL::READYINPUT, "<$1122:키를입력해주세요>", -1);
|
|
}
|
|
break;
|
|
}
|
|
else if( ::_stricmp( lpszControlID, KeymappingInfoList[i].undobuttonid ) == 0 )
|
|
{
|
|
//이전키값으로 돌리기...
|
|
int j = KeymappingInfoList[i].hotkeycode;
|
|
if(PrevKeyList[j].size() > 0)
|
|
{
|
|
KEYEX tempkey = (PrevKeyList[j].front());
|
|
PrevKeyList[j].pop_front();
|
|
|
|
int overlappingkey = m_GameWorldKeymapping.GetKeymapping(tempkey);
|
|
if(overlappingkey>=0)
|
|
{
|
|
m_GameWorldKeymapping.SetKeymapping(overlappingkey,KEYEX(), true);
|
|
|
|
std::string tip2;
|
|
tip2 = "<#ed1c24><$6906:중복된>";
|
|
tip2 += GetControlTextName(overlappingkey);
|
|
tip2 += "<$6907:는 해제 됩니다.>";
|
|
|
|
SetTip(TIPLEVEL::CLICK,tip2.c_str(),-1);
|
|
}
|
|
else
|
|
{
|
|
SetTip(TIPLEVEL::CLICK,"<$1125:이전키값돌아갔습니다.>",4000);
|
|
}
|
|
|
|
//이전키값으로 돌릴때는 이전키에 저장되지 말아야함으로 그냥 직접 수정해준다..
|
|
m_GameWorldKeymapping.SetKeymapping(j,tempkey,true);
|
|
UpdateControl();
|
|
|
|
|
|
}
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
break;
|
|
|
|
default:
|
|
break;
|
|
}
|
|
|
|
return SUIWnd::PumpUpMessage( lpszControlID, nMessage, lparam, wparam );
|
|
}
|
|
|
|
|
|
DWORD SUISystemKeymappingChild::OnMouseMessage(DWORD dwMessage, int x, int y)
|
|
{
|
|
char *tip = NULL;
|
|
|
|
if( dwMessage == KMOUSE_MOVE )
|
|
{
|
|
|
|
std::list<KUIWnd*> childlist = GetChildList();
|
|
|
|
|
|
for( std::list<KUIWnd*>::iterator itt = childlist.begin(); itt != childlist.end(); ++itt)
|
|
{
|
|
KUIWnd *tmpwnd = (*itt);
|
|
if(!tmpwnd->IsInRect(x,y))
|
|
continue;
|
|
|
|
const char *tmpid = tmpwnd->GetID();
|
|
|
|
if(::_stricmp(tmpid,"button_def")==0) //기본값
|
|
{
|
|
tip = "<$1113:button_def롤오버>";
|
|
}
|
|
else if(::_stricmp(tmpid,"button_rappelz")==0) //기존 라펠즈처럼
|
|
{
|
|
tip = "<$1115:button_rappelz롤오버>";
|
|
}
|
|
else if(::_stricmp(tmpid,"button_user_save")==0) // 사용자키 저장
|
|
{
|
|
tip = "<$1117:button_user_save롤오버>";
|
|
}
|
|
else if(::_stricmp(tmpid,"button_user_open")==0) // 사용자키 불러오기
|
|
{
|
|
tip = "<$6896:button_user_open롤오버>";
|
|
}
|
|
/*else if(::_stricmp(tmpid,"button_ok")==0) // 확인
|
|
{
|
|
tip = "<$1118:button_ok롤오버>";
|
|
}
|
|
else if(::_stricmp(tmpid,"button_cancel")==0) // 취소
|
|
{
|
|
tip = "<$1119:button_cancel롤오버>";
|
|
}
|
|
else if(::_stricmp(tmpid,"static_info_text")==0) // 설명창
|
|
{
|
|
tip = "<$1120:static_info_text롤오버>";
|
|
}
|
|
else if(::_stricmp(tmpid,"button_all_undo")==0) // 전체이전값
|
|
{
|
|
tip = "<$1124:이전키입력버튼롤오버>";
|
|
}*/
|
|
//else if(::_stricmp(tmpid,"static_chatting_option") ==0 || ::_stricmp(tmpid,"common_checkbox") ==0) // 엔터채팅관련
|
|
//{
|
|
//현재 이전 라펠즈상태인지 여부에 따라 text출력이 2개가 아닐까?
|
|
//tip = "<$6908:엔터채팅관련롤오버>";
|
|
//}
|
|
else if(::strncmp(tmpid, "button_key",10) == 0) // 키입력버튼
|
|
{
|
|
//키출력staticbox인가?
|
|
tip = "<$1121:키입력버튼롤오버>";
|
|
}
|
|
else if(::strncmp(tmpid, "static_outbox",13) == 0) // 키출력 static box
|
|
{
|
|
//tip = "!임시!키출력staticbox롤오버";
|
|
//롤오버 없음.
|
|
}
|
|
else if(::strncmp(tmpid, "button_undo",11) == 0) // 이전키
|
|
{
|
|
tip = "<$1124:이전키입력버튼롤오버>";
|
|
}
|
|
}
|
|
|
|
SetTip(TIPLEVEL::ROLLOVER, tip, -1);
|
|
}
|
|
|
|
|
|
|
|
return SUIWnd::OnMouseMessage(dwMessage, x, y);
|
|
}
|
|
|
|
|
|
void SUISystemKeymappingChild::UpdateOption()
|
|
{
|
|
m_EnterChatMode = GetGameOption().IsEnterChat();
|
|
m_GameWorldKeymapping = GetGameKeymapping();
|
|
UpdateControl();
|
|
}
|
|
|
|
|
|
void SUISystemKeymappingChild::UpdateDef()
|
|
{
|
|
m_EnterChatMode = true;
|
|
//m_PrevKeymapping = m_GameWorldKeymapping;
|
|
m_GameWorldKeymapping.SetDefaultKeymapping();
|
|
UpdateControl();
|
|
}
|
|
|
|
|
|
void SUISystemKeymappingChild::UpdateRappelzDef()
|
|
{
|
|
m_EnterChatMode = false;
|
|
//m_PrevKeymapping = m_GameWorldKeymapping;
|
|
m_GameWorldKeymapping.SetPrevRappelzDefaultKeymapping();
|
|
UpdateControl();
|
|
}
|
|
|
|
|
|
void SUISystemKeymappingChild::ApplyOption()
|
|
{
|
|
GetGameKeymapping() = m_GameWorldKeymapping;
|
|
|
|
_OPT_DATA data = GetGameOption().GetOptData();
|
|
data.nEnterChat = m_EnterChatMode;
|
|
GetGameOption().SetOptData(data);
|
|
GetGameKeymapping().EnableMoveKey(data.nEnterChat);
|
|
GetGameOption().Apply( MODE_PLAY );
|
|
m_pGameManager->ApplyOption( MODE_PLAY );
|
|
|
|
GetGameKeymapping().EnterChat(m_EnterChatMode);
|
|
m_pDisplayInfo->SaveKeymmapingInfo_current();
|
|
|
|
UpdateControl();
|
|
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SET_KEYMAPPING() );
|
|
}
|
|
|
|
|
|
void SUISystemKeymappingChild::ApplyCancel()
|
|
{
|
|
UpdateOption();
|
|
}
|
|
|
|
|
|
void SUISystemKeymappingChild::UserSave()
|
|
{
|
|
GetGameSavedKeymapping() = m_GameWorldKeymapping;
|
|
GetGameSavedKeymapping().EnterChat(m_EnterChatMode);
|
|
|
|
m_pDisplayInfo->SaveKeymappingInfo_saved();
|
|
}
|
|
|
|
|
|
void SUISystemKeymappingChild::UserLoad()
|
|
{
|
|
m_EnterChatMode = GetGameSavedKeymapping().IsEnterChat();
|
|
m_GameWorldKeymapping = GetGameSavedKeymapping();
|
|
UpdateControl();
|
|
}
|
|
|
|
|
|
void SUISystemKeymappingChild::AllUndo()
|
|
{
|
|
//m_GameWorldKeymapping = m_PrevKeymapping;
|
|
UpdateControl();
|
|
}
|
|
|
|
|
|
void SUISystemKeymappingChild::QuickScroll(const char *str)
|
|
{
|
|
int var = -1;
|
|
for(int i=0 ;i<KEYMAPPINGCONTROL::KEYMAPPINGCONTROLMAX;i++)
|
|
{
|
|
if( ::_stricmp( str, KeymappingInfoList[i].editbuttonid) == 0
|
|
|| ::_stricmp( str, KeymappingInfoList[i].outboxid) == 0
|
|
|| ::_stricmp( str, KeymappingInfoList[i].undobuttonid) == 0 )
|
|
{
|
|
var = i;
|
|
break;
|
|
}
|
|
|
|
/*
|
|
for(int j=0;j<3;j++)
|
|
{
|
|
KUIWnd *tempwnd = GetChild(KeymappingInfoList[i].editbuttonid[i][j]);
|
|
if(tempwnd)
|
|
{
|
|
if( ::_stricmp( tempwnd->GetID(), str) == 0 )
|
|
{
|
|
var = i;
|
|
break;
|
|
}
|
|
}
|
|
}*/
|
|
}
|
|
|
|
KUIControlScrollBase* scroll = dynamicCast< KUIControlScrollBase* >( GetChild( "key_menu_fund_scroll" ) );
|
|
|
|
if(scroll && var>=0 && m_HighlightKeymappingNumber==-1)
|
|
{
|
|
scroll->SetPosition(var);
|
|
UpdateScrollControl();
|
|
}
|
|
}
|
|
|
|
|
|
void SUISystemKeymappingChild::UpdateScrollControl()
|
|
{
|
|
int cur = 0;
|
|
bool higihlightwnd = true;
|
|
KUIControlScrollBase* scroll = dynamicCast< KUIControlScrollBase* >( GetChild( "key_menu_fund_scroll" ) );
|
|
KUIWnd *highlightwndwnd = GetChild("static_outbox_up");
|
|
KUIWnd *notsetkeywnd = GetChild("button_notkeyset");
|
|
|
|
if(!scroll || !highlightwndwnd || !notsetkeywnd)
|
|
return;
|
|
|
|
if(m_HighlightKeymappingNumber < 0)
|
|
higihlightwnd = false;
|
|
|
|
cur = scroll->GetPosition();
|
|
|
|
|
|
int dy = KeymappingInfoList[cur].original_y - KeymappingInfoList[0].original_y;
|
|
|
|
for(int i=0 ;i<KEYMAPPINGCONTROL::KEYMAPPINGCONTROLMAX;i++)
|
|
{
|
|
bool bvisble = true;
|
|
|
|
if(i<cur)
|
|
bvisble = false;
|
|
|
|
|
|
for(int j=0;j<3;j++)
|
|
{
|
|
KUIWnd *tempwnd = NULL;
|
|
if(j==0) tempwnd = GetChild(KeymappingInfoList[i].editbuttonid);
|
|
else if(j==1) tempwnd = GetChild(KeymappingInfoList[i].outboxid);
|
|
else if(j==2) tempwnd = GetChild(KeymappingInfoList[i].undobuttonid);
|
|
|
|
if(tempwnd)
|
|
{
|
|
if(KeymappingInfoList[i].original_y + tempwnd->GetRect().GetHeight() - dy > GetRect().GetHeight() )
|
|
bvisble = false;
|
|
|
|
tempwnd->SetShow(bvisble);
|
|
|
|
if(bvisble)
|
|
{
|
|
KRect rect = tempwnd->GetRect();
|
|
tempwnd->MovePos(rect.left, GetRect().top + KeymappingInfoList[i].original_y - dy);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if(higihlightwnd)
|
|
{
|
|
KUIWnd *outboxwnd = GetChild(KeymappingInfoList[i].outboxid);
|
|
KUIWnd *undownd = GetChild(KeymappingInfoList[i].undobuttonid);
|
|
int j = KeymappingInfoList[i].hotkeycode;
|
|
if(outboxwnd && undownd && j==m_HighlightKeymappingNumber)
|
|
{
|
|
highlightwndwnd->MovePos(
|
|
outboxwnd->GetRect().left - 4,
|
|
outboxwnd->GetRect().top -4
|
|
);
|
|
notsetkeywnd->MovePos(
|
|
undownd->GetRect().left,
|
|
undownd->GetRect().top
|
|
);
|
|
if(!outboxwnd->IsShow())
|
|
higihlightwnd = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
highlightwndwnd->SetShow(higihlightwnd);
|
|
notsetkeywnd->SetShow(higihlightwnd);
|
|
|
|
}
|
|
|
|
|
|
void SUISystemKeymappingChild::UpdateControl(int highlighthotkeycode)
|
|
{
|
|
//키입력모드로 가기..
|
|
KUIWnd *highlightwndwnd = GetChild("static_outbox_up");
|
|
m_HighlightKeymappingNumber = highlighthotkeycode;
|
|
|
|
if(m_HighlightKeymappingNumber < 0)
|
|
GetGameKeymapping().SkipMode(false);
|
|
else
|
|
GetGameKeymapping().SkipMode(true);
|
|
|
|
|
|
UpdateScrollControl();
|
|
|
|
|
|
//앤터체팅사용
|
|
KUIControlCheck* pCheck = dynamicCast<KUIControlCheck*>( GetChild("common_checkbox") );
|
|
|
|
//기존라펠즈 처럼인지 체크해볼것.
|
|
if( pCheck )
|
|
{
|
|
bool enable = false;
|
|
if(m_GameWorldKeymapping == m_PrevRappelzDefKeymapping)
|
|
enable = true;
|
|
|
|
std::string str;
|
|
KUIControl *tempstaticwnd = dynamicCast<KUIControl *>(GetChild("static_chatting_option"));
|
|
if(enable)
|
|
{
|
|
//기존라펠즈처럼임.
|
|
pCheck->Enable();
|
|
str = "<#c7b299><$6905:일반채팅_사용>";
|
|
|
|
}
|
|
else
|
|
{
|
|
//기존라펠즈처럼 아님
|
|
m_EnterChatMode = true;
|
|
pCheck->Disable();
|
|
//tempstaticwnd->Disable();
|
|
str = "<#545454><$6905:일반채팅_사용>";
|
|
}
|
|
|
|
if(tempstaticwnd)
|
|
{
|
|
tempstaticwnd->SetCaption(str.c_str());
|
|
tempstaticwnd->UpdateCaption();
|
|
}
|
|
|
|
}
|
|
|
|
if( pCheck )
|
|
pCheck->SetCheck( !m_EnterChatMode );
|
|
|
|
|
|
//키맵핑관련 컨트롤들
|
|
for(int i=0 ;i<KEYMAPPINGCONTROL::KEYMAPPINGCONTROLMAX;i++)
|
|
{
|
|
int j = KeymappingInfoList[i].hotkeycode;
|
|
//이전키 관련..
|
|
KUIWnd *undownd = GetChild(KeymappingInfoList[i].undobuttonid);
|
|
if(undownd)
|
|
{
|
|
if(PrevKeyList[j].size() > 0)
|
|
((KUIControl*)undownd)->Enable();
|
|
else
|
|
((KUIControl*)undownd)->Disable();
|
|
|
|
}
|
|
|
|
|
|
//outbox 처리관련
|
|
KUIWnd *outboxwnd = GetChild(KeymappingInfoList[i].outboxid);
|
|
if(outboxwnd)
|
|
{
|
|
std::string caption = "<#ffffff><hcenter><vcenter><size:10>";
|
|
if( m_GameWorldKeymapping.GetHotKeyStringInfo(j).empty())
|
|
{
|
|
caption += "<#626262><$6911:지정안됨!>";
|
|
}
|
|
else
|
|
{
|
|
if(m_HighlightKeymappingNumber ==j )
|
|
caption += "<#626262>";
|
|
caption += m_GameWorldKeymapping.GetHotKeyStringInfo(j).c_str();
|
|
}
|
|
outboxwnd->SetCaption( caption.c_str() );
|
|
((KUIControl*)outboxwnd)->UpdateCaption();
|
|
}
|
|
}
|
|
|
|
//전체이전키관련 관련
|
|
|
|
KUIWnd *allundownd = GetChild("button_all_undo");
|
|
if(allundownd)
|
|
{
|
|
/*if(m_GameWorldKeymapping != m_PrevKeymapping)
|
|
((KUIControl*)allundownd)->Enable();
|
|
else
|
|
((KUIControl*)allundownd)->Disable(); */
|
|
}
|
|
|
|
//사용자저장 버튼 activivate설정.
|
|
/*KUIWnd *saveuserwnd = GetChild("button_user_save");
|
|
if(saveuserwnd)
|
|
{
|
|
if(m_GameWorldKeymapping == GetGameKeymapping() && m_EnterChatMode == GetGameOption().IsEnterChat())
|
|
((KUIControl*)saveuserwnd)->Disable();
|
|
else
|
|
((KUIControl*)saveuserwnd)->Enable();
|
|
}*/
|
|
|
|
//적용버튼 관련..
|
|
KUIWnd *applybuttonwnd = GetChild("button_apply");
|
|
if(applybuttonwnd)
|
|
{
|
|
if(m_GameWorldKeymapping == GetGameKeymapping() && m_EnterChatMode == GetGameOption().IsEnterChat())
|
|
((KUIControl*)applybuttonwnd)->Disable();
|
|
else
|
|
((KUIControl*)applybuttonwnd)->Enable();
|
|
}
|
|
//사용자읽기 버튼 enable설정
|
|
/*
|
|
KUIWnd *saveuserwnd = GetChild("button_user_load");
|
|
if(saveuserwnd)
|
|
{
|
|
if(m_GameWorldKeymapping == GetGameKeymapping() && m_EnterChatMode == GetGameOption().IsEnterChat())
|
|
((KUIControl*)saveuserwnd)->Disable();
|
|
else
|
|
((KUIControl*)saveuserwnd)->Enable();
|
|
}
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
void SUISystemKeymappingChild::SetTip( int level, const char *szTip, int iLifeTime ) // 출력할 팁을 설정한다
|
|
{
|
|
//level은 높을수록 tip출력의 우선권을 갖는다.
|
|
//iLifeTiem == -1 이면 출력 시간에 제약을 받지 않는다.
|
|
//szTip 이 NULL이면 해당 level의 tip을 해제한다.
|
|
|
|
|
|
//Tip출력
|
|
KUIControl* tipcontrol = dynamicCast<KUIControl*>(GetChild( "static_info"));
|
|
if(!tipcontrol)
|
|
return;
|
|
|
|
|
|
if(szTip == NULL && iLifeTime == -1 && m_TipLevel == level)
|
|
{
|
|
m_TipLifeTime = -1;
|
|
m_TipLevel = 999;
|
|
m_szTip = "";
|
|
}
|
|
else if(m_TipLevel >= level)
|
|
{
|
|
m_TipLifeTime = iLifeTime;
|
|
m_TipLevel = level;
|
|
m_szTip = "";
|
|
|
|
if(szTip)
|
|
{
|
|
m_szTip = "<left><size:9><#959595> ";
|
|
m_szTip += szTip;
|
|
}
|
|
}
|
|
|
|
tipcontrol->SetCaption(m_szTip.c_str());
|
|
tipcontrol->UpdateCaption();
|
|
/*{
|
|
std::string tmpsz = "<#959595><hcenter><size:11>";
|
|
if(szTip)
|
|
tmpsz+=szTip;
|
|
|
|
if(::strcmp(tipcontrol->GetCaption(), tmpsz.c_str())==0)
|
|
return;
|
|
}
|
|
|
|
m_szTip = "<#959595><LEFT><size:11> ";
|
|
|
|
if(m_HighlightKeymappingNumber>=0)
|
|
{
|
|
|
|
m_szTip += "<$1122:키대기상태>";
|
|
tipcontrol->SetCaption(m_szTip.c_str());
|
|
tipcontrol->UpdateCaption();
|
|
m_TipLifeTime = -1;
|
|
}
|
|
else if(iLifeTime == 0)
|
|
{
|
|
m_TipLifeTime = -1; // -1상태는
|
|
}
|
|
else if(m_TipLifeTime <= 0 || iLifeTime>0)
|
|
{
|
|
if(szTip )
|
|
m_szTip += szTip;
|
|
m_TipLifeTime = iLifeTime;
|
|
}
|
|
else
|
|
{
|
|
return;
|
|
}*/
|
|
|
|
|
|
|
|
return;
|
|
}
|
|
|
|
|
|
void SUISystemKeymappingChild::Process(DWORD dwTime)
|
|
{
|
|
if(m_PrevTipTime == 0 || m_TipLifeTime<0)
|
|
{
|
|
m_PrevTipTime = dwTime;
|
|
}
|
|
else
|
|
{
|
|
if(m_TipLifeTime == -1)
|
|
{
|
|
}
|
|
else
|
|
{
|
|
if(m_TipLifeTime>0)
|
|
m_TipLifeTime = m_TipLifeTime - (dwTime - m_PrevTipTime);
|
|
|
|
if(m_TipLifeTime<=0)
|
|
{
|
|
SetTip(m_TipLevel, NULL, -1);
|
|
}
|
|
}
|
|
|
|
m_PrevTipTime = dwTime;
|
|
}
|
|
|
|
SUIWnd::Process(dwTime);
|
|
}
|
|
|
|
void SUISystemKeymappingChild::InitPrevKey()
|
|
{
|
|
for(int i=0;i<HOTKEYCODE::MAX;i++)
|
|
{
|
|
PrevKeyList[i].clear();
|
|
}
|
|
}
|
|
//////////////////////////////////////////////////
|
|
//
|
|
// SUISystemInterfaceChild
|
|
// interface
|
|
//
|
|
///////////////////////////////////////////////////
|
|
/*
|
|
bool SUISystemInterfaceChild::InitControls( KPoint kPos )
|
|
{
|
|
KUIControlSimpleButton* pButton = NULL;
|
|
//for( int i = 1; i < 4; i++ )
|
|
//{
|
|
// pButton = ( KUIControlSimpleButton* )GetChild( CStringUtil::StringFormat( "interfaceop_left_button%02d", i ).c_str() );if( pButton ) pButton->SetButtonState( KUIControlSimpleButton::KBUTTON_DISABLE );
|
|
// pButton = ( KUIControlSimpleButton* )GetChild( CStringUtil::StringFormat( "interfaceop_right_button%02d", i ).c_str() );if( pButton ) pButton->SetButtonState( KUIControlSimpleButton::KBUTTON_DISABLE );
|
|
//}
|
|
|
|
SetValidRect( "interfaceop_confirm_button", KRect( 0, 0, -15, 0 ) );
|
|
SetValidRect( "interfaceop_cancle_button", KRect( 20, 0, -20, 0 ) );
|
|
SetValidRect( "interfaceop_apply_button", KRect( 20, 0, -15, 0 ) );
|
|
SetValidRect( "interfaceop_chreset_button", KRect( 0, 0, -18, 0 ) );
|
|
SetValidRect( "interfaceop_interreset_button", KRect( 20, 0, 0, 0 ) );
|
|
|
|
return SUIWnd::InitControls(kPos);
|
|
}
|
|
void SUISystemInterfaceChild::PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam )
|
|
{
|
|
switch(nMessage)
|
|
{
|
|
case KUI_MESSAGE::KBUTTON_CLICK:
|
|
{
|
|
m_pGameManager->PlaySound( "ui_button_click.wav" );
|
|
|
|
//// face cut
|
|
//if( ::_stricmp( lpszControlID, "interfaceop_left_button01" ) == 0 )
|
|
// SetFaceCut( m_nFaceCut-1 );
|
|
//else if( ::_stricmp( lpszControlID, "interfaceop_right_button01" ) == 0 )
|
|
// SetFaceCut( m_nFaceCut+1 );
|
|
//// minimap
|
|
//if( ::_stricmp( lpszControlID, "interfaceop_left_button02" ) == 0 )
|
|
// SetMinimap( m_nMinimap-1 );
|
|
//else if( ::_stricmp( lpszControlID, "interfaceop_right_button02" ) == 0 )
|
|
// SetMinimap( m_nMinimap+1 );
|
|
//// zoom
|
|
//if( ::_stricmp( lpszControlID, "interfaceop_left_button03" ) == 0 )
|
|
// SetZoom( m_nZoom-1 );
|
|
//else if( ::_stricmp( lpszControlID, "interfaceop_right_button03" ) == 0 )
|
|
// SetZoom( m_nZoom+1 );
|
|
|
|
if( ::_stricmp( lpszControlID, "interfaceop_confirm_button" ) == 0 )
|
|
{
|
|
ApplyOption();
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_UI_SYSMENU( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSTEM, false) );
|
|
}
|
|
// 적용
|
|
if( ::_stricmp( lpszControlID, "interfaceop_apply_button" ) == 0 )
|
|
ApplyOption();
|
|
// 취소
|
|
if( ::_stricmp( lpszControlID, "interfaceop_cancle_button" ) == 0 )
|
|
UpdateOption();
|
|
// 채팅 채널 초기화
|
|
if( ::_stricmp( lpszControlID, "interfaceop_chreset_button" ) == 0 )
|
|
InitChattingChannel();
|
|
// 배치 초기화
|
|
if( ::_stricmp( lpszControlID, "interfaceop_interreset_button" ) == 0 )
|
|
InitUI();
|
|
}
|
|
break;
|
|
}
|
|
SUIWnd::PumpUpMessage( lpszControlID, nMessage, lparam, wparam );
|
|
}
|
|
void SUISystemInterfaceChild::InitChattingChannel()
|
|
{
|
|
}
|
|
void SUISystemInterfaceChild::InitUI()
|
|
{
|
|
}
|
|
void SUISystemInterfaceChild::UpdateOption()
|
|
{
|
|
//m_nFaceCut = GetGameOption().GetFaceCut();
|
|
//m_nMinimap = GetGameOption().GetMinimap();
|
|
//m_nZoom = GetGameOption().GetZoom();
|
|
|
|
//STMSG_REQ_SYSTEM_OPTION msg( STMSG_SYSTEM_OPTION::SYSOPTION_FACECUT );
|
|
|
|
//// face cut
|
|
//msg.m_Type = STMSG_SYSTEM_OPTION::SYSOPTION_FACECUT;
|
|
//m_pGameManager->ProcMsgAtStatic( &msg );
|
|
//if( m_nFaceCut != msg.m_nGetOption )
|
|
// m_pGameManager->ProcMsgAtStatic( &STMSG_SYSTEM_OPTION( STMSG_SYSTEM_OPTION::SYSOPTION_FACECUT, m_nFaceCut ) );
|
|
//// minimap
|
|
//msg.m_Type = STMSG_SYSTEM_OPTION::SYSOPTION_MINIMAP;
|
|
//m_pGameManager->ProcMsgAtStatic( &msg );
|
|
//if( m_nMinimap != msg.m_nGetOption )
|
|
// m_pGameManager->ProcMsgAtStatic( &STMSG_SYSTEM_OPTION( STMSG_SYSTEM_OPTION::SYSOPTION_MINIMAP, m_nMinimap ) );
|
|
//// zoom
|
|
//msg.m_Type = STMSG_SYSTEM_OPTION::SYSOPTION_ZOOM;
|
|
//m_pGameManager->ProcMsgAtStatic( &msg );
|
|
//if( m_nZoom != msg.m_nGetOption )
|
|
// m_pGameManager->ProcMsgAtStatic( &STMSG_SYSTEM_OPTION( STMSG_SYSTEM_OPTION::SYSOPTION_ZOOM, m_nZoom ) );
|
|
|
|
//RefreshValue( INTERFACE_FACECUT, m_nFaceCut );
|
|
//RefreshValue( INTERFACE_MINIMAP, m_nMinimap );
|
|
//RefreshValue( INTERFACE_ZOOM, m_nZoom );
|
|
}
|
|
void SUISystemInterfaceChild::ApplyOption()
|
|
{
|
|
//// face cut 게임에 요청
|
|
//if( m_nFaceCut != GetGameOption().GetFaceCut() )
|
|
//{
|
|
// m_pGameManager->ProcMsgAtStatic( &STMSG_SYSTEM_OPTION( STMSG_SYSTEM_OPTION::SYSOPTION_FACECUT, m_nFaceCut ) );
|
|
// RefreshValue( INTERFACE_FACECUT, m_nFaceCut );
|
|
//}
|
|
//// minimap 게임에 요청
|
|
//if( m_nMinimap != GetGameOption().GetMinimap() )
|
|
//{
|
|
// m_pGameManager->ProcMsgAtStatic( &STMSG_SYSTEM_OPTION( STMSG_SYSTEM_OPTION::SYSOPTION_MINIMAP, m_nMinimap ) );
|
|
// RefreshValue( INTERFACE_MINIMAP, m_nMinimap );
|
|
//}
|
|
//// zoom 게임에 요청
|
|
//if( m_nZoom != GetGameOption().GetZoom() )
|
|
//{
|
|
// m_pGameManager->ProcMsgAtStatic( &STMSG_SYSTEM_OPTION( STMSG_SYSTEM_OPTION::SYSOPTION_ZOOM, m_nZoom ) );
|
|
// RefreshValue( INTERFACE_ZOOM, m_nZoom );
|
|
//}
|
|
|
|
//GetGameOption().SetFaceCut( m_nFaceCut );
|
|
//GetGameOption().SetMinimap( m_nMinimap );
|
|
//GetGameOption().SetZoom( m_nZoom );
|
|
|
|
//GetGameOption().Apply( MODE_UI );
|
|
}
|
|
void SUISystemInterfaceChild::ApplyCancel()
|
|
{
|
|
//이전 데이타 복구
|
|
//GetGameOption().SetOptData( m_backData );
|
|
|
|
//UpdateOption(); //재 갱신
|
|
|
|
//GetGameOption().Apply( MODE_ENVIRONMENT );
|
|
//m_pGameManager->ApplyOption( MODE_ENVIRONMENT );
|
|
}
|
|
|
|
void SUISystemInterfaceChild::RefreshValue( int nMode, int nLevel )
|
|
{
|
|
std::string strLevel = "크게";
|
|
std::string strArea = "멀리";
|
|
|
|
switch(nLevel)
|
|
{
|
|
case INTERFACE_SMALL:
|
|
{
|
|
strLevel = "작게";
|
|
strArea = "가까이";
|
|
}
|
|
break;
|
|
case INTERFACE_NORMAL:
|
|
{
|
|
strLevel = "보통";
|
|
strArea = "보통";
|
|
}
|
|
break;
|
|
case INTERFACE_LARGE:
|
|
{
|
|
strLevel = "크게";
|
|
strArea = "멀리";
|
|
}
|
|
break;
|
|
}
|
|
|
|
switch(nMode)
|
|
{
|
|
case GRAPHIC_TEXTURE:
|
|
SetChildCaption( "interfaceop_text01", CStringUtil::StringFormat( "<left>페이스컷: %s", strLevel.c_str() ).c_str() );
|
|
break;
|
|
case GRAPHIC_BACKGROUND:
|
|
SetChildCaption( "interfaceop_text02", CStringUtil::StringFormat( "<left>미니맵: %s", strLevel.c_str() ).c_str() );
|
|
break;
|
|
case GRAPHIC_RESOLUTION:
|
|
SetChildCaption( "interfaceop_text03", CStringUtil::StringFormat( "<left>최대 줌 설정: %s", strArea.c_str() ).c_str() );
|
|
break;
|
|
}
|
|
}
|
|
void SUISystemInterfaceChild::SetFaceCut( int nLevel )
|
|
{
|
|
if( nLevel < INTERFACE_SMALL ) return;
|
|
if( nLevel > INTERFACE_LARGE ) return;
|
|
|
|
m_nFaceCut = nLevel;
|
|
|
|
RefreshValue( INTERFACE_FACECUT, m_nFaceCut );
|
|
}
|
|
void SUISystemInterfaceChild::SetMinimap( int nLevel )
|
|
{
|
|
if( nLevel < INTERFACE_SMALL ) return;
|
|
if( nLevel > INTERFACE_LARGE ) return;
|
|
|
|
m_nMinimap = nLevel;
|
|
|
|
RefreshValue( INTERFACE_MINIMAP, m_nMinimap );
|
|
}
|
|
void SUISystemInterfaceChild::SetZoom( int nLevel )
|
|
{
|
|
if( nLevel < INTERFACE_SMALL ) return;
|
|
if( nLevel > INTERFACE_LARGE ) return;
|
|
|
|
m_nZoom = nLevel;
|
|
|
|
RefreshValue( INTERFACE_ZOOM, m_nZoom );
|
|
}*/ |