예제 #1
0
 public UXTexture(UXCamera uxCamera, UXTextureComponent component) : base(uxCamera, component.gameObject, null)
 {
     this.textureHasBeenSet      = false;
     this.assetManager           = Service.AssetManager;
     this.component              = component;
     this.onLoadCompleteCallback = null;
 }
예제 #2
0
 public UXSlider(UXCamera uxCamera, UXSliderComponent component) : base(uxCamera, component.gameObject, null)
 {
     this.component = component;
     this.alpha     = 1f;
     this.sprite1   = null;
     this.sprite2   = null;
     if (this.root != null)
     {
         int i          = 0;
         int childCount = this.root.transform.childCount;
         while (i < childCount)
         {
             UISprite x = this.root.transform.GetChild(i).gameObject.GetComponent <UISprite>();
             if (x != null)
             {
                 if (!(this.sprite1 == null))
                 {
                     this.sprite2 = x;
                     break;
                 }
                 this.sprite1 = x;
             }
             i++;
         }
     }
     if (this.sprite1 != null)
     {
         this.fAlpha = this.sprite1.alpha;
     }
     if (this.sprite2 != null)
     {
         this.bAlpha = this.sprite2.alpha;
     }
 }
예제 #3
0
 public UXCheckbox(UXCamera uxCamera, UXCheckboxComponent component) : base(uxCamera, component.gameObject, component.NGUIButton)
 {
     this.component  = component;
     this.inhibitor  = Service.Get <UserInputInhibitor>();
     this.radioGroup = this.RadioGroup;
     this.OnSelected = null;
 }
예제 #4
0
 public UXLabel(UXCamera uxCamera, UXLabelComponent component) : base(uxCamera, component.gameObject, null)
 {
     this.component         = component;
     this.OriginalTextColor = component.TextColor;
     if (Service.Lang.IsJapanese())
     {
         component.NGUILabel.trueTypeFont = Service.Lang.CustomJapaneseFont;
     }
 }
예제 #5
0
 public UXFactory(UXCamera camera) : base(camera, null, null)
 {
     this.uxOnSuccess    = null;
     this.uxOnFailure    = null;
     this.uxCookie       = null;
     this.elements       = new Dictionary <string, UXElement>();
     this.duplicates     = new Dictionary <string, int>();
     this.isCachedScreen = false;
     this.visible        = false;
 }
예제 #6
0
        public void Init()
        {
            this.inited = true;
            CameraManager cameraManager = Service.Get <CameraManager>();

            this.uxCamera          = cameraManager.UXCamera;
            this.activeWorldCamera = cameraManager.MainCamera;
            Service.Get <EventManager>().RegisterObserver(this, EventId.DenyUserInput, EventPriority.Default);
            Service.Get <EventManager>().RegisterObserver(this, EventId.ApplicationPauseToggled, EventPriority.Default);
            this.Enable(false);
        }
예제 #7
0
 public AbstractUXList(UXFactory uxFactory, UXCamera uxCamera, AbstractUXListComponent component) : base(uxCamera, component.gameObject, null)
 {
     this.uxFactory       = uxFactory;
     this.component       = component;
     this.addedItems      = new List <UXElement>();
     this.addedItemOrders = new List <int>();
     this.templateItem    = null;
     this.OnDrag          = null;
     component.Init();
     this.RepositionItems();
 }
예제 #8
0
 public UXLabel(UXCamera uxCamera, UXLabelComponent component) : base(uxCamera, component.gameObject, null)
 {
     this.component         = component;
     this.OriginalTextColor = component.TextColor;
     if (Service.Get <Lang>().IsKorean())
     {
         string text = SystemInfo.operatingSystem.ToLower();
         if (text.Contains("phone") && text.Contains("(10."))
         {
             component.NGUILabel.trueTypeFont = Service.Get <Lang>().CustomKoreanFont;
         }
     }
 }
예제 #9
0
 public UXButton(UXCamera uxCamera, UXButtonComponent component) : base(uxCamera, component.gameObject, component.NGUIButton)
 {
     this.component        = component;
     this.OnClicked        = null;
     this.OnPressed        = null;
     this.OnReleased       = null;
     this.NGUIButton       = component.NGUIButton;
     this.VisuallyDisabled = false;
     if (this.NGUIButton != null)
     {
         this.defaultButtonColor = this.NGUIButton.defaultColor;
     }
     this.inhibitor = ((Service.UserInputInhibitor == null) ? null : Service.UserInputInhibitor);
 }
예제 #10
0
 public UXButton(UXCamera uxCamera, UXButtonComponent component)
 {
     this.defaultButtonColor = new Color(255f, 255f, 255f, 1f);
     base..ctor(uxCamera, component.gameObject, component.NGUIButton);
     this.component        = component;
     this.OnClicked        = null;
     this.OnPressed        = null;
     this.OnReleased       = null;
     this.NGUIButton       = component.NGUIButton;
     this.VisuallyDisabled = false;
     if (this.NGUIButton != null)
     {
         this.defaultButtonColor = this.NGUIButton.defaultColor;
     }
     this.inhibitor = (Service.IsSet <UserInputInhibitor>() ? Service.Get <UserInputInhibitor>() : null);
 }
예제 #11
0
 public UXInput(UXCamera uxCamera, UXInputComponent component) : base(uxCamera, component.gameObject, null)
 {
     this.inputComponent = component;
     Service.EventManager.RegisterObserver(this, EventId.DenyUserInput);
     Service.EventManager.RegisterObserver(this, EventId.AllowUserInput);
 }
예제 #12
0
 public UXMeshRenderer(UXCamera uxCamera, MeshRenderer component) : base(uxCamera, component.gameObject, null)
 {
     this.assetManager = Service.AssetManager;
     this.component    = component;
 }
예제 #13
0
 public UXGrid(UXFactory uxFactory, UXCamera uxCamera, UXGridComponent component) : base(uxFactory, uxCamera, component)
 {
     this.gridComponent = component;
 }
예제 #14
0
 public UXTable(UXFactory uxFactory, UXCamera uxCamera, UXTableComponent component) : base(uxFactory, uxCamera, component)
 {
     this.tableComponent = component;
 }
예제 #15
0
 public UXSprite(UXCamera uxCamera, UXSpriteComponent component) : base(uxCamera, component.gameObject, null)
 {
     this.component = component;
 }
예제 #16
0
 public UXAnchor(UXCamera uxCamera) : base(uxCamera, null, null)
 {
 }
예제 #17
0
 public UXElement(UXCamera uxCamera, GameObject root, UIButton enabler)
 {
     this.uxCamera = uxCamera;
     this.enabler  = enabler;
     this.InternalSetRoot(root);
 }