public void Display()
        {
            var width = ImGui.GetWindowWidth() * 0.5f;

            ImGui.BeginChild(_entityState.Name, new System.Numerics.Vector2(240, 200), true, ImGuiWindowFlags.AlwaysAutoResize);
            foreach (var typeStore in _stores)
            {
                CargoTypeSD stype        = _staticData.CargoTypes[typeStore.Key];
                var         freeVolume   = typeStore.Value.FreeVolume;
                var         maxVolume    = typeStore.Value.MaxVolume;
                var         storedVolume = maxVolume - freeVolume;

                string headerText = stype.Name + " " + Stringify.Volume(freeVolume) + " / " + Stringify.Volume(maxVolume) + " free";
                ImGui.PushID(_entityState.Entity.Guid.ToString());
                if (ImGui.CollapsingHeader(headerText, ImGuiTreeNodeFlags.CollapsingHeader))
                {
                    ImGui.Columns(3);
                    ImGui.Text("Item");
                    ImGui.NextColumn();
                    ImGui.Text("Count");
                    ImGui.NextColumn();
                    ImGui.Text("Total Mass");
                    ImGui.NextColumn();
                    ImGui.Separator();
                    foreach (var cargoType in typeStore.Value.CurrentStoreInUnits)
                    {
                        ICargoable ctype         = typeStore.Value.Cargoables[cargoType.Key];
                        var        cname         = ctype.Name;
                        var        volumeStored  = cargoType.Value;
                        var        volumePerItem = ctype.VolumePerUnit;
                        var        massStored    = cargoType.Value * ctype.MassPerUnit;
                        var        itemsStored   = typeStore.Value.CurrentStoreInUnits[ctype.ID];
                        if (ImGui.Selectable(cname))
                        {
                        }

                        ImGui.NextColumn();
                        ImGui.Text(Stringify.Number(itemsStored));
                        ImGui.NextColumn();
                        ImGui.Text(Stringify.Mass(massStored));
                        ImGui.SetTooltip(Stringify.Volume(volumeStored));
                        ImGui.NextColumn();
                    }

                    ImGui.Columns(1);
                }
            }


            ImGui.EndChild();
        }
