29 #include "../../idlib/precompiled.h"
32 #include "../../sys/win32/rc/guied_resource.h"
33 #include "../common/ColorButton.h"
34 #include "../common/MaskEdit.h"
56 virtual bool Init (
void );
123 state = atol( temp ) ?
true :
false;
155 switch ( LOWORD(wParam) )
158 if ( HIWORD(wParam) == EN_CHANGE )
184 ZeroMemory ( &col,
sizeof(col) );
185 col.lStructSize =
sizeof(col);
187 col.hwndOwner =
mPage;
188 col.hInstance =
NULL;
189 col.Flags = CC_RGBINIT;
191 if ( ChooseColor ( &col ) )
255 bool matcolor =
false;
271 if ( val >= 0.999
f && val <= 1.001
f )
282 if ( val >= 0.999
f && val <= 1.001
f )
293 mDict->
Set (
"variablebackground",
"1" );
314 mDict->
Set (
"backcolor",
StringFromVec4 (
idVec4((
float)GetRValue ( color ) / 255.0
f, (
float)GetGValue ( color ) / 255.0
f, (
float)GetBValue ( color ) / 255.0
f, (
float)GetRValue(alpha )/255.0
f ) ) );
327 mDict->
Set (
"bordersize",
va(
"%d", atoi(temp) ) );
336 mDict->
Set (
"bordercolor",
StringFromVec4 (
idVec4((
float)GetRValue ( color ) / 255.0
f, (
float)GetGValue ( color ) / 255.0
f, (
float)GetBValue ( color ) / 255.0
f, (
float)GetRValue(alpha )/255.0
f ) ) );
364 mDict->
Set (
"matcolor",
StringFromVec4 (
idVec4((
float)GetRValue ( color ) / 255.0
f, (
float)GetGValue ( color ) / 255.0
f, (
float)GetBValue ( color ) / 255.0
f, (
float)GetRValue(alpha )/255.0
f ) ) );
381 virtual bool Init (
void );
423 if ( folders->
GetFile(i)[0] ==
'.' ) {
487 switch ( LOWORD(wParam) )
503 ZeroMemory ( &col,
sizeof(col) );
504 col.lStructSize =
sizeof(col);
506 col.hwndOwner =
mPage;
507 col.hInstance =
NULL;
508 col.Flags = CC_RGBINIT;
510 if ( ChooseColor ( &col ) )
582 mDict->
Set (
"forecolor",
StringFromVec4 (
idVec4((
float)GetRValue ( color ) / 255.0f, (
float)GetGValue ( color ) / 255.0f, (
float)GetBValue ( color ) / 255.0f, (
float)GetRValue(alpha )/255.0f ) ) );
635 char fontName[MAX_PATH];
669 virtual bool Init (
void );
706 SetWindowText ( hwnd,
"New Item Key" );
709 SetWindowLong ( hwnd, GWL_USERDATA, lParam );
714 switch ( LOWORD(wParam) )
726 if ( strlen ( key ) < 1 )
736 EndDialog ( hwnd, 1);
742 EndDialog ( hwnd, 0 );
757 NMHDR* nm = (NMHDR*) lParam;
762 if ( nm->code == LVN_ITEMCHANGED )
764 NMLISTVIEW* nmlv = (NMLISTVIEW*) nm;
765 if ( nmlv->uNewState & LVIS_SELECTED )
784 switch ( LOWORD(wParam) )
815 ZeroMemory ( &item,
sizeof(item) );
816 item.mask = LVIF_TEXT|LVIF_PARAM;
817 item.iItem = ListView_GetItemCount ( list );
819 item.lParam = (
LONG) key;
820 int index = ListView_InsertItem ( list, &item );
823 ListView_SetItemText ( list, index, 1, (LPSTR)finalValue.
c_str ( ) );
839 int index = ListView_GetNextItem ( list, -1, LVNI_SELECTED );
844 item.mask = LVIF_PARAM;
845 ListView_GetItem ( list, &item );
872 ListView_SetItemText ( list, index, 0, (LPSTR)key->
GetKey().
c_str() );
875 ListView_SetItemText ( list, index, 1, (LPSTR)finalValue.
c_str() );
886 int index = ListView_GetNextItem ( list, -1, LVNI_SELECTED );
891 item.mask = LVIF_PARAM;
892 ListView_GetItem ( list, &item );
898 ListView_DeleteItem ( list, index );
926 GetClientRect ( list, &rWindow );
929 ListView_SetExtendedListViewStyle ( list, LVS_EX_FULLROWSELECT );
933 col.mask = LVCF_TEXT|LVCF_WIDTH;
934 col.cx = .3 * (rWindow.right - rWindow.left);
936 ListView_InsertColumn ( list, 0, &col );
939 col.pszText =
"Value";
940 col.cx = (rWindow.right - rWindow.left) - col.cx;
941 ListView_InsertColumn ( list, 1, &col );
966 ListView_DeleteAllItems ( list );
976 ZeroMemory ( &item,
sizeof(item) );
977 item.mask = LVIF_TEXT|LVIF_PARAM;
978 item.iItem = ListView_GetItemCount ( list );
980 item.lParam = (
LONG) key;
981 int index = ListView_InsertItem ( list, &item );
986 ListView_SetItemText ( list, index, 1, (LPSTR)value.
c_str() );
1000 virtual bool Init (
void );
1196 PROPSHEETHEADER propsh;
1197 PROPSHEETPAGE propsp[4];
1240 propsh.dwSize =
sizeof(PROPSHEETHEADER);
1242 propsh.dwFlags = PSH_PROPSHEETPAGE|PSH_NOAPPLYNOW|PSH_NOCONTEXTHELP;
1243 propsh.hwndParent = parent;
1244 propsh.pszCaption =
"Item Properties";
1246 propsh.ppsp = (LPCPROPSHEETPAGE)&propsp;
1249 result = PropertySheet ( &propsh ) !=
NULL;
rvGEItemPropsKeysPage(idDict *dictValues, rvGEWindowWrapper *wrapper)
#define IDC_GUIED_ITEMTEXTALIGNY
GLsizei const GLfloat * value
#define IDC_GUIED_ITEMBACKCOLORALPHA
virtual idFileList * ListFiles(const char *relativePath, const char *extension, bool sort=false, bool fullRelativePath=false, const char *gamedir=NULL)=0
assert(prefInfo.fullscreenBtn)
void Delete(const char *key)
#define IDC_GUIED_XSCALE_STATIC
virtual int HandleMessage(UINT msg, WPARAM wParam, LPARAM lParam)
INT_PTR CALLBACK ModifyItemKeyDlg_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
#define IDC_GUIED_ITEMVISIBLE
CONST PIXELFORMATDESCRIPTOR UINT
const idStr & GetKey(void) const
idStr & StripQuotes(void)
#define IDC_GUIED_EDITKEY
int GetNumFiles(void) const
#define IDC_GUIED_ITEMNOCURSOR
#define IDC_GUIED_ITEMBACKCOLOR
EWindowType GetWindowType(void)
rvGEItemPropsImagePage(idDict *dictValues)
#define IDD_GUIED_ITEMPROPS_GENERAL
idFileSystem * fileSystem
const char * StringFromVec4(idVec4 &vec)
virtual int HandleMessage(UINT msg, WPARAM wParam, LPARAM lParam)
#define IDC_GUIED_STATIC_Y
static const char * FloatArrayToString(const float *array, const int length, const int precision)
#define IDC_GUIED_ITEMKEY
#define IDC_GUIED_DELETEKEY
GLuint GLuint GLsizei GLenum type
static const char * WindowTypeToString(EWindowType type)
GLclampf GLclampf GLclampf alpha
#define IDC_GUIED_ITEMMATCOLOR
void Set(const char *key, const char *value)
virtual bool KillActive(void)
#define IDC_GUIED_ITEMVARIABLEBACKGROUND
HINSTANCE GetInstance(void)
#define IDC_GUIED_USEBORDERMATERIAL
virtual int HandleMessage(UINT msg, WPARAM wParam, LPARAM lParam)
void Copy(const idDict &other)
#define IDD_GUIED_ITEMPROPS_TEXT
int Icmp(const char *text) const
idDict & GetStateDict(void)
#define IDD_GUIED_ITEMPROPS_KEYS
virtual bool KillActive(void)
#define IDC_GUIED_USEBORDERCOLOR
#define IDC_GUIED_USEBACKCOLOR
static INT_PTR CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
rvGEItemPropsGeneralPage(idDict *dict, rvGEWindowWrapper::EWindowType type)
virtual bool SetActive(void)
#define IDC_GUIED_ITEMBACKGROUND
bool IsExpression(const char *s)
virtual bool KillActive(void)
bool GEItemPropsDlg_DoModal(HWND parent, idWindow *window, idDict &dict)
rvGEOptions & GetOptions(void)
#define IDC_GUIED_ITEMMATSCALEX
#define IDC_GUIED_ITEMNOCLIP
#define IDD_GUIED_ITEMPROPS_IMAGE
void SetLastOptionsPage(int page)
const char * GetString(const char *key, const char *defaultString="") const
bool GetBool(const char *key, const char *defaultString="0") const
#define IDC_GUIED_ITEMVALUE
rvGEWindowWrapper * mWrapper
#define IDC_GUIED_YSCALE_STATIC
#define IDC_GUIED_ITEMMATCOLORALPHA
void UpdateCheckedStates(void)
#define IDC_GUIED_USETEXT
const char * GetFile(int index) const
bool VerfiyStateKey(const char *name, const char *value, idStr *result=NULL)
#define IDC_GUIED_STATIC_ALIGNMENT
#define IDC_GUIED_ITEMTEXTALIGNX
int MessageBox(const char *text, int flags)
void UpdateCheckedStates(void)
const idStr & GetValue(void) const
#define IDC_GUIED_ITEMTEXTNOWRAP
virtual void FreeFileList(idFileList *fileList)=0
const idKeyValue * FindKey(const char *key) const
#define IDC_GUIED_ITEMBORDERSIZE
#define IDC_GUIED_ITEMTEXT
#define IDC_GUIED_ITEMTEXTALIGN
void UpdateCheckedStates(void)
COLORREF * GetCustomColors(void)
rvGEItemPropsTextPage(idDict *dictValues)
#define IDC_GUIED_ITEMBORDERCOLOR
#define IDC_GUIED_ITEMMATSCALEY
#define IDC_GUIED_ITEMNOTIME
#define IDC_GUIED_STATIC_COLOR
#define IDC_GUIED_ITEMFORECOLOR
#define IDC_GUIED_STATIC_FONT
#define IDC_GUIED_ITEMMATCOLORSTATIC
static rvGEWindowWrapper * GetWrapper(idWindow *window)
#define IDD_GUIED_ITEMKEY
#define IDC_GUIED_ITEMBORDERCOLORALPHA
#define IDC_GUIED_ITEMKEYS
int GetLastOptionsPage(void)
#define IDC_GUIED_USEMATERIAL
#define IDC_GUIED_ITEMTEXTFONT
void Append(const char a)
virtual bool SetActive(void)
#define IDC_GUIED_ITEMTEXTSCALE
virtual bool SetActive(void)
void NumberEdit_Attach(HWND hWnd)
#define IDC_GUIED_STATIC_X
const char * c_str(void) const
virtual bool SetActive(void)
const idKeyValue * GetKeyVal(int index) const
#define IDC_GUIED_ITEMNAME
void MaskEdit_Attach(HWND hWnd, const char *invalid)
#define IDC_GUIED_ITEMBORDERMATERIAL
char * va(const char *fmt,...)
#define IDC_GUIED_ITEMNOEVENTS
int GetNumKeyVals(void) const
#define IDC_GUIED_STATIC_SCALE
#define IDC_GUIED_ITEMFORECOLORALPHA
virtual int HandleMessage(UINT msg, WPARAM wParam, LPARAM lParam)
virtual int HandleMessage(UINT msg, WPARAM wParam, LPARAM lParam)