29 #include "../../idlib/precompiled.h"
40 static char THIS_FILE[] = __FILE__;
69 CDialog::DoDataExchange(pDX);
82 DDV_MinMaxInt(pDX,
m_nHorz, 1, 64);
84 DDV_MinMaxInt(pDX,
m_nVert, 1, 64);
106 ON_BN_CLICKED(IDCANCEL, OnBtnCancel)
121 ON_EN_KILLFOCUS(IDC_HSCALE, OnKillfocusHscale)
122 ON_EN_KILLFOCUS(
IDC_VSCALE, OnKillfocusVscale)
123 ON_EN_SETFOCUS(IDC_VSCALE, OnSetfocusVscale)
125 ON_EN_SETFOCUS(IDC_EDIT_WIDTH, OnSetfocusEditWidth)
127 ON_EN_SETFOCUS(IDC_EDIT_HEIGHT, OnSetfocusEditHeight)
132 ON_EN_KILLFOCUS(
IDC_ROTATE, OnKillfocusRotate)
133 ON_EN_SETFOCUS(IDC_ROTATE, OnSetfocusRotate)
166 m_strMaterial = g_qeglobals.d_texturewin.texdef.name;
167 patchMesh_t *
p = SinglePatchSelected();
169 m_subdivide = p->explicitSubdivisions;
170 m_strMaterial = p->d_texture->GetName();
176 face_t *selFace =
NULL;
183 selFace = b->brush_faces;
245 if ((nScrollCode != SB_LINEUP) && (nScrollCode != SB_LINEDOWN)) {
249 bool up = (nScrollCode == SB_LINEUP);
252 #define IDC_ROTATEA 0
253 #define IDC_HSCALEA 0
254 #define IDC_VSCALEA 0
255 #define IDC_HSHIFTA 0
256 #define IDC_VSHIFTA 0
258 if (pBar->GetSafeHwnd() == ::GetDlgItem(GetSafeHwnd(),
IDC_ROTATEA)) {
260 }
else if (pBar->GetSafeHwnd() == ::GetDlgItem(GetSafeHwnd(),
IDC_HSCALEA)) {
262 }
else if (pBar->GetSafeHwnd() == ::GetDlgItem(GetSafeHwnd(),
IDC_VSCALEA)) {
264 }
else if (pBar->GetSafeHwnd() == ::GetDlgItem(GetSafeHwnd(),
IDC_HSHIFTA)) {
266 }
else if (pBar->GetSafeHwnd() == ::GetDlgItem(GetSafeHwnd(),
IDC_VSHIFTA)) {
301 LONG lSize =
sizeof(rct);
303 g_dlgSurface.SetWindowPos(
NULL, rct.left, rct.top, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW );
305 g_dlgSurface.ShowWindow(SW_SHOW);
310 g_dlgSurface.ShowWindow(SW_SHOW);
319 PostMessage(
g_surfwin, WM_COMMAND, IDCANCEL, 0);
328 CDialog::OnInitDialog();
354 if (pScrollBar->IsKindOf(RUNTIME_CLASS(CSliderCtrl))) {
355 CSliderCtrl *ctrl =
reinterpret_cast<CSliderCtrl*
>(pScrollBar);
373 CDialog::OnKeyDown(nChar, nRepCnt, nFlags);
413 CDialog::OnDestroy();
422 if (!g_qeglobals.m_bBrushPrimitMode) {
423 common->
Printf(
"Warning : non brush primitive mode call to CSurfaceDlg::GetTexMods broken\n");
436 HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
441 if (CDialog::OnCreate(lpCreateStruct) == -1)
450 return CDialog::PreCreateWindow(cs);
455 NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
461 Patch_NaturalizeSelected(
true);
467 Select_SetTexture (&g_qeglobals.d_texturewin.texdef, &g_qeglobals.d_texturewin.brushprimit_texdef,
false);
468 Patch_NaturalizeSelected();
551 if (pMsg->message == WM_KEYDOWN) {
552 if (pMsg->wParam == VK_RETURN) {
568 return CDialog::PreTranslateMessage(pMsg);
613 Select_FlipTexture(
false);
618 Select_FlipTexture(
true);
CMainFrame * g_pParentWnd
afx_msg void OnSetfocusEditHeight()
afx_msg void OnChangeEditHorz()
afx_msg void OnSetfocusEditWidth()
CSliderCtrl m_wndVerticalSubdivisions
afx_msg void OnSetfocusHscale()
void WINAPI Sys_UpdateWindows(int nBits)
afx_msg void OnBtnPatchreset()
assert(prefInfo.fullscreenBtn)
CONST PIXELFORMATDESCRIPTOR UINT
virtual BOOL PreTranslateMessage(MSG *pMsg)
afx_msg void OnBtnFlipy()
void Face_GetScale_BrushPrimit(face_t *face, float *s, float *t, float *rot)
afx_msg void OnChangeEditVert()
afx_msg void OnCheckSubdivide()
CSpinButtonCtrl m_wndRotate
afx_msg void OnBtnBrushfit()
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
CSliderCtrl m_wndHorzSubdivisions
CSpinButtonCtrl m_wndHeight
#define IDC_CHECK_SUBDIVIDE
CSpinButtonCtrl m_wndVScale
afx_msg void OnKillfocusRotate()
virtual const idMaterial * FindMaterial(const char *name, bool makeDefault=true)=0
bool LoadRegistryInfo(const char *pszName, void *pvBuf, long *plSize)
afx_msg void OnBtnAxial()
afx_msg void OnBtnPatchdetails()
afx_msg void OnBtnCancel()
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void OnKillfocusEditWidth()
bool ByeByeSurfaceDialog()
virtual void DoDataExchange(CDataExchange *pDX)
afx_msg void OnKillfocusEditHeight()
#define IDC_CHECK_ABSOLUTE
CSpinButtonCtrl m_wndHShift
virtual BOOL PreCreateWindow(CREATESTRUCT &cs)
afx_msg void OnDeltaPosSpin(NMHDR *pNMHDR, LRESULT *pResult)
void Select_RotateTexture(float amt, bool absolute)
CPtrArray & g_ptrSelectedFaces
bool SaveRegistryInfo(const char *pszName, void *pvBuf, long lSize)
#define IDC_BTN_PATCHDETAILS
virtual void Printf(const char *fmt,...) id_attribute((format(printf
#define IDC_BTN_PATCHNATURAL
CSpinButtonCtrl m_wndHScale
CSurfaceDlg(CWnd *pParent=NULL)
idDeclManager * declManager
afx_msg void OnBtnFacefit()
void UpdateSpinners(int nScrollCode, int nPos, CScrollBar *pBar)
void UpdateSurfaceDialog()
afx_msg void OnKillfocusVscale()
afx_msg void OnKillfocusHscale()
afx_msg void OnSetfocusRotate()
CSpinButtonCtrl m_wndWidth
#define IDC_BTN_PATCHRESET
afx_msg void OnBtnPatchnatural()
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
virtual BOOL OnInitDialog()
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct)
afx_msg HBRUSH OnCtlColor(CDC *pDC, CWnd *pWnd, UINT nCtlColor)
CSpinButtonCtrl m_wndVShift
afx_msg void OnBtnFlipx()
afx_msg void OnSetfocusVscale()
afx_msg void OnBtnColor()