Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY authored Jun 7, 2024
1 parent 98c7c61 commit caec557
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/xrUICore/Static/UIStaticItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ CUIStaticItem::CUIStaticItem()
uFlags.zero();
vSize.set(0, 0);
TextureRect.set(0, 0, 0, 0);
eMirrorMode = tmNone;
vHeadingPivot.set(0, 0);
vHeadingOffset.set(0, 0);
dwColor = 0xffffffff;
Expand Down
12 changes: 6 additions & 6 deletions src/xrUICore/Static/UIStaticItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
#include "xrCore/xrstring.h"
#endif

enum EUIMirroring
enum cls EUIMirroring
{
tmNone,
tmMirrorHorisontal,
tmMirrorVertical,
tmMirrorBoth
None,
Horisontal,
Vertical,
Both
};

class XRUICORE_API CUIStaticItem
Expand All @@ -30,7 +30,7 @@ class XRUICORE_API CUIStaticItem
Fvector2 vHeadingPivot;
Fvector2 vHeadingOffset;
Flags8 uFlags;
EUIMirroring eMirrorMode;
EUIMirroring eMirrorMode{};

ui_shader hShader;
Fvector2 vPos;
Expand Down
8 changes: 4 additions & 4 deletions src/xrUICore/XML/UIXmlInitBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ bool CUIXmlInitBase::InitStatic(CUIXml& xml_doc, pcstr path, int index, CUIStati
InitTexture(xml_doc, path, index, pWnd);
InitTextureOffset(xml_doc, path, index, pWnd);

shared_str mirroring = xml_doc.ReadAttrib(path, index, "mirror", "");
cpcstr mirroring = xml_doc.ReadAttrib(path, index, "mirror", "");
if (0 == xr_strcmp(mirroring, "h"))
pWnd->GetStaticItem()->SetMirrorMode(tmMirrorHorisontal);
pWnd->GetStaticItem()->SetMirrorMode(EUIMirroring::Horisontal);
else if (0 == xr_strcmp(mirroring, "v"))
pWnd->GetStaticItem()->SetMirrorMode(tmMirrorVertical);
pWnd->GetStaticItem()->SetMirrorMode(EUIMirroring::Vertical);
else if (0 == xr_strcmp(mirroring, "b"))
pWnd->GetStaticItem()->SetMirrorMode(tmMirrorBoth);
pWnd->GetStaticItem()->SetMirrorMode(EUIMirroring::Both);

const int flag = xml_doc.ReadAttribInt(path, index, "heading", 0);
pWnd->EnableHeading((flag) ? true : false);
Expand Down

0 comments on commit caec557

Please sign in to comment.