| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090 |
- /*
- ** Command & Conquer Renegade(tm)
- ** Copyright 2025 Electronic Arts Inc.
- **
- ** This program is free software: you can redistribute it and/or modify
- ** it under the terms of the GNU General Public License as published by
- ** the Free Software Foundation, either version 3 of the License, or
- ** (at your option) any later version.
- **
- ** This program is distributed in the hope that it will be useful,
- ** but WITHOUT ANY WARRANTY; without even the implied warranty of
- ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ** GNU General Public License for more details.
- **
- ** You should have received a copy of the GNU General Public License
- ** along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- /***********************************************************************************************
- *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
- ***********************************************************************************************
- * *
- * Project Name : LevelEdit *
- * *
- * $Archive:: /Commando/Code/Tools/LevelEdit/ParameterCtrls.h $*
- * *
- * Author:: Patrick Smith *
- * *
- * $Modtime:: 1/22/01 3:14p $*
- * *
- * $Revision:: 25 $*
- * *
- *---------------------------------------------------------------------------------------------*
- * Functions: *
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
- #if defined(_MSC_VER)
- #pragma once
- #endif
- #ifndef __PARAMETER_CTRLS_H
- #define __PARAMETER_CTRLS_H
- #include "presetpicker.h"
- #include "filepicker.h"
- #include "presetpicker.h"
- #include "stringpicker.h"
- #include "parameter.h"
- #include "simpleparameter.h"
- #include "ntree.h"
- #include "bittype.h"
- #include "definitionclassids.h"
- #include "icons.h"
- #include "combatchunkid.h"
- ///////////////////////////////////////////////////////////////////////
- // Forward declarations
- ///////////////////////////////////////////////////////////////////////
- class PresetClass;
- class SpecSheetClass;
- ///////////////////////////////////////////////////////////////////////
- //
- // ParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- ParameterCtrlClass (void)
- : m_IsTemp (false),
- m_IsReadOnly (false) { }
- virtual ~ParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- virtual ParameterClass::Type Get_Type (void) const = 0;
- virtual int Create (HWND parent_wnd, int id_start, LPRECT pos) = 0;
- virtual void Resize (const CRect &rect) = 0;
- virtual void Read_Data (HWND parent_wnd) { };
- virtual bool On_Command (HWND parent_wnd, WPARAM wparam, LPARAM lparam) { return false; }
- virtual bool On_DrawItem (HWND parent_wnd, WPARAM wparam, LPARAM lparam) { return false; }
- virtual void On_Destroy (void) { };
- virtual ParameterClass * Get_Parameter (void) const = 0;
- // Accessors
- bool Is_Temp (void) const { return m_IsTemp; }
- void Set_Is_Temp (bool is_temp) { m_IsTemp = is_temp; }
- bool Is_Read_Only (void) const { return m_IsReadOnly; }
- virtual void Set_Read_Only (bool onoff) { m_IsReadOnly = onoff; }
- virtual bool Is_Modified (void) const { return true; }
- virtual void Set_Spec_Sheet (SpecSheetClass *sheet) { m_SpecSheet = sheet; }
- virtual SpecSheetClass * Get_Spec_Sheet (void) const { return m_SpecSheet; }
- protected:
- ////////////////////////////////////////////////////////////////////
- // Protected member data
- ////////////////////////////////////////////////////////////////////
- bool m_IsTemp;
- bool m_IsReadOnly;
-
- SpecSheetClass * m_SpecSheet;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // StringParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class StringParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- StringParameterCtrlClass (StringParameterClass *param)
- : m_Parameter (param) { }
- virtual ~StringParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_STRING; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
-
- private:
- ////////////////////////////////////////////////////////////////////
- // Private member data
- ////////////////////////////////////////////////////////////////////
- CStatic m_StaticText;
- CEdit m_EditCtrl;
- StringParameterClass * m_Parameter;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // FileParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class FileParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- FileParameterCtrlClass (FilenameParameterClass *param)
- : m_Parameter (param) { }
- virtual ~FileParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_FILENAME; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
- void Get_Current_Value (CString &value) const;
- bool Is_Modified (void) const;
- FilePickerClass & Get_File_Picker (void) { return m_FilePicker; }
-
- protected:
- ////////////////////////////////////////////////////////////////////
- // Protected member data
- ////////////////////////////////////////////////////////////////////
- CStatic m_StaticText;
- FilePickerClass m_FilePicker;
- FilenameParameterClass * m_Parameter;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // StringsDBEntryParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class StringsDBEntryParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- StringsDBEntryParameterCtrlClass (StringsDBEntryParameterClass *param)
- : m_Parameter (param) { }
- virtual ~StringsDBEntryParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_STRINGSDB_ID; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
- protected:
- ////////////////////////////////////////////////////////////////////
- // Protected member data
- ////////////////////////////////////////////////////////////////////
- CStatic m_StaticText;
- StringPickerClass m_StringPicker;
- StringsDBEntryParameterClass * m_Parameter;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // SoundFileParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class SoundFileParameterCtrlClass : public FileParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- SoundFileParameterCtrlClass (SoundFilenameParameterClass *param)
- : FileParameterCtrlClass (param) { }
- virtual ~SoundFileParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_SOUND_FILENAME; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // IntParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class IntParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- IntParameterCtrlClass (IntParameterClass *param)
- : m_Parameter (param) { }
- virtual ~IntParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_INT; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
-
- private:
- ////////////////////////////////////////////////////////////////////
- // Private member data
- ////////////////////////////////////////////////////////////////////
- CStatic m_StaticText1;
- CStatic m_StaticText2;
- CEdit m_EditCtrl;
- CSpinButtonCtrl m_SpinCtrl;
- IntParameterClass * m_Parameter;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // FloatParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class FloatParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- FloatParameterCtrlClass (FloatParameterClass *param)
- : m_Parameter (param) { }
- virtual ~FloatParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_FLOAT; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
-
- private:
- ////////////////////////////////////////////////////////////////////
- // Private member data
- ////////////////////////////////////////////////////////////////////
- CStatic m_StaticText1;
- CStatic m_StaticText2;
- CEdit m_EditCtrl;
- CSpinButtonCtrl m_SpinCtrl;
- FloatParameterClass * m_Parameter;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // AngleParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class AngleParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- AngleParameterCtrlClass (AngleParameterClass *param)
- : m_Parameter (param) { }
- virtual ~AngleParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_ANGLE; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
-
- private:
- ////////////////////////////////////////////////////////////////////
- // Private member data
- ////////////////////////////////////////////////////////////////////
- CStatic m_StaticText1;
- CStatic m_StaticText2;
- CEdit m_EditCtrl;
- CSpinButtonCtrl m_SpinCtrl;
- AngleParameterClass * m_Parameter;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // BoolParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class BoolParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- BoolParameterCtrlClass (BoolParameterClass *param)
- : m_Parameter (param) { }
- virtual ~BoolParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_BOOL; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
-
- private:
- ////////////////////////////////////////////////////////////////////
- // Private member data
- ////////////////////////////////////////////////////////////////////
- CButton m_CheckBoxCtrl;
- BoolParameterClass * m_Parameter;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // Vector3ParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class Vector3ParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- Vector3ParameterCtrlClass (Vector3ParameterClass *param)
- : m_Parameter (param) { }
- virtual ~Vector3ParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_VECTOR3; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
-
- private:
- ////////////////////////////////////////////////////////////////////
- // Private member data
- ////////////////////////////////////////////////////////////////////
- CStatic m_TextCtrls[3];
- CEdit m_EditCtrls[3];
- CSpinButtonCtrl m_SpinCtrls[3];
- CButton m_GroupBox;
- Vector3ParameterClass * m_Parameter;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // Vector2ParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class Vector2ParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- Vector2ParameterCtrlClass (Vector2ParameterClass *param)
- : m_Parameter (param) { }
- virtual ~Vector2ParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_VECTOR2; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
-
- private:
- ////////////////////////////////////////////////////////////////////
- // Private member data
- ////////////////////////////////////////////////////////////////////
- CStatic m_TextCtrls[2];
- CEdit m_EditCtrls[2];
- CSpinButtonCtrl m_SpinCtrls[2];
- CButton m_GroupBox;
- Vector2ParameterClass * m_Parameter;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // RectParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class RectParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- RectParameterCtrlClass (RectParameterClass *param)
- : m_Parameter (param) {}
- virtual ~RectParameterCtrlClass (void) {}
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_RECT; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
-
- private:
- ////////////////////////////////////////////////////////////////////
- // Private member data
- ////////////////////////////////////////////////////////////////////
- CStatic m_TextCtrls[4];
- CEdit m_EditCtrls[4];
- CSpinButtonCtrl m_SpinCtrls[4];
- CButton m_GroupBox;
- RectParameterClass * m_Parameter;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // EnumParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class EnumParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- EnumParameterCtrlClass (EnumParameterClass *param)
- : m_Parameter (param) { }
- virtual ~EnumParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_ENUM; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
-
- private:
- ////////////////////////////////////////////////////////////////////
- // Private member data
- ////////////////////////////////////////////////////////////////////
- CStatic m_StaticText;
- CComboBox m_ComboBox;
- EnumParameterClass * m_Parameter;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // ColorParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class ColorParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- ColorParameterCtrlClass (ColorParameterClass *param)
- : m_Parameter (param),
- m_ButtonID (0) { }
- virtual ~ColorParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_COLOR; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- bool On_Command (HWND parent_wnd, WPARAM wparam, LPARAM lparam);
- bool On_DrawItem (HWND parent_wnd, WPARAM wparam, LPARAM lparam);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
-
- private:
- ////////////////////////////////////////////////////////////////////
- // Private member data
- ////////////////////////////////////////////////////////////////////
- CStatic m_StaticText;
- CButton m_Button;
- ColorParameterClass * m_Parameter;
- int m_ButtonID;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // PhysDefParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class PhysDefParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- PhysDefParameterCtrlClass (PhysDefParameterClass *param)
- : m_Parameter (param),
- m_ButtonID (0) { }
- virtual ~PhysDefParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_PHYSDEFINITIONID; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- bool On_Command (HWND parent_wnd, WPARAM wparam, LPARAM lparam);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
-
- private:
- ////////////////////////////////////////////////////////////////////
- // Private member data
- ////////////////////////////////////////////////////////////////////
- CStatic m_StaticText;
- CButton m_Button;
- PhysDefParameterClass * m_Parameter;
- int m_ButtonID;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // DefParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class DefParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- DefParameterCtrlClass (DefParameterClass *param)
- : m_Parameter (param),
- m_ButtonID (0) { }
- virtual ~DefParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void On_Destroy (void);
- void Read_Data (HWND parent_wnd);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
- protected:
- ////////////////////////////////////////////////////////////////////
- // Protected methods
- ////////////////////////////////////////////////////////////////////
- virtual uint32 Get_Def_Class_ID (void) = 0;
- virtual int Get_Def_Icon (void) = 0;
-
- ////////////////////////////////////////////////////////////////////
- // Protected member data
- ////////////////////////////////////////////////////////////////////
- CStatic m_StaticText;
- PresetPickerClass m_PresetPicker;
- CComboBoxEx m_ComboBox;
- int m_ButtonID;
- DefParameterClass * m_Parameter;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // GenericDefParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class GenericDefParameterCtrlClass : public DefParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- GenericDefParameterCtrlClass (GenericDefParameterClass *param)
- : DefParameterCtrlClass (param) { }
- virtual ~GenericDefParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_GENERICDEFINITIONID; }
- protected:
- ////////////////////////////////////////////////////////////////////
- // Protected methods
- ////////////////////////////////////////////////////////////////////
- virtual uint32 Get_Def_Class_ID (void) { return ((GenericDefParameterClass *)m_Parameter)->Get_Class_ID (); }
- virtual int Get_Def_Icon (void) { return OBJECT_ICON; }
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // GameObjDefParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class GameObjDefParameterCtrlClass : public DefParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- GameObjDefParameterCtrlClass (GameObjDefParameterClass *param)
- : DefParameterCtrlClass (param) { }
- virtual ~GameObjDefParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_GAMEOBJDEFINITIONID; }
- protected:
- ////////////////////////////////////////////////////////////////////
- // Protected methods
- ////////////////////////////////////////////////////////////////////
- virtual uint32 Get_Def_Class_ID (void) { return CLASSID_GAME_OBJECTS; }
- virtual int Get_Def_Icon (void) { return OBJECT_ICON; }
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // WeaponObjDefParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class WeaponObjDefParameterCtrlClass : public GameObjDefParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- WeaponObjDefParameterCtrlClass (WeaponObjDefParameterClass *param)
- : GameObjDefParameterCtrlClass (param) { }
- virtual ~WeaponObjDefParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_WEAPONOBJDEFINITIONID; }
- protected:
- ////////////////////////////////////////////////////////////////////
- // Protected methods
- ////////////////////////////////////////////////////////////////////
- virtual uint32 Get_Def_Class_ID (void) { return CLASSID_DEF_WEAPON; }
- virtual int Get_Def_Icon (void) { return OBJECT_ICON; }
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // AmmoObjDefParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class AmmoObjDefParameterCtrlClass : public GameObjDefParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- AmmoObjDefParameterCtrlClass (AmmoObjDefParameterClass *param)
- : GameObjDefParameterCtrlClass (param) { }
- virtual ~AmmoObjDefParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_AMMOOBJDEFINITIONID; }
- protected:
- ////////////////////////////////////////////////////////////////////
- // Protected methods
- ////////////////////////////////////////////////////////////////////
- virtual uint32 Get_Def_Class_ID (void) { return CLASSID_DEF_AMMO; }
- virtual int Get_Def_Icon (void) { return OBJECT_ICON; }
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // ExplosionObjDefParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class ExplosionObjDefParameterCtrlClass : public GameObjDefParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- ExplosionObjDefParameterCtrlClass (ExplosionObjDefParameterClass *param)
- : GameObjDefParameterCtrlClass (param) { }
- virtual ~ExplosionObjDefParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_EXPLOSIONDEFINITIONID; }
- protected:
- ////////////////////////////////////////////////////////////////////
- // Protected methods
- ////////////////////////////////////////////////////////////////////
- virtual uint32 Get_Def_Class_ID (void) { return CLASSID_DEF_EXPLOSION; }
- virtual int Get_Def_Icon (void) { return OBJECT_ICON; }
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // SoundDefParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class SoundDefParameterCtrlClass : public DefParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- SoundDefParameterCtrlClass (SoundDefParameterClass *param)
- : m_Parameter (param),
- DefParameterCtrlClass (param) { }
- virtual ~SoundDefParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_SOUNDDEFINITIONID; }
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
- protected:
- ////////////////////////////////////////////////////////////////////
- // Protected methods
- ////////////////////////////////////////////////////////////////////
- virtual uint32 Get_Def_Class_ID (void) { return CLASSID_SOUND; }
- virtual int Get_Def_Icon (void) { return SOUND_ICON; }
-
- ////////////////////////////////////////////////////////////////////
- // Protected member data
- ////////////////////////////////////////////////////////////////////
- SoundDefParameterClass * m_Parameter;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // ScriptParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class ScriptParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- ScriptParameterCtrlClass (ScriptParameterClass *param)
- : m_Parameter (param),
- m_ButtonID (0) { }
- virtual ~ScriptParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_SCRIPT; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- bool On_Command (HWND parent_wnd, WPARAM wparam, LPARAM lparam);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
- protected:
- ////////////////////////////////////////////////////////////////////
- // Protected methods
- ////////////////////////////////////////////////////////////////////
- void Fill_Combo (void);
-
- private:
- ////////////////////////////////////////////////////////////////////
- // Private member data
- ////////////////////////////////////////////////////////////////////
- CButton m_Button;
- CButton m_CheckBoxCtrl;
- ScriptParameterClass * m_Parameter;
- int m_ButtonID;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // DefIDListParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class DefIDListParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- DefIDListParameterCtrlClass (DefIDListParameterClass *param)
- : m_Parameter (param),
- m_ButtonID (0) { }
- virtual ~DefIDListParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_DEFINITIONIDLIST; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- bool On_Command (HWND parent_wnd, WPARAM wparam, LPARAM lparam);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
- private:
- ////////////////////////////////////////////////////////////////////
- // Private member data
- ////////////////////////////////////////////////////////////////////
- CButton m_Button;
- CStatic m_StaticText;
- DefIDListParameterClass * m_Parameter;
- int m_ButtonID;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // ZoneParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class ZoneParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- ZoneParameterCtrlClass (ZoneParameterClass *param)
- : m_Parameter (param),
- m_ButtonID (0) { }
- virtual ~ZoneParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_ZONE; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- bool On_Command (HWND parent_wnd, WPARAM wparam, LPARAM lparam);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
- private:
- ////////////////////////////////////////////////////////////////////
- // Private member data
- ////////////////////////////////////////////////////////////////////
- CButton m_Button;
- CStatic m_StaticText;
- ZoneParameterClass * m_Parameter;
- int m_ButtonID;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // FilenameListParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class FilenameListParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- FilenameListParameterCtrlClass (FilenameListParameterClass *param)
- : m_Parameter (param),
- m_ButtonID (0) { }
- virtual ~FilenameListParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_FILENAMELIST; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- void Read_Data (HWND parent_wnd);
- bool On_Command (HWND parent_wnd, WPARAM wparam, LPARAM lparam);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
- private:
- ////////////////////////////////////////////////////////////////////
- // Private member data
- ////////////////////////////////////////////////////////////////////
- CButton m_Button;
- CStatic m_StaticText;
- FilenameListParameterClass * m_Parameter;
- int m_ButtonID;
- };
- ///////////////////////////////////////////////////////////////////////
- //
- // SeparatorParameterCtrlClass
- //
- ///////////////////////////////////////////////////////////////////////
- class SeparatorParameterCtrlClass : public ParameterCtrlClass
- {
- public:
-
- ////////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////////
- SeparatorParameterCtrlClass (SeparatorParameterClass *param)
- : m_Parameter (param) { }
- virtual ~SeparatorParameterCtrlClass (void) { }
- ////////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////////
- ParameterClass::Type Get_Type (void) const { return ParameterClass::TYPE_SEPARATOR; }
- int Create (HWND parent_wnd, int id_start, LPRECT pos);
- void Resize (const CRect &rect);
- ParameterClass * Get_Parameter (void) const { return m_Parameter; };
-
- private:
- ////////////////////////////////////////////////////////////////////
- // Private member data
- ////////////////////////////////////////////////////////////////////
- CStatic m_FrameCtrl;
- CStatic m_TextCtrl;
- SeparatorParameterClass * m_Parameter;
- };
- #endif //__PARAMETER_CTRLS_H
|