AVA2 Windows parity passes 26-29: background, grp/net/player/app complete port, 0 placeholders, portable assets
This commit is contained in:
@@ -65,6 +65,15 @@ namespace UI
|
||||
if (w) *w = (int)m_text.length() * 6;
|
||||
if (h) *h = 12;
|
||||
}
|
||||
void SetOutLineColor(float r, float g, float b, float a) {
|
||||
auto c = [](float v) { return DWORD(std::clamp(v, 0.0f, 1.0f) * 255.0f + 0.5f); };
|
||||
m_outlineColor = (c(a) << 24) | (c(r) << 16) | (c(g) << 8) | c(b);
|
||||
}
|
||||
int PixelPositionToCharacterPosition(int pixelPos) const {
|
||||
if (pixelPos <= 0) return 0;
|
||||
int charPos = pixelPos / 6;
|
||||
return std::min<int>(charPos, (int)m_text.length());
|
||||
}
|
||||
void SetPosition(float fx, float fy) { m_v2Position.x = fx; m_v2Position.y = fy; }
|
||||
D3DXVECTOR2 GetPosition() const { return m_v2Position; }
|
||||
void Update() {}
|
||||
@@ -77,6 +86,7 @@ namespace UI
|
||||
std::string m_text;
|
||||
std::string m_font;
|
||||
DWORD m_color = 0xffffffff;
|
||||
DWORD m_outlineColor = 0xff000000;
|
||||
int m_hAlign = HORIZONTAL_ALIGN_LEFT;
|
||||
int m_vAlign = VERTICAL_ALIGN_TOP;
|
||||
int m_max = 0;
|
||||
|
||||
Reference in New Issue
Block a user