private static void SortColoniesOneTime(ref List <PersistentColony> colonies)
        {
            var persistentWorld = PersistentWorldManager.GetInstance().PersistentWorld;

            if (_sorted == persistentWorld.WorldData.ColonySortOption)
            {
                return;
            }

            persistentWorld.WorldData.ColonySortOption.Sort(ref colonies);

            colonies.Sort((x, y) =>
            {
                if (x.ColonyData.Favoured && !y.ColonyData.Favoured)
                {
                    return(-1);
                }
                else if (!x.ColonyData.Favoured && y.ColonyData.Favoured)
                {
                    return(1);
                }

                return(0);
            });

            _sorted = persistentWorld.WorldData.ColonySortOption;
        }
        private static void DrawFavouriteStar(Rect rect, PersistentColony colony)
        {
            var favoured = colony.ColonyData.Favoured;

            var size          = rect.size.x;
            var starRect      = new Rect(rect.x, rect.y, size, size);
            var starImageRect = new Rect(starRect.x + size * 0.1f, starRect.y + size * 0.05f, starRect.width * 0.9f, starRect.height * 0.9f);

            if (!favoured)
            {
                Widgets.DrawAltRect(starRect);
            }
            else
            {
                Widgets.DrawHighlight(starRect);
            }

            Widgets.DrawHighlightIfMouseover(starRect);

            if (ButtonTextureHover(starRect, starImageRect, FavouriteStar, FavouriteStarToBe,
                                   Color.gray, favoured ? Color.red : Color.green, GenUI.MouseoverColor, favoured))
            {
                colony.ColonyData.Favoured = !favoured;
                _sorted = null; // Reset favourites list
            }

            TooltipHandler.TipRegion(starRect, !favoured ? "FilUnderscore.PersistentRimWorlds.Colony.Favourite.Add".Translate() :
                                     "FilUnderscore.PersistentRimWorlds.Colony.Favourite.Remove".Translate());
        }
        public static void Reset()
        {
            _scrollPosition = new Vector2();
            ScrollPositions.Clear();

            _sorted = null;
        }