Exemple #2
0
        static void GuiCostText(ComponentDesigner componentDesigner) //Prints a 2 col table with the costs of the part
        {
            //ImGui.BeginChild("Cost");
            if (componentDesigner != null) //If a part time is selected
            {
                ImGui.Columns(2);
                ImGui.BeginTabItem("Cost");

                ImGui.Text("Mass");
                ImGui.Text("Volume_km3");
                ImGui.Text("Crew Requred");
                ImGui.Text("Cost");
                ImGui.Text("Research Cost");
                ImGui.Text("Build Cost");
                ImGui.Text("Resource Costs");
                ImGui.NextColumn(); //Add all the cost names to col 1


                ImGui.Text(Stringify.Mass(componentDesigner.MassValue));
                ImGui.Text(Stringify.Volume(componentDesigner.VolumeM3Value));
                ImGui.Text(componentDesigner.CrewReqValue.ToString());
                ImGui.Text(componentDesigner.CreditCostValue.ToString());
                ImGui.Text(componentDesigner.ResearchCostValue.ToString() + " RP");
                ImGui.Text(componentDesigner.IndustryPointCostsValue.ToString() + " BP");
                ImGui.NextColumn(); //Add all the price values to col 2


                foreach (var kvp in componentDesigner.ResourceCostValues)
                {
                    var resource = StaticRefLib.StaticData.CargoGoods.GetAny(kvp.Key);
                    if (resource == null)
                    {
                        resource = (ICargoable)_state.Faction.GetDataBlob <FactionInfoDB>().IndustryDesigns[kvp.Key];
                    }
                    var xpos = ImGui.GetCursorPosX();
                    ImGui.SetCursorPosX(xpos + 12);
                    ImGui.Text(resource.Name);
                    ImGui.NextColumn();
                    ImGui.Text(kvp.Value.ToString());
                    ImGui.NextColumn();
                }
            }

            //ImGui.EndChild();
        }
        public bool Display()
        {
            bool  changes       = false;
            float maxprogradeDV = (float)(_maxDV - Math.Abs(_radialDV));
            float maxradialDV   = (float)(_maxDV - Math.Abs(_progradeDV));

            if (ImGui.SliderFloat("Prograde DV", ref _progradeDV, -maxprogradeDV, maxprogradeDV))
            {
                Calcs();
                changes = true;
            }
            if (ImGui.SliderFloat("Radial DV", ref _radialDV, -maxradialDV, maxradialDV))
            {
                Calcs();
                changes = true;
            }

            ImGui.Text("Fuel to burn:" + Stringify.Mass(_fuelToBurn));
            ImGui.Text("Burn time: " + (int)(_fuelToBurn / _fuelRate) + " s");
            ImGui.Text("DeltaV: " + Stringify.Distance(DeltaV.Length()) + "/s of " + Stringify.Distance(_maxDV) + "/s");
            ImGui.Text("Eccentricity: " + Eccentricity.ToString("g3"));
            return(changes);
        }
        internal override void Display()
        {
            if (IsActive && ImGui.Begin("Ordnance Design"))
            {
                ImGui.Combo("Current Designs", ref _payloadSelectedIndex, _currentDesignNames, _currentDesignNames.Length);

                ImGui.NewLine();
                BorderGroup.BeginBorder("Payload:");
                if (ImGui.Combo("Payload type", ref _payloadSelectedIndex, _payload, _payload.Length))
                {
                    //_selectedPayload = _payloadTypes[_payloadSelectedIndex].GetAttribute<OrdnancePayloadAtb>();
                    _selectedComponentDesigns[_payloadTypes[_payloadSelectedIndex]] = _payloadCount;
                    RefreshMass();
                }
                if (ImGui.SliderInt("Payload Count", ref _payloadCount, 1, 100))
                {
                    _selectedComponentDesigns[_payloadTypes[_payloadSelectedIndex]] = _payloadCount;
                    RefreshMass();
                }
                var whmass = _payloadTypes[_payloadSelectedIndex].Mass * _payloadCount;
                ImGui.Text("Mass: " + Stringify.Mass(whmass));
                //ImGui.Text("Payload Trigger Type: " + _selectedPayload.Trigger);
                BorderGroup.EndBoarder();
                ImGui.NewLine();

                BorderGroup.BeginBorder("Electronics Suite:");
                if (ImGui.Combo("ElectronicsSuite", ref _electronicsSelectedIndex, _electronicsPackage, _electronicsPackage.Length))
                {
                    _selectedComponentDesigns[_eleccPackTypes[_electronicsSelectedIndex]] = 1;
                    RefreshMass();
                }
                var mass = _eleccPackTypes[_electronicsSelectedIndex].Mass;
                ImGui.Text("Mass: " + Stringify.Mass(mass));
                BorderGroup.EndBoarder();

                ImGui.NewLine();

                BorderGroup.BeginBorder("Engine:");

                if (ImGui.Combo("Engine Designs", ref _engineSelectedIndex, _engineDesigns, _engineDesigns.Length))
                {
                    ComponentDesign engineDesign = _engineTypes[_engineSelectedIndex];
                    _selectedComponentDesigns[engineDesign] = _engineCount;
                    RefreshMass();
                }
                if (ImGui.SliderInt("Engine Count", ref _engineCount, 1, 256))
                {
                    _selectedComponentDesigns[_engineTypes[_engineSelectedIndex]] = _engineCount;
                    RefreshMass();
                }
                var emass = _engineTypes[_engineSelectedIndex].Mass * _engineCount;
                ImGui.Text("Mass: " + Stringify.Mass(emass));
                BorderGroup.EndBoarder();

                ImGui.NewLine();
                ImGui.Text("Total Mass: " + Stringify.Mass(_totalMass));
                var enginedesign = _engineTypes[_engineSelectedIndex];
                var atb          = enginedesign.GetAttribute <NewtonionThrustAtb>();

                double burnRate      = atb.FuelBurnRate * _engineCount;
                double exaustVel     = atb.ExhaustVelocity;
                double thrustNewtons = burnRate * exaustVel;
                double burnTime      = _fuelKG / burnRate;
                double dv            = OrbitMath.TsiolkovskyRocketEquation(_totalMass, _totalMass - _fuelKG, exaustVel);
                ImGui.Text("Burn Time: " + burnTime + "s");
                ImGui.Text("Thrust: " + Stringify.Thrust(thrustNewtons));
                ImGui.Text("DeltaV: " + Stringify.Velocity(dv));

                ImGui.InputText("Design Name", _designName, (uint)_designName.Length);
                NewDesignButton();
            }
        }
        internal override void Display()
        {
            if (IsActive && ImGui.Begin("Ordnance Design"))
            {
                ImGui.Combo("Current Designs", ref _payloadSelectedIndex, _currentDesignNames, _currentDesignNames.Length);

                ImGui.NewLine();
                BorderGroup.Begin("Payload:");
                if (ImGui.Combo("Payload type", ref _payloadSelectedIndex, _payload, _payload.Length))
                {
                    //_selectedPayload = _payloadTypes[_payloadSelectedIndex].GetAttribute<OrdnancePayloadAtb>();
                    _selectedComponentDesigns[_payloadTypes[_payloadSelectedIndex]] = _payloadCount;
                    RefreshMass();
                }
                if (ImGui.SliderInt("Payload Count", ref _payloadCount, 1, 100))
                {
                    _selectedComponentDesigns[_payloadTypes[_payloadSelectedIndex]] = _payloadCount;
                    RefreshMass();
                }
                var whmass = _payloadTypes[_payloadSelectedIndex].MassPerUnit * _payloadCount;
                ImGui.Text("Mass: " + Stringify.Mass(whmass));
                //ImGui.Text("Payload Trigger Type: " + _selectedPayload.Trigger);
                BorderGroup.End();
                ImGui.NewLine();

                BorderGroup.Begin("Electronics Suite:");
                if (ImGui.Combo("ElectronicsSuite", ref _electronicsSelectedIndex, _electronicsPackage, _electronicsPackage.Length))
                {
                    _selectedComponentDesigns[_eleccPackTypes[_electronicsSelectedIndex]] = 1;
                    RefreshMass();
                }
                var mass = _eleccPackTypes[_electronicsSelectedIndex].MassPerUnit;
                ImGui.Text("Mass: " + Stringify.Mass(mass));
                BorderGroup.End();

                ImGui.NewLine();

                BorderGroup.Begin("Engine:");

                if (ImGui.Combo("Engine Types", ref _engineDesignTypeIndex, _engineTypeNames, _engineTypeNames.Length))
                {
                    _engineDesigner = new ComponentDesigner(_engineTemplates[_engineDesignTypeIndex], _factionTech);
                    _engineDesigner.SetAttributes();
                }

                if (_engineDesigner != null)
                {
                    PartDesignUI.GuiDesignUI(_engineDesigner);
                    _thrusterSizeKG = _engineDesigner.MassValue;
                    RefreshMass();
                }

                if (ImGui.SliderFloat("Fuel", ref _fuelKG, 1, 1000))
                {
                    RefreshMass();
                }

                BorderGroup.End();

                ImGui.NewLine();
                ImGui.Text("Total Mass: " + Stringify.Mass(_totalMass));

                double burnRate  = 0;
                double exaustVel = 0;

                if (_engineDesigner != null)
                {
                    var atb = _engineDesigner.GetAttribute <NewtonionThrustAtb>();
                    burnRate  = atb.FuelBurnRate;
                    exaustVel = atb.ExhaustVelocity;
                }

                double thrustNewtons = burnRate * exaustVel;
                double burnTime      = _fuelKG / burnRate;
                double dv            = OrbitMath.TsiolkovskyRocketEquation(_totalMass, _totalMass - _fuelKG, exaustVel);
                ImGui.Text("Burn Time: " + burnTime + "s");
                ImGui.Text("Thrust: " + Stringify.Thrust(thrustNewtons));
                ImGui.Text("Acceleration (wet): " + Stringify.Velocity(thrustNewtons / _totalMass));
                ImGui.Text("Acceleration (dry): " + Stringify.Velocity(thrustNewtons / (_totalMass - _fuelKG)));
                ImGui.Text("DeltaV: " + Stringify.Velocity(dv));

                ImGui.InputText("Design Name", _designName, (uint)_designName.Length);
                NewDesignButton();
            }
        }
