Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Administrator
NPLRuntime
Commits
7b9f7221
Commit
7b9f7221
authored
8 years ago
by
LiXizhi
Browse files
Options
Download
Email Patches
Plain Diff
svn_sync
parent
6405f77e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
13 deletions
+30
-13
Client/trunk/ParaEngineClient/2dengine/GUIEdit.cpp
Client/trunk/ParaEngineClient/2dengine/GUIEdit.cpp
+29
-12
npl_packages/main
npl_packages/main
+1
-1
No files found.
Client/trunk/ParaEngineClient/2dengine/GUIEdit.cpp
View file @
7b9f7221
...
...
@@ -1429,30 +1429,47 @@ HRESULT CGUIEditBox::Render(GUIState* pGUIState, float fElapsedTime)
const
char16_t
*
texBuffer
=
NULL
;
static
std
::
u16string
strPassword
;
if
(
m_PasswordChar
==
'\0'
)
bool
bIsEmptyText
=
false
;
LinearColor
oldColor
;
if
(
m_Buffer
.
IsEmpty
()
&&
!
m_bHasFocus
)
{
if
(
m_Buffer
.
IsEmpty
()
&&
!
m_bHasFocus
)
texBuffer
=
m_empty_text
.
c_str
();
else
texBuffer
=
m_Buffer
.
GetBuffer
();
texBuffer
=
m_empty_text
.
c_str
();
if
(
!
m_empty_text
.
empty
())
{
bIsEmptyText
=
true
;
oldColor
=
pFontElement
->
FontColor
;
pFontElement
->
FontColor
.
a
*=
0.25
f
;
}
}
else
{
// in case a password character is specified, we will display it.
int
nSize
=
m_Buffer
.
GetTextSize
();
strPassword
.
resize
(
nSize
,
(
char16_t
)
m_PasswordChar
);
if
(
!
strPassword
.
empty
()
&&
strPassword
[
0
]
!=
((
char16_t
)
m_PasswordChar
))
if
(
m_PasswordChar
==
'\0'
)
{
texBuffer
=
m_Buffer
.
GetBuffer
();
}
else
{
for
(
int
i
=
0
;
i
<
nSize
;
++
i
)
// in case a password character is specified, we will display it.
int
nSize
=
m_Buffer
.
GetTextSize
();
strPassword
.
resize
(
nSize
,
(
char16_t
)
m_PasswordChar
);
if
(
!
strPassword
.
empty
()
&&
strPassword
[
0
]
!=
((
char16_t
)
m_PasswordChar
))
{
strPassword
[
i
]
=
(
char16_t
)
m_PasswordChar
;
for
(
int
i
=
0
;
i
<
nSize
;
++
i
)
{
strPassword
[
i
]
=
(
char16_t
)
m_PasswordChar
;
}
}
texBuffer
=
strPassword
.
c_str
();
}
texBuffer
=
strPassword
.
c_str
();
}
DrawText
(
texBuffer
+
m_nFirstVisible
,
pFontElement
,
&
rcText
,
&
rcWindow
,
m_bUseTextShadow
,
-
1
,
m_textShadowQuality
,
m_textShadowColor
);
if
(
bIsEmptyText
)
{
pFontElement
->
FontColor
=
oldColor
;
}
// Render the selected text
if
(
m_nCaret
!=
m_nSelStart
)
{
...
...
This diff is collapsed.
Click to expand it.
main
@
7d3107d2
Compare
5be059e8
...
7d3107d2
Subproject commit
5be059e846914fc70fbeb5ab4877534d7e3197e2
Subproject commit
7d3107d271ab9c995a0cfcc9b82cccdc1dc30b8a
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment