From ca014a8e6c54cd12729681b7b0f5270e844733b5 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sat, 18 May 2024 22:59:21 +0800 Subject: [PATCH] [saco] Implement `CDXUTIMEEditBox::EnableImeSystem(...)` --- saco/d3d9/common/DXUTgui.cpp | 15 +++++++++++++++ saco/d3d9/common/DXUTgui.h | 21 +++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/saco/d3d9/common/DXUTgui.cpp b/saco/d3d9/common/DXUTgui.cpp index ea366cf..d967c84 100644 --- a/saco/d3d9/common/DXUTgui.cpp +++ b/saco/d3d9/common/DXUTgui.cpp @@ -177,6 +177,21 @@ HRESULT CDXUTStatic::GetTextCopy( PCHAR strDest, UINT bufferCount ) return S_OK; } + +//-------------------------------------------------------------------------------------- +// CDXUTIMEEditBox class +//-------------------------------------------------------------------------------------- +bool CDXUTIMEEditBox::s_bEnableImeSystem; // Whether the IME system is active + +//-------------------------------------------------------------------------------------- +// Enable/disable the entire IME system. When disabled, the default IME handling +// kicks in. +void CDXUTIMEEditBox::EnableImeSystem( bool bEnable ) +{ + s_bEnableImeSystem = bEnable; +} + + //-------------------------------------------------------------------------------------- void DXUTBlendColor::Init( D3DCOLOR defaultColor, D3DCOLOR disabledColor, D3DCOLOR hiddenColor ) { diff --git a/saco/d3d9/common/DXUTgui.h b/saco/d3d9/common/DXUTgui.h index d9dcad1..2068897 100644 --- a/saco/d3d9/common/DXUTgui.h +++ b/saco/d3d9/common/DXUTgui.h @@ -278,4 +278,25 @@ protected: }; + +//----------------------------------------------------------------------------- +// EditBox control +//----------------------------------------------------------------------------- +class CDXUTEditBox : public CDXUTControl +{ +}; + + +//----------------------------------------------------------------------------- +// IME-enabled EditBox control +//----------------------------------------------------------------------------- + +class CDXUTIMEEditBox : public CDXUTEditBox +{ +public: + + static void EnableImeSystem( bool bEnable ); + +protected: + static bool s_bEnableImeSystem; // Whether the IME system is active #endif // DXUT_GUI_H \ No newline at end of file