Exemple #6
0
        internal override void Display()
        {
            if (IsActive && ImGui.Begin(_windowname, ref IsActive, _flags))
            {
                GuiDesignUI(); //Part design

                GuiCostText(); //Print cost
                ImGui.End();
            }

            void GuiDesignUI()//Creates all UI elements need for designing the Component
            {
                ImGui.Text("Component Specifications");
                ImGui.SameLine(ImGui.GetWindowWidth() - 70);
                if (ImGui.Button("Compact"))
                {
                    compactmod = !compactmod;
                }


                ImGui.NewLine();

                if (_componentDesigner != null)                                                                         //Make sure comp is selected
                {
                    foreach (ComponentDesignAttribute attribute in _componentDesigner.ComponentDesignAttributes.Values) //For each property of the comp type
                    {
                        ImGui.PushID(attribute.Name);


                        if (attribute.IsEnabled)
                        {
                            switch (attribute.GuiHint) //Either
                            {
                            case GuiHint.None:
                                break;

                            case GuiHint.GuiTechSelectionList:     //Let the user pick a type from a list
                                GuiHintTechSelection(attribute);
                                break;

                            case GuiHint.GuiSelectionMaxMin:     //Set a value
                                GuiHintMaxMin(attribute);
                                break;

                            case GuiHint.GuiTextDisplay:     //Display a stat
                                GuiHintText(attribute);
                                break;

                            case GuiHint.GuiEnumSelectionList:     //Let the user pick a type from a hard coded list
                                GuiHintEnumSelection(attribute);
                                break;

                            case GuiHint.GuiOrdnanceSelectionList:
                                GuiHintOrdnanceSelection(attribute);
                                break;

                            default:
                                throw new ArgumentOutOfRangeException();
                            }
                        }

                        ImGui.PopID();
                    }



                    ImGui.Text("Name");
                    ImGui.InputText("", _nameInputBuffer, 32);
                    if (ImGui.Button("Create Design"))
                    {
                        _componentDesigner.Name = ImGuiSDL2CSHelper.StringFromBytes(_nameInputBuffer);
                        _componentDesigner.CreateDesign(_state.Faction);
                        //we reset the designer here, so we don't end up trying to edit the precious design.
                        var factionTech = _state.Faction.GetDataBlob <FactionTechDB>();
                        _componentDesigner = new ComponentDesigner(_designables[_designType], factionTech);
                    }
                    ImGui.NewLine();
                }
                else//Tell the user they don't have a comp type selected
                {
                    ImGui.NewLine();
                    ImGui.Text("No component type selected");
                    ImGui.NewLine();
                }
            }

            void GuiCostText()//Prints a 2 col table with the costs of the part
            {
                //ImGui.BeginChild("Cost");
                if (_componentDesigner != null)//If a part time is selected
                {
                    ImGui.Columns(2);
                    ImGui.BeginTabItem("Cost");

                    ImGui.Text("Mass");
                    ImGui.Text("Volume_km3");
                    ImGui.Text("Crew Requred");
                    ImGui.Text("Cost");
                    ImGui.Text("Research Cost");
                    ImGui.Text("Build Cost");
                    ImGui.Text("Resource Costs");
                    ImGui.NextColumn();//Add all the cost names to col 1


                    ImGui.Text(Stringify.Mass(_componentDesigner.MassValue));
                    ImGui.Text(Stringify.Volume(_componentDesigner.VolumeM3Value));
                    ImGui.Text(_componentDesigner.CrewReqValue.ToString());
                    ImGui.Text(_componentDesigner.CreditCostValue.ToString());
                    ImGui.Text(_componentDesigner.ResearchCostValue.ToString() + " RP");
                    ImGui.Text(_componentDesigner.IndustryPointCostsValue.ToString() + " BP");
                    ImGui.NextColumn();//Add all the price values to col 2


                    foreach (var kvp in _componentDesigner.ResourceCostValues)
                    {
                        var resource = StaticRefLib.StaticData.CargoGoods.GetAny(kvp.Key);
                        if (resource == null)
                        {
                            resource = (ICargoable)_state.Faction.GetDataBlob <FactionInfoDB>().IndustryDesigns[kvp.Key];
                        }
                        var xpos = ImGui.GetCursorPosX();
                        ImGui.SetCursorPosX(xpos + 12);
                        ImGui.Text(resource.Name);
                        ImGui.NextColumn();
                        ImGui.Text(kvp.Value.ToString());
                        ImGui.NextColumn();
                    }
                }

                //ImGui.EndChild();
            }

            void GuiHintText(ComponentDesignAttribute attribute)
            {
                if (compactmod)
                {
                    ImGui.TextWrapped(attribute.Name + ": " + attribute.Value.ToString() + " " + attribute.Unit);
                    ImGui.NewLine();
                }
                else
                {
                    ImGui.TextWrapped(attribute.Name + ":");
                    ImGui.SameLine();
                    ImGui.TextWrapped(attribute.Value.ToString() + " " + attribute.Unit);
                    ImGui.NewLine();
                }
            }

            void GuiHintMaxMin(ComponentDesignAttribute attribute)
            {
                if (compactmod)
                {
                    ImGui.TextWrapped(attribute.Name + ": " + attribute.Description);
                    ImGui.NewLine();
                }
                else
                {
                    ImGui.TextWrapped(attribute.Name + ":");
                    ImGui.SameLine();
                    ImGui.TextWrapped(attribute.Description);
                    ImGui.NewLine();
                }

                attribute.SetMax();
                attribute.SetMin();
                attribute.SetValue();
                attribute.SetStep();

                var    max   = attribute.MaxValue;
                var    min   = attribute.MinValue;
                double val   = attribute.Value;
                double step  = attribute.StepValue;
                double fstep = step * 10;
                IntPtr valPtr;
                IntPtr maxPtr;
                IntPtr minPtr;
                IntPtr stepPtr;
                IntPtr fstepPtr;

                unsafe
                {
                    valPtr   = new IntPtr(&val);
                    maxPtr   = new IntPtr(&max);
                    minPtr   = new IntPtr(&min);
                    stepPtr  = new IntPtr(&step);
                    fstepPtr = new IntPtr(&fstep);
                }
                //ImGui.DragScalar("##slider" + attribute.Name, ImGuiDataType.Double, valPtr, 1f, minPtr, maxPtr);


                if (compactmod)
                {
                }
                else
                {
                    ImGui.PushItemWidth(-1);
                    if (ImGui.SliderScalar("##scaler" + attribute.Name, ImGuiDataType.Double, valPtr, minPtr, maxPtr))
                    {
                        attribute.SetValueFromInput(val);
                    }
                }
                ImGui.PushItemWidth(-1);
                if (ImGui.InputScalar("##input" + attribute.Name, ImGuiDataType.Double, valPtr, stepPtr, fstepPtr))
                {
                    attribute.SetValueFromInput(val);
                }
                ImGui.NewLine();
            }

            void GuiHintTechSelection(ComponentDesignAttribute attribute)
            {
                if (compactmod)
                {
                    ImGui.TextWrapped(attribute.Name + ": " + attribute.Description);
                    ImGui.NewLine();
                }
                else
                {
                    ImGui.TextWrapped(attribute.Name + ":");
                    ImGui.SameLine();
                    ImGui.TextWrapped(attribute.Description);
                    ImGui.NewLine();
                }

                int i = 0;

                _techSDs   = new TechSD[attribute.GuidDictionary.Count];
                _techNames = new string[attribute.GuidDictionary.Count];
                foreach (var kvp in attribute.GuidDictionary)
                {
                    TechSD sd = StaticRefLib.StaticData.Techs[Guid.Parse((string)kvp.Key)];
                    _techSDs[i]   = sd;
                    _techNames[i] = sd.Name;
                    i++;
                }

                ImGui.TextWrapped(attribute.Value.ToString());



                if (ImGui.Combo("Select Tech", ref _techSelectedIndex, _techNames, _techNames.Length))
                {
                    attribute.SetValueFromGuidList(_techSDs[_techSelectedIndex].ID);
                }

                ImGui.NewLine();
            }

            void GuiHintEnumSelection(ComponentDesignAttribute attribute)
            {
                if (compactmod)
                {
                    ImGui.TextWrapped(attribute.Name + ": " + attribute.Description);
                    ImGui.NewLine();
                }
                else
                {
                    ImGui.TextWrapped(attribute.Name + ":");
                    ImGui.SameLine();
                    ImGui.TextWrapped(attribute.Description);
                    ImGui.NewLine();
                }


                int i = 0;

                //_techSDs = new TechSD[attribute.GuidDictionary.Count];
                _listNames = Enum.GetNames(attribute.EnumType);


                ImGui.TextWrapped(attribute.Value.ToString());

                if (ImGui.Combo("Select", ref attribute.ListSelection, _listNames, (int)attribute.MaxValue + 1))
                {
                    int enumVal = (int)Enum.Parse(attribute.EnumType, _listNames[attribute.ListSelection]);
                    attribute.SetValueFromInput(enumVal);
                }

                ImGui.NewLine();
            }

            void GuiHintOrdnanceSelection(ComponentDesignAttribute attribute)
            {
                var dict = _state.Faction.GetDataBlob <FactionInfoDB>().MissileDesigns;

                _listNames = new string[dict.Count];
                OrdnanceDesign[] ordnances = new OrdnanceDesign[dict.Count];
                int i = 0;

                foreach (var kvp in dict)
                {
                    _listNames[i] = kvp.Value.Name;
                    ordnances[i]  = kvp.Value;
                }



                if (compactmod)
                {
                    ImGui.TextWrapped(attribute.Name + ": " + attribute.Description);
                    ImGui.NewLine();
                }
                else
                {
                    ImGui.TextWrapped(attribute.Name + ":");
                    ImGui.SameLine();
                    ImGui.TextWrapped(attribute.Description);
                    ImGui.NewLine();
                }


                ImGui.TextWrapped(attribute.Value.ToString());

                if (ImGui.Combo("Select", ref attribute.ListSelection, _listNames, _listNames.Length))
                {
                    attribute.SetValueFromComponentList(ordnances[attribute.ListSelection].ID);
                }

                ImGui.NewLine();
            }
        }
        public void Display()
        {
            ImGui.BeginChild(_entityState.Name, new System.Numerics.Vector2(260, 200), true);
            ImGui.Text(_entityState.Name);
            ImGui.Text("Transfer Rate: " + _volStorageDB.TransferRateInKgHr);
            ImGui.Text("At DeltaV < " + Stringify.Velocity(_volStorageDB.TransferRangeDv_mps));

            foreach (var typeStore in _stores)
            {
                CargoTypeSD stype        = _staticData.CargoTypes[typeStore.Key];
                var         freeVolume   = typeStore.Value.FreeVolume;
                var         maxVolume    = typeStore.Value.MaxVolume;
                var         storedVolume = maxVolume - freeVolume;

                string headerText = stype.Name + " " + Stringify.Volume(freeVolume) + " / " + Stringify.Volume(maxVolume) + " free";
                ImGui.PushID(_entityState.Entity.Guid.ToString());
                if (ImGui.CollapsingHeader(headerText, ImGuiTreeNodeFlags.CollapsingHeader))
                {
                    ImGui.Columns(3);
                    ImGui.Text("Item");
                    ImGui.NextColumn();
                    ImGui.Text("Count");
                    ImGui.NextColumn();
                    ImGui.Text("Total Mass");
                    ImGui.NextColumn();
                    ImGui.Separator();

                    foreach (var cargoItemKvp in typeStore.Value.CurrentStoreInUnits.ToArray())
                    {
                        ICargoable cargoItem = _stores[typeStore.Key].Cargoables[cargoItemKvp.Key];
                        if (cargoItem == null)
                        {
                            FactionInfoDB factionInfoDB;
                            //factionInfoDB.
                        }

                        var cname         = cargoItem.Name;
                        var unitsStored   = cargoItemKvp.Value;
                        var volumePerItem = cargoItem.VolumePerUnit;
                        var volumeStored  = _volStorageDB.GetVolumeStored(cargoItem);
                        var massStored    = _volStorageDB.GetMassStored(cargoItem);

                        bool isSelected = selectedCargo == cargoItem;
                        if (ImGui.Selectable(cname, isSelected))
                        {
                            selectedCargo = cargoItem;
                            CargoItemSelectedEvent.Invoke(this);
                        }

                        ImGui.NextColumn();
                        ImGui.Text(Stringify.Number(unitsStored));


                        if (_cargoToMove.ContainsKey(cargoItem))
                        {
                            var    unitsMoving = _cargoToMove[cargoItem];
                            string text        = Stringify.Number(unitsMoving);
                            ImGui.SameLine();

                            float blue = 0f;
                            if (_cargoToMoveDatablob.ContainsKey(cargoItem))
                            {
                                if (_cargoToMoveDatablob[cargoItem] != 0)
                                {
                                    blue = 0.25f;
                                }
                            }
                            if (_cargoToMoveOrders.ContainsKey(cargoItem))
                            {
                                if (_cargoToMoveOrders[cargoItem] != 0)
                                {
                                    blue = 0.5f;
                                }
                            }
                            if (_cargoToMoveUI.ContainsKey(cargoItem))
                            {
                                if (_cargoToMoveUI[cargoItem] != 0)
                                {
                                    blue = 0.75f;
                                }
                            }

                            if (unitsMoving > 0)
                            {
                                ImGui.TextColored(new Vector4(0.5f, 1, blue, 1), text);
                            }
                            else
                            {
                                ImGui.TextColored(new Vector4(1f, 0.5f, blue, 1), text);
                            }
                        }

                        ImGui.NextColumn();
                        ImGui.Text(Stringify.Mass(massStored));
                        ImGui.NextColumn();
                    }

                    ImGui.Columns(1);
                }
            }


            ImGui.EndChild();
        }