453 {
456 if ((bool)b)
457 {
458 b.onClick.RemoveAllListeners();
459 b.onClick.AddListener(delegate
460 {
462 uIContextMenu.layoutGroup.childAlignment = TextAnchor.UpperLeft;
463 uIContextMenu.alwaysPopLeft = true;
467 {
468 UIList.SortMode _sort = sortMode;
469 uIContextMenu2.AddButton((((IsShop ? EMono.player.pref.sortInvShop : (IsAdvSort ? data.sortMode : EMono.player.pref.sortInv)) == _sort) ? "context_checker".lang() : "") + _sort.ToString().lang(), delegate
470 {
471 if (IsShop)
472 {
473 EMono.player.pref.sortInvShop = _sort;
474 }
475 else
476 {
477 EMono.player.pref.sortInv = _sort;
478 }
479 data.sortMode = _sort;
480 Sort();
481 SE.Click();
482 });
483 }
485 {
487 {
488 EMono.player.pref.sort_ascending_shop = a;
489 }
490 else
491 {
492 EMono.player.pref.sort_ascending = a;
493 }
494 data.sort_ascending = a;
496 SE.Click();
497 });
499 {
501 {
502 data.alwaysSort = a;
504 {
506 }
507 SE.Click();
508 });
509 }
511 {
514 {
516 uIContextMenu3.
AddButton(((data.
category ==
item) ?
"context_checker".lang() :
"") + (
"catFilterType_" + _c).lang(), delegate
517 {
518 data.category = _c;
519 uiMagic.idCat = "";
521 SE.Click();
522 });
523 }
524 }
528 {
529 flag2 = false;
530 }
532 {
533 flag2 = false;
534 }
536 Transform dist;
537 Transform distAdv;
538 if (flag2)
539 {
540 dis = uIContextMenu.
AddChild(
"distribution", TextAnchor.UpperRight);
541 dis.
AddSlider(
"priority_hint", (
float a) => a.ToString() ??
"", data.
priority, delegate(
float a)
542 {
543 data.priority = (int)a;
544 }, -5f, 20f, isInt: true, hideOther: false);
547 RefreshDist();
549 {
551 {
552 data.onlyRottable = a;
553 SE.ClickOk();
554 });
555 }
557 {
558 data.noRotten = a;
559 SE.ClickOk();
560 });
562 {
563 data.advDistribution = a;
564 RefreshDist();
565 SE.ClickOk();
566 });
568 {
570 {
572 {
573 if (!cancel)
574 {
575 data._filterStrs = null;
576 data.filter = s;
577 }
579 });
580 }
581 }
584 Transform dist2;
585 Transform distAdv2;
587 {
589 dis2 = uIContextMenu.
AddChild(
"autopick", TextAnchor.UpperRight);
592 RefreshDist2();
594 {
595 data2.noRotten = a;
596 SE.ClickOk();
597 });
599 {
600 data2.advDistribution = a;
601 RefreshDist2();
602 SE.ClickOk();
603 });
605 {
607 {
609 {
610 if (!cancel)
611 {
612 data2._filterStrs = null;
613 data2.filter = s;
614 }
616 });
617 }
618 }
620 {
623 {
627 AutodumpFlag.none
628 })
629 {
630 string text = ((data.autodump == item2) ? "context_checker".lang() : "");
632 UIButton uIButton = uIContextMenu4.
AddButton(text + (
"dump_" + item2).lang(), delegate
633 {
634 SE.Click();
635 data.autodump = _e;
636 });
638 {
640 }
641 }
642 }
644 {
647 {
648 data.excludeCraft = a;
649 SE.ClickOk();
650 });
652 {
654 {
655 data.excludeDump = a;
656 SE.ClickOk();
657 });
658 }
660 {
662 {
664 {
665 data.noRightClickClose = a;
666 SE.ClickOk();
667 });
668 }
670 {
671 data.fixedPos = a;
673 SE.ClickOk();
674 });
676 {
677 data.compress = a;
678 SE.ClickOk();
679 });
681 {
683 {
684 data.shiftToShowMenu = a;
685 SE.ClickOk();
686 });
687 }
688 }
690 {
692 {
693 EMono.player.openContainerCenter = a;
694 SE.ClickOk();
695 });
696 }
698 {
699 uIContextMenu5.
AddButton(
"changeName", delegate
700 {
702 {
703 if (!cancel)
704 {
705 con2.c_altName = c_altName;
706 }
708 });
709 }
711 {
712 uIContextMenu5.
AddButton(
"copyContainer", delegate
713 {
714 SE.ClickOk();
715 EMono.player.windowDataCopy =
IO.DeepCopy(data);
716 EMono.player.windowDataName = con2.
Name;
717 });
719 {
721 {
722 SE.ClickOk();
726 });
727 }
728 }
729 }
732 {
733 data.useBG = a;
737 SE.ClickOk();
738 });
739 uIContextMenu6.
AddSlider(
"size", (
float a) => a.ToString() ??
"", data.
size, delegate(
float num)
740 {
741 data.size = (int)num;
743 }, -25f, 25f, isInt: true, hideOther: false);
745 {
746 uIContextMenu6.
AddSlider(
"columns", (
float a) => a.ToString() ??
"", data.
columns, delegate(
float num)
747 {
748 data.columns = (int)num;
751 }
752 uIContextMenu6.
AddButton(
"colorGrid", delegate
753 {
755 {
756 data.color = color;
757 list.bgGrid.color = color;
758 if (data.
color.a == 0)
759 {
760 list.bgGrid.color =
InvStyle.gridColor;
761 }
762 });
763 });
765 {
766 uIContextMenu6.
AddButton(
"changeIcon", delegate
767 {
768 EMono.
ui.contextMenu.currentMenu.Hide();
771 int num = 0;
773 {
774 _ = item3;
776 int _i = num;
778 uIButton2.SetOnClick(delegate
779 {
780 SE.Click();
781 owner.Container.c_indexContainerIcon = _i;
783 EMono.
ui.contextMenu.currentMenu.Hide();
784 });
785 num++;
786 }
787 uIContextMenu9.
Show();
788 });
789 }
791 {
794 {
796 {
797 data.customAnchor = p;
799 SE.ClickGeneral();
800 });
801 }
802 }
804 {
807 {
808 EMono.core.config.game.useGrid = a;
810 {
811 item4.
invs[0].RefreshWindow();
812 item4.
invs[0].RefreshGrid();
813 }
814 });
816 {
817 EMono.game.config.gridIconSize = (int)num;
819 }, 100f, 150f, isInt: true, hideOther: false);
820 }
821 uIContextMenu.
Show();
822 uIContextMenu.hideOnMouseLeave = false;
823 void RefreshDist()
824 {
828 }
829 void RefreshDist2()
830 {
834 }
835 });
836 }
838 if ((bool)b)
839 {
840 b.onClick.RemoveAllListeners();
841 b.onClick.AddListener(delegate
842 {
844 SE.Click();
845 });
846 }
848 if ((bool)b)
849 {
851 b.onClick.RemoveAllListeners();
852 b.onClick.AddListener(delegate
853 {
855 });
856 }
858 if ((bool)b)
859 {
862 b.SetActive(flag);
863 if (flag)
864 {
865 RefreshShareButton();
866 b.SetOnClick(delegate
867 {
869 SE.ClickOk();
870 Msg.
Say(
"changePermission", con, (flag2 ?
"stPersonal" :
"stShared").lang());
872 RefreshShareButton();
873 });
874 }
875 }
879 switch (mode)
880 {
883 {
884 break;
885 }
887 {
889 {
891 {
892 EMono.pc.Pick(t, msg: false);
893 }
894 });
896 {
897 SE.Beep();
898 }
899 else
900 {
901 SE.Play("pick_thing");
903 }
904 });
905 break;
907 {
910 if (cost <= 0)
911 {
912 break;
913 }
915 {
917 {
919 {
920 SE.Beep();
922 return;
923 }
925 }
926 else
927 {
929 {
930 SE.Beep();
931 Msg.
Say(
"notEnoughInfluence");
932 return;
933 }
934 EMono._zone.influence -= cost;
935 }
936 SE.Dice();
937 _owner.c_dateStockExpire = 0;
941 SE.Play("shop_open");
943 }, null, "DefaultContentFit").RebuildLayout();
944 break;
945 }
946 }
947 void RefreshShareButton()
948 {
951 b.tooltip.lang = (flag2 ? "hintShared" : "hintPrivate");
953 }
954 }
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)