Exemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            //FAB BUTTON
            ImageView fabIcon = new ImageView(this);

            fabIcon.SetImageResource(Resource.Drawable.add_green);
            FloatingActionButton fab = new FloatingActionButton.Builder(this).SetContentView(fabIcon).Build();

            //BUILDER AND sub buttons
            SubActionButton.Builder builder = new SubActionButton.Builder(this);

            //BUTTON 1
            ImageView saveIcon = new ImageView(this);

            saveIcon.SetImageResource(Resource.Drawable.add_circle);
            SubActionButton saveBtn = builder.SetContentView(saveIcon).Build();

            //BUTTON 2
            ImageView editIcon = new ImageView(this);

            editIcon.SetImageResource(Resource.Drawable.add_note_blue);
            SubActionButton editBtn = builder.SetContentView(editIcon).Build();

            //BUTTON 1
            ImageView deleteIcon = new ImageView(this);

            deleteIcon.SetImageResource(Resource.Drawable.delete_red);
            SubActionButton deleteBtn = builder.SetContentView(deleteIcon).Build();

            //MENU
            fam = new FloatingActionMenu.Builder(this)
                  .AddSubActionView(saveBtn)
                  .AddSubActionView(editBtn)
                  .AddSubActionView(deleteBtn)
                  .AttachTo(fab)
                  .Build();
            //CLICK EVENTS
            saveBtn.Click   += SaveBtn_Click;
            editBtn.Click   += EditBtn_Click;
            deleteBtn.Click += DeleteBtn_Click;
        }
Exemplo n.º 2
0
 public void ChooseAction(SubActionButton chosenButton)
 {
     BattleUIManager.Instance.BeginTargettingForAction(ActionButtonPool.IndexOf(chosenButton));
 }
Exemplo n.º 3
0
 public void ActionSelected(SubActionButton button)
 {
     BattleUIManager.Instance.SetActionSelectionIndex(ActionButtonPool.IndexOf(button));
 }