internal override void Display() { if (IsActive) { if (ImGui.Begin("Cargo", ref IsActive, _flags)) { if (_hasCargoAbilityLeft) { CargoListLeft.Display(); ImGui.SameLine(); ImGui.BeginChild("xfer", new System.Numerics.Vector2(100, 200)); ImGui.Text("Transfer"); if (SelectedCargoPannel != null && SelectedCargoPannel.SelectedCargoVM != null) { if (UnselectedCargoPannel.CanStore(SelectedCargoPannel.SelectedCargoVM.CargoableItem.CargoTypeID)) { if (ImGui.Button("x100")) { MoveItems(100); } ImGui.SameLine(); if (ImGui.Button("x10")) { MoveItems(10); } ImGui.SameLine(); if (ImGui.Button("x1")) { MoveItems(1); } if (ImGui.Button("Action Order")) { ActionXferOrder(); } } //else //can't transfer due to target unable to store this type } ImGui.EndChild(); ImGui.SameLine(); if (_hasCargoAbilityRight) { CargoListRight.Display(); ImGui.Text("DeltaV Difference Km/s: " + _dvDifference); ImGui.Text("Max DeltaV Difference Km/s: " + _dvMaxDiff); ImGui.Text("Transfer Rate Kg/h: " + _transferRate); } else { ImGui.Text("Select Entity For Transfer"); } } } ImGui.End(); } }
private void ActionXferOrder() { //create order for items to go to right CargoXferOrder.CreateCommand( _state.Game, _state.Faction, _selectedEntityLeft.Entity, _selectedEntityRight.Entity, CargoListLeft.GetAllToMoveOut()); //create order for items to go to left CargoXferOrder.CreateCommand( _state.Game, _state.Faction, _selectedEntityRight.Entity, _selectedEntityLeft.Entity, CargoListRight.GetAllToMoveOut()); }