451 {
454 if ((bool)b2)
455 {
456 b2.onClick.RemoveAllListeners();
457 b2.onClick.AddListener(delegate
458 {
460 uIContextMenu.layoutGroup.childAlignment = TextAnchor.UpperLeft;
461 uIContextMenu.alwaysPopLeft = true;
465 {
466 UIList.SortMode _sort = sortMode;
467 uIContextMenu2.AddButton((((IsShop ? EMono.player.pref.sortInvShop : (IsAdvSort ? data.sortMode : EMono.player.pref.sortInv)) == _sort) ? "context_checker".lang() : "") + _sort.ToString().lang(), delegate
468 {
469 if (IsShop)
470 {
471 EMono.player.pref.sortInvShop = _sort;
472 }
473 else
474 {
475 EMono.player.pref.sortInv = _sort;
476 }
477 data.sortMode = _sort;
478 Sort();
479 SE.Click();
480 });
481 }
483 {
485 {
486 EMono.player.pref.sort_ascending_shop = a;
487 }
488 else
489 {
490 EMono.player.pref.sort_ascending = a;
491 }
492 data.sort_ascending = a;
494 SE.Click();
495 });
497 {
499 {
500 data.alwaysSort = a;
502 {
504 }
505 SE.Click();
506 });
507 }
509 {
512 {
514 uIContextMenu3.
AddButton(((data.
category ==
item) ?
"context_checker".lang() :
"") + (
"catFilterType_" + _c2).lang(), delegate
515 {
516 data.category = _c2;
517 uiMagic.idCat = "";
519 SE.Click();
520 });
521 }
522 }
526 {
527 flag4 = true;
528 }
530 {
531 flag4 = false;
532 }
534 Transform dist2;
535 Transform distAdv2;
536 if (flag4)
537 {
538 dis2 = uIContextMenu.
AddChild(
"distribution", TextAnchor.UpperRight);
539 dis2.
AddSlider(
"priority_hint", (
float a) => a.ToString() ??
"", data.
priority, delegate(
float a)
540 {
541 data.priority = (int)a;
542 }, -5f, 20f, isInt: true, hideOther: false);
545 RefreshDist();
547 {
549 {
550 data.onlyRottable = a;
551 SE.ClickOk();
552 });
553 }
555 {
556 data.noRotten = a;
557 SE.ClickOk();
558 });
560 {
561 data.advDistribution = a;
562 RefreshDist();
563 SE.ClickOk();
564 });
566 {
568 {
570 {
571 if (!cancel)
572 {
573 data._filterStrs = null;
574 data.filter = s;
575 }
577 });
578 }
579 }
582 Transform dist;
583 Transform distAdv;
585 {
587 dis = uIContextMenu.
AddChild(
"autopick", TextAnchor.UpperRight);
590 RefreshDist();
592 {
593 data2.noRotten = a;
594 SE.ClickOk();
595 });
597 {
598 data2.advDistribution = a;
599 RefreshDist();
600 SE.ClickOk();
601 });
603 {
605 {
607 {
608 if (!cancel)
609 {
610 data2._filterStrs = null;
611 data2.filter = s;
612 }
614 });
615 }
616 }
618 {
621 {
625 AutodumpFlag.none
626 })
627 {
628 string text2 = ((data.autodump == item2) ? "context_checker".lang() : "");
630 UIButton uIButton = uIContextMenu4.
AddButton(text2 + (
"dump_" + item2).lang(), delegate
631 {
632 SE.Click();
633 data.autodump = _e;
634 });
636 {
638 }
639 }
640 }
642 {
645 {
646 data.excludeCraft = a;
647 SE.ClickOk();
648 });
650 {
652 {
653 data.excludeDump = a;
654 SE.ClickOk();
655 });
656 }
658 {
660 {
662 {
663 data.noRightClickClose = a;
664 SE.ClickOk();
665 });
666 }
668 {
669 data.fixedPos = a;
671 SE.ClickOk();
672 });
674 {
675 data.compress = a;
676 SE.ClickOk();
677 });
679 {
681 {
682 data.shiftToShowMenu = a;
683 SE.ClickOk();
684 });
685 }
686 }
688 {
690 {
691 EMono.player.openContainerCenter = a;
692 SE.ClickOk();
693 });
694 }
696 {
697 uIContextMenu5.
AddButton(
"changeName", delegate
698 {
700 {
701 if (!cancel)
702 {
703 con2.c_altName = text;
704 }
706 });
707 }
709 {
710 uIContextMenu5.
AddButton(
"copyContainer", delegate
711 {
712 SE.ClickOk();
713 EMono.player.windowDataCopy =
IO.DeepCopy(data);
714 EMono.player.windowDataName = con2.
Name;
715 });
717 {
719 {
720 SE.ClickOk();
724 });
725 }
726 }
727 }
730 {
731 data.useBG = a;
735 SE.ClickOk();
736 });
737 uIContextMenu6.
AddSlider(
"size", (
float a) => a.ToString() ??
"", data.
size, delegate(
float b)
738 {
739 data.size = (int)b;
741 }, -25f, 25f, isInt: true, hideOther: false);
743 {
744 uIContextMenu6.
AddSlider(
"columns", (
float a) => a.ToString() ??
"", data.
columns, delegate(
float b)
745 {
746 data.columns = (int)b;
748 }, 0f, 20f, isInt: true, hideOther: false);
749 }
750 uIContextMenu6.
AddButton(
"colorGrid", delegate
751 {
753 {
754 data.color = _c;
755 list.bgGrid.color = _c;
756 if (data.
color.a == 0)
757 {
758 list.bgGrid.color =
InvStyle.gridColor;
759 }
760 });
761 });
763 {
764 uIContextMenu6.
AddButton(
"changeIcon", delegate
765 {
766 EMono.
ui.contextMenu.currentMenu.Hide();
769 int num = 0;
771 {
772 _ = item3;
774 int _i = num;
776 uIButton2.SetOnClick(delegate
777 {
778 SE.Click();
779 owner.Container.c_indexContainerIcon = _i;
781 EMono.
ui.contextMenu.currentMenu.Hide();
782 });
783 num++;
784 }
785 uIContextMenu9.
Show();
786 });
787 }
789 {
792 {
794 {
795 data.customAnchor = p;
797 SE.ClickGeneral();
798 });
799 }
800 }
802 {
805 {
806 EMono.core.config.game.useGrid = a;
808 {
809 item4.
invs[0].RefreshWindow();
810 item4.
invs[0].RefreshGrid();
811 }
812 });
814 {
815 EMono.game.config.gridIconSize = (int)b;
817 }, 100f, 150f, isInt: true, hideOther: false);
818 }
819 uIContextMenu.
Show();
820 uIContextMenu.hideOnMouseLeave = false;
821 void RefreshDist()
822 {
826 }
827 void RefreshDist()
828 {
832 }
833 });
834 }
836 if ((bool)b2)
837 {
838 b2.onClick.RemoveAllListeners();
839 b2.onClick.AddListener(delegate
840 {
842 SE.Click();
843 });
844 }
846 if ((bool)b2)
847 {
849 b2.onClick.RemoveAllListeners();
850 b2.onClick.AddListener(delegate
851 {
853 });
854 }
856 if ((bool)b2)
857 {
860 b2.SetActive(flag);
861 if (flag)
862 {
863 RefreshShareButton();
864 b2.SetOnClick(delegate
865 {
867 SE.ClickOk();
868 Msg.
Say(
"changePermission", con, (flag3 ?
"stPersonal" :
"stShared").lang());
870 RefreshShareButton();
871 });
872 }
873 }
877 switch (mode)
878 {
881 {
882 break;
883 }
885 {
887 {
889 {
890 EMono.pc.Pick(t, msg: false);
891 }
892 });
894 {
895 SE.Beep();
896 }
897 else
898 {
899 SE.Play("pick_thing");
901 }
902 });
903 break;
905 {
908 if (cost <= 0)
909 {
910 break;
911 }
912 menuBottom.
AddButton(
"rerollShop".lang(cost.ToString() ??
""), delegate
913 {
915 {
916 SE.Beep();
917 Msg.
Say(
"notEnoughInfluence");
918 }
919 else
920 {
921 SE.Dice();
922 EMono._zone.influence -= cost;
923 _owner.c_dateStockExpire = 0;
927 SE.Play("shop_open");
928 }
929 });
930 break;
931 }
932 }
933 void RefreshShareButton()
934 {
937 b2.tooltip.lang = (flag2 ? "hintShared" : "hintPrivate");
939 }
940 }
List< Sprite > spritesContainerIcon
static Dialog InputName(string langDetail, string text, Action< bool, string > onClose, InputType inputType=InputType.Default)
static void SetDirty(Thing t)
static List< LayerInventory > listInv
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Window.SaveData windowDataCopy
virtual int CostRerollShop
virtual bool IsSpecialContainer
Transform ShowAdvDistribution(UIContextMenu dis, Window.SaveData data)
Transform ShowDistribution(UIContextMenu dis, Window.SaveData data)
RectPosition customAnchor
void CopyFrom(SaveData data)