public void SetUp() { anchoring = new AnchoringState(); control = new Button(new Rectangle(0.1f, 0.2f, 0.3f, 0.4f)); landscapeControl = new Button(new Rectangle(0.0f, 0.0f, 0.6f, 0.5f)); portraitControl = new Button(new Rectangle(0.0f, 0.0f, 0.4f, 0.5f)); }
internal void RefreshDrawAreaIfAnchored() { DrawArea = AnchoringState.CalculateDrawArea(this); }
private static AnchoringState LoadAnchoringState(BinaryReader reader, byte[] versionBytes) { var state = new AnchoringState { TopMargin = LoadMargin(reader), BottomMargin = LoadMargin(reader), LeftMargin = LoadMargin(reader), RightMargin = LoadMargin(reader), PercentageSpan = reader.ReadSingle(), NoIdea = reader.ReadInt32() }; return state; }