public void OnEnable()
 {
     if (!string.IsNullOrEmpty(this._key) && (!UiTranslationDatabase.OriginalVersion || this._enableForOriginalVersion))
     {
         UiTranslationOverlaySystem.RegisterLabel(base.transform, this._key, this._textColor, this._backgroundColor, this._alignment, this._currentViewOption);
         if (this._overrideDepth || this._overrideHeight || this._currentViewOption == UiTranslationOverlaySystem.CurrentViewOptions.AllowInBook || this._currentViewOption == UiTranslationOverlaySystem.CurrentViewOptions.AllowInInventory)
         {
             UiTranslationOverlayLabel overlayLabel = UiTranslationOverlaySystem.GetOverlayLabel(base.transform);
             if (overlayLabel)
             {
                 this._ol = overlayLabel;
                 if (this._overrideDepth)
                 {
                     if (this._currentViewOption != UiTranslationOverlaySystem.CurrentViewOptions.AllowInBook)
                     {
                         this._oldDepth = overlayLabel._follow._minDepth;
                         overlayLabel._follow._minDepth = this._depth;
                     }
                 }
                 if (this._overrideHeight)
                 {
                     if (this._currentViewOption != UiTranslationOverlaySystem.CurrentViewOptions.AllowInBook)
                     {
                         this._oldHeight = overlayLabel._follow._worldOffset.y;
                         overlayLabel._follow._worldOffset.y = this._height;
                     }
                 }
                 if (this._currentViewOption == UiTranslationOverlaySystem.CurrentViewOptions.AllowInBook || this._currentViewOption == UiTranslationOverlaySystem.CurrentViewOptions.AllowInInventory)
                 {
                     overlayLabel._follow._viewportOffsetBook = this._viewportOffset;
                 }
             }
         }
     }
 }
 public void OnDisable()
 {
     if (!string.IsNullOrEmpty(this._key))
     {
         UiTranslationOverlaySystem.UnregisterIcon(base.transform);
     }
 }