mirror of https://github.com/AxioDL/metaforce.git
CGuiTextPane: Eliminate implicit float->int conversions
This commit is contained in:
parent
e99e79ac9a
commit
96070f0c89
|
@ -132,23 +132,22 @@ bool CGuiTextPane::TestCursorHit(const zeus::CMatrix4f& vp, const zeus::CVector2
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<CGuiWidget> CGuiTextPane::Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp) {
|
std::shared_ptr<CGuiWidget> CGuiTextPane::Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp) {
|
||||||
CGuiWidgetParms parms = ReadWidgetHeader(frame, in);
|
const CGuiWidgetParms parms = ReadWidgetHeader(frame, in);
|
||||||
zeus::CVector2f dim = zeus::CVector2f::ReadBig(in);
|
const zeus::CVector2f dim = zeus::CVector2f::ReadBig(in);
|
||||||
zeus::CVector3f vec = zeus::CVector3f::ReadBig(in);
|
const zeus::CVector3f vec = zeus::CVector3f::ReadBig(in);
|
||||||
u32 fontId = in.readUint32Big();
|
const u32 fontId = in.readUint32Big();
|
||||||
bool wordWrap = in.readBool();
|
const bool wordWrap = in.readBool();
|
||||||
bool horizontal = in.readBool();
|
const bool horizontal = in.readBool();
|
||||||
EJustification justification = EJustification(in.readUint32Big());
|
const auto justification = EJustification(in.readUint32Big());
|
||||||
EVerticalJustification vJustification = EVerticalJustification(in.readUint32Big());
|
const auto vJustification = EVerticalJustification(in.readUint32Big());
|
||||||
CGuiTextProperties props(wordWrap, horizontal, justification, vJustification);
|
const CGuiTextProperties props(wordWrap, horizontal, justification, vJustification);
|
||||||
zeus::CColor fontCol;
|
zeus::CColor fontCol;
|
||||||
fontCol.readRGBABig(in);
|
fontCol.readRGBABig(in);
|
||||||
zeus::CColor outlineCol;
|
zeus::CColor outlineCol;
|
||||||
outlineCol.readRGBABig(in);
|
outlineCol.readRGBABig(in);
|
||||||
int extentX = in.readFloatBig();
|
const int extentX = static_cast<int>(in.readFloatBig());
|
||||||
int extentY = in.readFloatBig();
|
const int extentY = static_cast<int>(in.readFloatBig());
|
||||||
std::shared_ptr<CGuiTextPane> ret =
|
auto ret = std::make_shared<CGuiTextPane>(parms, sp, dim, vec, fontId, props, fontCol, outlineCol, extentX, extentY);
|
||||||
std::make_shared<CGuiTextPane>(parms, sp, dim, vec, fontId, props, fontCol, outlineCol, extentX, extentY);
|
|
||||||
ret->ParseBaseInfo(frame, in, parms);
|
ret->ParseBaseInfo(frame, in, parms);
|
||||||
ret->InitializeBuffers();
|
ret->InitializeBuffers();
|
||||||
ret->TextSupport().SetText(u"");
|
ret->TextSupport().SetText(u"");
|
||||||
|
|
Loading…
Reference in New Issue