Ejemplo n.º 1
0
        public override void MyGroupUpdated()
        {
            canView = HEROsModNetwork.LoginService.MyGroup.HasPermission("ViewRegions");
            canEdit = HEROsModNetwork.LoginService.MyGroup.HasPermission("EditRegions");             // "EditRegions" grants "ViewRegions" abilities regardless.
            this.HasPermissionToUse = canView || canEdit;
            // this._canAccessSettings = HEROsModNetwork.LoginService.MyGroup.IsAdmin;

            if (canEdit)
            {
                this.HotbarIcon.Tooltip = HEROsMod.HeroText("OpenRegionsWindow");
            }
            else
            {
                _confirmationWindow.Close();
                _regionWindow.Close();
                SelectionTool.Reset();
                if (canView)
                {
                    HotbarIcon.Tooltip = HEROsMod.HeroText("ToggleRegionsVisible");
                }
                else
                {
                    RegionService.RegionsVisible = false;
                }
            }

            //base.MyGroupUpdated();
        }
Ejemplo n.º 2
0
        public override void MyGroupUpdated()
        {
            canView = HEROsModNetwork.LoginService.MyGroup.HasPermission("ViewRegions");
            canEdit = HEROsModNetwork.LoginService.MyGroup.HasPermission("EditRegions");
            this.HasPermissionToUse = canView || canEdit;
            // this._canAccessSettings = HEROsModNetwork.LoginService.MyGroup.IsAdmin;

            if (canEdit)
            {
                this.HotbarIcon.Tooltip = "Open regions window";
            }
            else if (canView)
            {
                _confirmationWindow.Close();
                _regionWindow.Close();
                SelectionTool.Reset();
                HotbarIcon.Tooltip = "Toggle Regions Visible";
            }

            //base.MyGroupUpdated();
        }