コード例 #1
0
ファイル: View.cs プロジェクト: 0000duck/CsLuaConverter
 private static void CloneRow(IGrindOMeterTrackingRow targetRow, IGrindOMeterTrackingRow templateRow)
 {
     targetRow.Id = templateRow.Id;
     targetRow.Name.SetText(templateRow.Name.GetText());
     targetRow.IconTexture.SetTexture(templateRow.IconTexture.GetTexture());
     targetRow.Amount.SetText(templateRow.Amount.GetText());
     targetRow.Velocity.SetText(templateRow.Velocity.GetText());
 }
コード例 #2
0
        private static void ValidateAnchor(IFrame expectedAnchorContainer, IGrindOMeterTrackingRow row)
        {
            Assert.AreEqual(2, row.GetNumPoints());

            var point1 = row.GetPoint(1);

            Assert.AreEqual(FramePoint.TOPLEFT, point1.Value1);
            Assert.AreEqual(expectedAnchorContainer, point1.Value2);
            Assert.AreEqual(FramePoint.TOPLEFT, point1.Value3);
            Assert.AreEqual(0, point1.Value4);
            Assert.AreEqual(0, point1.Value5);

            var point2 = row.GetPoint(2);

            Assert.AreEqual(FramePoint.TOPRIGHT, point2.Value1);
            Assert.AreEqual(expectedAnchorContainer, point1.Value2);
            Assert.AreEqual(FramePoint.TOPRIGHT, point2.Value3);
            Assert.AreEqual(0, point2.Value4);
            Assert.AreEqual(0, point2.Value5);
        }
コード例 #3
0
ファイル: View.cs プロジェクト: 0000duck/CsLuaConverter
        private void ApplyTrackingEntityHandlersToRow(IGrindOMeterTrackingRow row)
        {
            var parent = (IGrindOMeterTrackingRow)row.ResetButton.GetParent();

            row.ResetButton.SetScript(ButtonHandler.OnClick, (button) =>
            {
                if (this.onReset != null)
                {
                    this.onReset(parent.Id);
                }
            });

            row.RemoveButton.SetScript(ButtonHandler.OnClick, (button) =>
            {
                if (this.onRemove != null)
                {
                    this.onRemove(parent.Id);
                }
            });
        }