Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIE-Tool Editor Translation #160

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tool/UIE/DlgBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void CDlgBar::OnButtonBasepath() {
pWnd->GetWindowText(strPath);
}
char szFolder[_MAX_PATH] = "";
char szTitle[] = "���ҽ� base��θ� �������ּ���.";
char szTitle[] = "Please select the resource base path.";

BROWSEINFO bi;
LPCITEMIDLIST lpidl;
Expand Down
6 changes: 3 additions & 3 deletions src/tool/UIE/DlgChangeImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void CDlgChangeImage::OnBBrowseOldFile() {
return;
}
CString szFN_Old = dlg.GetPathName();
szFN_Old.MakeLower(); // �ҹ��ڷ� �����..
szFN_Old.MakeLower();

CString szPath = CN3Base::PathGet().c_str();
szPath.MakeLower();
Expand All @@ -67,10 +67,10 @@ void CDlgChangeImage::OnBBrowseNewFile() {
return;
}
CString szFN_New = dlg.GetPathName();
szFN_New.MakeLower(); // �ҹ��ڷ� �����..
szFN_New.MakeLower();

CString szPath = CN3Base::PathGet().c_str();
szPath.MakeLower(); // �ҹ��ڷ� �����
szPath.MakeLower();
int i = szFN_New.Find(szPath);
if (i >= 0) {
szFN_New = szFN_New.Mid(i + szPath.GetLength());
Expand Down
18 changes: 8 additions & 10 deletions src/tool/UIE/DlgTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ void CDlgTexture::OnSelchangeComboImagetype() {

void CDlgTexture::OnOK() {
ASSERT(m_pTexViewer);
if (m_iImageTypeCount > 0) { // ��� ���� ������ �Ǿ��� üũ
if (m_iImageTypeCount > 0) {
for (int i = 0; i < m_iImageTypeCount; ++i) {
if (-1 == m_pTexViewer->GetImageRect(i).left) {
CString str, strLBText;
m_ImageType.GetLBText(i, strLBText);
str.Format("%s�� ������ ���õ��� �ʾҽ��ϴ�.", strLBText);
str.Format("The area of %s has not been selected.", strLBText);
MessageBox(str);
return;
}
Expand All @@ -130,7 +130,7 @@ void CDlgTexture::OnOK() {
if (-1 != m_pTexViewer->GetSelectedRect().left) {
CDialog::OnOK();
} else {
MessageBox("������ ���� ���� �ʾҽ��ϴ�.");
MessageBox("No area has been selected.");
}
}
}
Expand All @@ -146,7 +146,7 @@ void CDlgTexture::OnRadioSelect() {
return;
}
CTexViewer::eEDITMODE eEditMode = m_pTexViewer->SetEditMode(CTexViewer::EDITMODE_SELECT);
if (CTexViewer::EDITMODE_SELECT != eEditMode) { // ��� �ٲٱ� ����
if (CTexViewer::EDITMODE_SELECT != eEditMode) {
UpdateData(TRUE);
m_RadioEditMode = eEditMode;
UpdateData(FALSE);
Expand All @@ -158,7 +158,7 @@ void CDlgTexture::OnRadioZoom() {
return;
}
CTexViewer::eEDITMODE eEditMode = m_pTexViewer->SetEditMode(CTexViewer::EDITMODE_ZOOM);
if (CTexViewer::EDITMODE_ZOOM != eEditMode) { // ��� �ٲٱ� ����
if (CTexViewer::EDITMODE_ZOOM != eEditMode) {
UpdateData(TRUE);
m_RadioEditMode = eEditMode;
UpdateData(FALSE);
Expand All @@ -179,7 +179,7 @@ void CDlgTexture::OnRadioHand() {
return;
}
CTexViewer::eEDITMODE eEditMode = m_pTexViewer->SetEditMode(CTexViewer::EDITMODE_HAND);
if (CTexViewer::EDITMODE_HAND != eEditMode) { // ��� �ٲٱ� ����
if (CTexViewer::EDITMODE_HAND != eEditMode) {
UpdateData(TRUE);
m_RadioEditMode = eEditMode;
UpdateData(FALSE);
Expand Down Expand Up @@ -225,7 +225,6 @@ LRESULT CDlgTexture::OnUpdateInfo(WPARAM wParam, LPARAM lParam) {
return 0;
}

// control�� �ٽ� ��ġ
void CDlgTexture::Resize() {
CWnd * pOKBtn = GetDlgItem(IDOK);
CWnd * pCancelBtn = GetDlgItem(IDCANCEL);
Expand All @@ -238,7 +237,7 @@ void CDlgTexture::Resize() {
pWnd = GetDlgItem(IDC_STATIC_INFO);
pWnd->GetWindowRect(&rc);

// texture window ��ġ
// texture window
int iTexViewerWidth = rcClient.Width() - rc.Width() - iOffset;
int iTexViewerHeight = rcClient.Height();
if (iTexViewerWidth < 0) {
Expand All @@ -253,7 +252,6 @@ void CDlgTexture::Resize() {
}
m_pTexViewer->MoveWindow(0, 0, iTexViewerWidth, iTexViewerHeight);

// ��ư�� ��ġ
pWnd = GetDlgItem(IDC_STATIC_INFO);
pWnd->GetWindowRect(&rc);
CPoint ptCtrl(rcClient.Width() - rc.Width(), 0);
Expand Down Expand Up @@ -307,7 +305,7 @@ BOOL CDlgTexture::GetSelectedUVRect(struct __FLOAT_RECT * pFRect) const {
return m_pTexViewer->GetSelectedUVRect(pFRect);
}

void CDlgTexture::SetSelectedUVRect(const __FLOAT_RECT * pFRect) // ���� ���õ� UV��ǥ �ֱ�
void CDlgTexture::SetSelectedUVRect(const __FLOAT_RECT * pFRect) // UV symbol for double-crossing
{
if (NULL == m_pTexViewer) {
return;
Expand Down
4 changes: 2 additions & 2 deletions src/tool/UIE/DlgTexture.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CDlgTexture : public CDialog {
public:
void SetTexture(LPCTSTR pszFileName);
BOOL GetSelectedUVRect(struct __FLOAT_RECT * pFRect) const;
void SetSelectedUVRect(const struct __FLOAT_RECT * pFRect); // ���� ���õ� UV��ǥ �ֱ�
void SetSelectedUVRect(const struct __FLOAT_RECT * pFRect);
CRect GetSelectedRect() const;
void SetImageTypes(int iCount, char ** pszNames);
CRect GetImageRect(int iIndex, __FLOAT_RECT * pUVRect = NULL);
Expand Down Expand Up @@ -75,4 +75,4 @@ class CDlgTexture : public CDialog {
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
13 changes: 5 additions & 8 deletions src/tool/UIE/HierarchyView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void CHierarchyView::OnSelchanged(NMHDR * pNMHDR, LRESULT * pResult) {

CN3UIBase * pUI = (CN3UIBase *)GetTreeCtrl().GetItemData(hItem);
if (0 == ::_IsKeyDown(VK_CONTROL)) {
GetDocument()->SetSelectedUI(NULL); // ��Ʈ�� Ű�� �ȴ�������.. �ܵ� ����Ʈ..
GetDocument()->SetSelectedUI(NULL);
}
GetDocument()->SetSelectedUI(pUI);

Expand All @@ -121,7 +121,6 @@ void CHierarchyView::OnRclick(NMHDR * pNMHDR, LRESULT * pResult) {
/////////////////////////////////////////////////////////////////////////////
// CHierarchyView Operations

// ��� tree item ���� �����ϱ�
void CHierarchyView::UpdateAllInfo() {
GetTreeCtrl().DeleteAllItems();

Expand All @@ -130,7 +129,6 @@ void CHierarchyView::UpdateAllInfo() {
this->SelectObject(TVI_ROOT, GetDocument()->GetSelectedUI());
}

// tree item ���� �����ϱ�
void CHierarchyView::UpdateTreeItem(HTREEITEM hParent, CN3UIBase * pUIBase) {
if (pUIBase == NULL) {
return;
Expand All @@ -145,7 +143,7 @@ void CHierarchyView::UpdateTreeItem(HTREEITEM hParent, CN3UIBase * pUIBase) {
break;
case UI_TYPE_BUTTON: {
str = _T("Button");
if (pParentUI && UI_TYPE_SCROLLBAR == pParentUI->UIType()) { // �θ� ��ũ���� ��ư�� ���
if (pParentUI && UI_TYPE_SCROLLBAR == pParentUI->UIType()) {
if (CN3UIScrollBar::BTN_LEFTUP == pUIBase->GetReserved()) {
str = _T("Left/Up Button");
} else if (CN3UIScrollBar::BTN_RIGHTDOWN == pUIBase->GetReserved()) {
Expand All @@ -165,7 +163,7 @@ void CHierarchyView::UpdateTreeItem(HTREEITEM hParent, CN3UIBase * pUIBase) {
break;
}
if (UI_TYPE_IMAGE == pParentUI->UIType()) {
ASSERT(UISTYLE_IMAGE_ANIMATE & pParentUI->m_dwStyle); // �θ�� �ݵ�� Animate image���� �Ѵ�.
ASSERT(UISTYLE_IMAGE_ANIMATE & pParentUI->m_dwStyle);
str.Format("Image (%d)", pUIBase->GetReserved());
} else if (UI_TYPE_BUTTON == pParentUI->UIType()) {
if (CN3UIButton::BS_NORMAL == pUIBase->GetReserved()) {
Expand Down Expand Up @@ -227,10 +225,10 @@ void CHierarchyView::UpdateTreeItem(HTREEITEM hParent, CN3UIBase * pUIBase) {
}

str += " - ";
str += pUIBase->m_szID.c_str(); // �̸��� �ٿ��ش�... !!
str += pUIBase->m_szID.c_str();

HTREEITEM hItem = GetTreeCtrl().InsertItem(str, hParent); // insert
GetTreeCtrl().SetItemData(hItem, (DWORD)pUIBase); // pointer ����
GetTreeCtrl().SetItemData(hItem, (DWORD)pUIBase); // pointer
GetTreeCtrl().Expand(hItem, TVE_EXPAND); // expand

// update child
Expand All @@ -240,7 +238,6 @@ void CHierarchyView::UpdateTreeItem(HTREEITEM hParent, CN3UIBase * pUIBase) {
}
}

// UIBase �����ͷ� tree item �����ϱ�
void CHierarchyView::SelectObject(HTREEITEM hItem, CN3UIBase * pUIBase) {
if (NULL == pUIBase || NULL == hItem) {
return;
Expand Down
6 changes: 3 additions & 3 deletions src/tool/UIE/HierarchyView.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class CHierarchyView : public CTreeView {
// Operations
public:
protected:
void UpdateAllInfo(); // ��� tree item ���� �����ϱ�
void UpdateTreeItem(HTREEITEM hParent, CN3UIBase * pUIBase); // tree item ���� �����ϱ�
void SelectObject(HTREEITEM hItem, CN3UIBase * pUIBase); // UPBase �����ͷ� tree item �����ϱ�
void UpdateAllInfo();
void UpdateTreeItem(HTREEITEM hParent, CN3UIBase * pUIBase);
void SelectObject(HTREEITEM hItem, CN3UIBase * pUIBase);

public:
// Overrides
Expand Down
28 changes: 14 additions & 14 deletions src/tool/UIE/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,31 +63,31 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) {
}

if (!m_wndToolBar.CreateEx(this) || !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) {
TRACE0("Failed to create toolbar\n");
TRACE0("Failed to create toolbar.\n");
return -1; // fail to create
}
if (!m_wndDlgBar.Create(IDR_MAINFRAME, this))
// if (!m_wndDlgBar.Create(this, IDR_MAINFRAME,
// CBRS_ALIGN_TOP, AFX_IDW_DIALOGBAR))
{
TRACE0("Failed to create dialogbar\n");
TRACE0("Failed to create dialogbar.\n");
return -1; // fail to create
}

if (!m_wndReBar.Create(this) || !m_wndReBar.AddBar(&m_wndToolBar) || !m_wndReBar.AddBar(&m_wndDlgBar)) {
TRACE0("Failed to create rebar\n");
TRACE0("Failed to create rebar.\n");
return -1; // fail to create
}

if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators) / sizeof(UINT))) {
TRACE0("Failed to create status bar\n");
TRACE0("Failed to create status bar.\n");
return -1; // fail to create
}

// TODO: Remove this if you don't want tool tips
m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY);

// Engine ����
// Engine
//m_Eng.InitEnv();
if (!m_Eng.Init(TRUE, GetRightPane()->m_hWnd, 64, 64, 0, TRUE)) {
return -1;
Expand Down Expand Up @@ -118,15 +118,15 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) {

BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext * pContext) {
// create splitter window
// if (!m_wndSplitter.CreateStatic(this, 1, 2))
// return FALSE;
/* if (!m_wndSplitter.CreateStatic(this, 1, 2))
return FALSE;

// if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CHierarchyView), CSize(100, 100), pContext) ||
// !m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CUIEView), CSize(100, 100), pContext))
// {
// m_wndSplitter.DestroyWindow();
// return FALSE;
// }
if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CHierarchyView), CSize(100, 100), pContext) ||
!m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CUIEView), CSize(100, 100), pContext))
{
m_wndSplitter.DestroyWindow();
return FALSE;
}*/

CRect rc;
GetClientRect(rc);
Expand Down Expand Up @@ -267,7 +267,7 @@ void CMainFrame::OnDestroy() {
}

void CMainFrame::EnableAccelerator(BOOL bEnable) {
// ó�� ȣ��Ǹ� ���� Accel table �����س���

if (NULL == m_hDefaultAccelTable) {
m_hDefaultAccelTable = m_hAccelTable;
}
Expand Down
Loading