Ejemplo n.º 1
0
        internal void Display()
        {
            ActiveEntity = _entityState.Entity;
            ImGui.BeginGroup();

            if (ImGui.SmallButton("Pin Camera"))
            {
                _state.Camera.PinToEntity(_entityState.Entity);
                ImGui.CloseCurrentPopup();
            }

            //if entity can move
            if (_entityState.Entity.HasDataBlob <PropulsionDB>())
            {
                if (ImGui.SmallButton("Orbit"))
                {
                    OrbitOrderWindow.GetInstance(_entityState).IsActive = true;
                    _state.ActiveWindow = OrbitOrderWindow.GetInstance(_entityState);
                }
            }
            if (_entityState.Entity.HasDataBlob <FireControlAbilityDB>())
            {
                if (ImGui.SmallButton("Fire Control"))
                {
                    var instance = WeaponTargetingControl.GetInstance(_entityState);
                    instance.SetOrderEntity(_entityState);
                    instance.IsActive   = true;
                    _state.ActiveWindow = instance;
                }
            }
            if (ImGui.SmallButton("Rename"))
            {
                RenameWindow.GetInstance(_entityState).IsActive = true;
                _state.ActiveWindow = RenameWindow.GetInstance(_entityState);
                ImGui.CloseCurrentPopup();
            }
            //if entity can target


            //if entity can mine || refine || build
            //econOrderwindow

            ImGui.EndGroup();
        }
Ejemplo n.º 2
0
 internal override void Display()
 {
     //selectedEntityData
     if (ImGui.Begin("SM", ref IsActive, _flags))
     {
         if (_selectedEntity.Entity != null)
         {
             Entity entity    = _selectedEntity.Entity;
             var    datablobs = entity.DataBlobs;
             ImGui.Text(_selectedEntity.Name);
             foreach (var datablob in datablobs)
             {
                 ImGui.Text(datablob.GetType().Name);
             }
             if (ImGui.Button("AddOrbit"))
             {
                 var pannel = OrbitOrderWindow.GetInstance(_selectedEntity, true);
                 pannel.IsActive     = true;
                 _state.ActiveWindow = pannel;
             }
         }
     }
     ImGui.End();
 }