450 {
453 if ((bool)b)
454 {
455 b.onClick.RemoveAllListeners();
456 b.onClick.AddListener(delegate
457 {
459 uIContextMenu.layoutGroup.childAlignment = TextAnchor.UpperLeft;
460 uIContextMenu.alwaysPopLeft = true;
464 {
465 UIList.SortMode _sort = sortMode;
466 uIContextMenu2.AddButton((((IsShop ? EMono.player.pref.sortInvShop : (IsAdvSort ? data.sortMode : EMono.player.pref.sortInv)) == _sort) ? "context_checker".lang() : "") + _sort.ToString().lang(), delegate
467 {
468 if (IsShop)
469 {
470 EMono.player.pref.sortInvShop = _sort;
471 }
472 else
473 {
474 EMono.player.pref.sortInv = _sort;
475 }
476 data.sortMode = _sort;
477 Sort();
478 SE.Click();
479 });
480 }
482 {
484 {
485 EMono.player.pref.sort_ascending_shop = a;
486 }
487 else
488 {
489 EMono.player.pref.sort_ascending = a;
490 }
491 data.sort_ascending = a;
493 SE.Click();
494 });
496 {
498 {
499 data.alwaysSort = a;
501 {
503 }
504 SE.Click();
505 });
506 }
508 {
511 {
513 uIContextMenu3.
AddButton(((data.
category ==
item) ?
"context_checker".lang() :
"") + (
"catFilterType_" + _c).lang(), delegate
514 {
515 data.category = _c;
516 uiMagic.idCat = "";
518 SE.Click();
519 });
520 }
521 }
525 {
526 flag2 = false;
527 }
529 {
530 flag2 = false;
531 }
533 Transform dist;
534 Transform distAdv;
535 if (flag2)
536 {
537 dis = uIContextMenu.
AddChild(
"distribution", TextAnchor.UpperRight);
538 dis.
AddSlider(
"priority_hint", (
float a) => a.ToString() ??
"", data.
priority, delegate(
float a)
539 {
540 data.priority = (int)a;
541 }, -5f, 20f, isInt: true, hideOther: false);
544 RefreshDist();
546 {
548 {
549 data.onlyRottable = a;
550 SE.ClickOk();
551 });
552 }
554 {
555 data.noRotten = a;
556 SE.ClickOk();
557 });
559 {
560 data.advDistribution = a;
561 RefreshDist();
562 SE.ClickOk();
563 });
565 {
567 {
569 {
570 if (!cancel)
571 {
572 data._filterStrs = null;
573 data.filter = s;
574 }
576 });
577 }
578 }
581 Transform dist2;
582 Transform distAdv2;
584 {
586 dis2 = uIContextMenu.
AddChild(
"autopick", TextAnchor.UpperRight);
589 RefreshDist2();
591 {
592 data2.noRotten = a;
593 SE.ClickOk();
594 });
596 {
597 data2.advDistribution = a;
598 RefreshDist2();
599 SE.ClickOk();
600 });
602 {
604 {
606 {
607 if (!cancel)
608 {
609 data2._filterStrs = null;
610 data2.filter = s;
611 }
613 });
614 }
615 }
617 {
620 {
624 AutodumpFlag.none
625 })
626 {
627 string text = ((data.autodump == item2) ? "context_checker".lang() : "");
629 UIButton uIButton = uIContextMenu4.
AddButton(text + (
"dump_" + item2).lang(), delegate
630 {
631 SE.Click();
632 data.autodump = _e;
633 });
635 {
637 }
638 }
639 }
641 {
644 {
645 data.excludeCraft = a;
646 SE.ClickOk();
647 });
649 {
651 {
652 data.excludeDump = a;
653 SE.ClickOk();
654 });
655 }
657 {
659 {
661 {
662 data.noRightClickClose = a;
663 SE.ClickOk();
664 });
665 }
667 {
668 data.fixedPos = a;
670 SE.ClickOk();
671 });
673 {
674 data.compress = a;
675 SE.ClickOk();
676 });
678 {
680 {
681 data.shiftToShowMenu = a;
682 SE.ClickOk();
683 });
684 }
685 }
687 {
689 {
690 EMono.player.openContainerCenter = a;
691 SE.ClickOk();
692 });
693 }
695 {
696 uIContextMenu5.
AddButton(
"changeName", delegate
697 {
699 {
700 if (!cancel)
701 {
702 con2.c_altName = c_altName;
703 }
705 });
706 }
708 {
709 uIContextMenu5.
AddButton(
"copyContainer", delegate
710 {
711 SE.ClickOk();
712 EMono.player.windowDataCopy =
IO.DeepCopy(data);
713 EMono.player.windowDataName = con2.
Name;
714 });
716 {
718 {
719 SE.ClickOk();
723 });
724 }
725 }
726 }
729 {
730 data.useBG = a;
734 SE.ClickOk();
735 });
736 uIContextMenu6.
AddSlider(
"size", (
float a) => a.ToString() ??
"", data.
size, delegate(
float num)
737 {
738 data.size = (int)num;
740 }, -25f, 25f, isInt: true, hideOther: false);
742 {
743 uIContextMenu6.
AddSlider(
"columns", (
float a) => a.ToString() ??
"", data.
columns, delegate(
float num)
744 {
745 data.columns = (int)num;
748 }
749 uIContextMenu6.
AddButton(
"colorGrid", delegate
750 {
752 {
753 data.color = color;
754 list.bgGrid.color = color;
755 if (data.
color.a == 0)
756 {
757 list.bgGrid.color =
InvStyle.gridColor;
758 }
759 });
760 });
762 {
763 uIContextMenu6.
AddButton(
"changeIcon", delegate
764 {
765 EMono.
ui.contextMenu.currentMenu.Hide();
768 int num = 0;
770 {
771 _ = item3;
773 int _i = num;
775 uIButton2.SetOnClick(delegate
776 {
777 SE.Click();
778 owner.Container.c_indexContainerIcon = _i;
780 EMono.
ui.contextMenu.currentMenu.Hide();
781 });
782 num++;
783 }
784 uIContextMenu9.
Show();
785 });
786 }
788 {
791 {
793 {
794 data.customAnchor = p;
796 SE.ClickGeneral();
797 });
798 }
799 }
801 {
804 {
805 EMono.core.config.game.useGrid = a;
807 {
808 item4.
invs[0].RefreshWindow();
809 item4.
invs[0].RefreshGrid();
810 }
811 });
813 {
814 EMono.game.config.gridIconSize = (int)num;
816 }, 100f, 150f, isInt: true, hideOther: false);
817 }
818 uIContextMenu.
Show();
819 uIContextMenu.hideOnMouseLeave = false;
820 void RefreshDist()
821 {
825 }
826 void RefreshDist2()
827 {
831 }
832 });
833 }
835 if ((bool)b)
836 {
837 b.onClick.RemoveAllListeners();
838 b.onClick.AddListener(delegate
839 {
841 SE.Click();
842 });
843 }
845 if ((bool)b)
846 {
848 b.onClick.RemoveAllListeners();
849 b.onClick.AddListener(delegate
850 {
852 });
853 }
855 if ((bool)b)
856 {
859 b.SetActive(flag);
860 if (flag)
861 {
862 RefreshShareButton();
863 b.SetOnClick(delegate
864 {
866 SE.ClickOk();
867 Msg.
Say(
"changePermission", con, (flag2 ?
"stPersonal" :
"stShared").lang());
869 RefreshShareButton();
870 });
871 }
872 }
876 switch (mode)
877 {
880 {
881 break;
882 }
884 {
886 {
888 {
889 EMono.pc.Pick(t, msg: false);
890 }
891 });
893 {
894 SE.Beep();
895 }
896 else
897 {
898 SE.Play("pick_thing");
900 }
901 });
902 break;
904 {
907 if (cost <= 0)
908 {
909 break;
910 }
912 {
914 {
916 {
917 SE.Beep();
919 return;
920 }
922 }
923 else
924 {
926 {
927 SE.Beep();
928 Msg.
Say(
"notEnoughInfluence");
929 return;
930 }
931 EMono._zone.influence -= cost;
932 }
933 SE.Dice();
934 _owner.c_dateStockExpire = 0;
938 SE.Play("shop_open");
940 }, null, "DefaultContentFit").RebuildLayout();
941 break;
942 }
943 }
944 void RefreshShareButton()
945 {
948 b.tooltip.lang = (flag2 ? "hintShared" : "hintPrivate");
950 }
951 }
void ModCurrency(int a, string id="money")
List< Sprite > spritesContainerIcon
static Dialog InputName(string langDetail, string text, Action< bool, string > onClose, InputType inputType=InputType.Default)
static SourceManager sources
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 void OnBarter(bool reroll=false)
virtual CurrencyType CurrencyRerollShop
virtual bool IsSpecialContainer
Transform ShowAdvDistribution(UIContextMenu dis, Window.SaveData data)
Transform ShowDistribution(UIContextMenu dis, Window.SaveData data)
RectPosition customAnchor
void CopyFrom(SaveData data)