📄 guiapppassword.cpp
字号:
#include "guiapppassword.h"
GUIAppPassword::GUIAppPassword(int id, float x, float y, float w, hgeFont *fnt, char* str ) : GUIAppEdit(id, x, y, w, fnt, str ) {
}
void GUIAppPassword::Render() {
hge->Gfx_RenderLine(rect.x1, rect.y1, rect.x2, rect.y1, frameColor);
hge->Gfx_RenderLine(rect.x2, rect.y1, rect.x2, rect.y2, frameColor);
hge->Gfx_RenderLine(rect.x2, rect.y2, rect.x1, rect.y2, frameColor);
hge->Gfx_RenderLine(rect.x1, rect.y2, rect.x1, rect.y1, frameColor);
m_Font->SetColor(textColor);
char tmpstr[1024];
memset(tmpstr,'*',strlen(m_Text));
tmpstr[strlen(m_Text)] = 0;
m_Font->Render(rect.x1 + 2, rect.y1 + 2, tmpstr);
if (m_Focus && m_Blink) {
char tmp[1024];
strncpy(tmp, tmpstr, m_Pos);
tmp[m_Pos] = 0;
float p = m_Font->GetStringWidth(tmp);
hge->Gfx_RenderLine(rect.x1 + 2 + p, rect.y1 + 2, rect.x1 + 2 + p, rect.y2 - 2, 0xFFFFFFFF);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -