コード例 #1
0
 public IndexedUIButton(int leftPoint, int topPoint, int panelWidth, int panelHeight, string textureAddress, Color colour, ClickMethod onClickMethod, float layer, bool transforms, int index)
     : base(leftPoint, topPoint, panelWidth, panelHeight, colour, layer, transforms)
 {
     texture = TextureManager.GetTexture(textureAddress);
     method = onClickMethod;
     Index = index;
 }
コード例 #2
0
 public IndexedUIButton(int leftPoint, int topPoint, int panelWidth, int panelHeight, string textureAddress, Color colour, ClickMethod onClickMethod, float layer, bool transforms, int index)
     : base(leftPoint, topPoint, panelWidth, panelHeight, colour, layer, transforms)
 {
     texture = TextureManager.GetTexture(textureAddress);
     method  = onClickMethod;
     Index   = index;
 }
コード例 #3
0
 public UIIndexedButton(int leftPoint, int topPoint, int panelWidth, int panelHeight, string textureAddress, Color colour, ClickMethod onClickMethod, float layer, bool transforms, int x, int y)
     : base(leftPoint, topPoint, panelWidth, panelHeight, colour, layer, transforms)
 {
     texture = TextureManager.GetTexture(textureAddress);
     method  = onClickMethod;
     this.x  = x;
     this.y  = y;
 }
コード例 #4
0
ファイル: TextButton.cs プロジェクト: GinSoaked/miniXNAEngine
 public TextIndexedButton(int leftPoint, int topPoint, int panelWidth, int panelHeight, string textureAddress, ClickMethod onClickMethod, string fontAddress, string displayText, Color colour, float layer, bool transform, int x, int y)
     : base(leftPoint, topPoint, panelWidth, panelHeight, textureAddress, colour, onClickMethod, layer, transform, x, y)
 {
     font = TextureManager.GetFont(fontAddress);
     text = displayText;
     stringOffset = new Vector2(this.Bounds.Width * 0.5f, this.Bounds.Height * 0.5f);
     stringOrigin = font.MeasureString(displayText) * 0.5f;
 }
コード例 #5
0
 /// <summary>
 /// Set Mouse clicks send to which IntPtr. If not set will default use process's <see cref="Process.MainWindowHandle"/>.
 /// </summary>
 /// <param name="hWnd"></param>
 /// <returns>True if set success, but false if not valid</returns>
 public bool SetIntPtr(IntPtr hWnd, [CallerLineNumber] int lineNumber = 0, [CallerMemberName] string caller = null)
 {
     if (hWnd == default(IntPtr) || hWnd == IntPtr.Zero)
     {
         logger.WritePrivateLog("Click IntPtr set FAILED as IntPtr is Zero or not valid!", lineNumber, caller);
         //Unable to set Ptr
         return(false);
     }
     ClickMethod = ClickMethod.WinAPI;
     logger.WritePrivateLog("Click IntPtr set SUCCESS with " + hWnd.ToInt32(), lineNumber, caller);
     ClickPtr = hWnd;
     return(true);
 }
コード例 #6
0
 public TextIndexedButton(int leftPoint, int topPoint, int panelWidth, int panelHeight, string textureAddress, ClickMethod onClickMethod, string fontAddress, string displayText, Color colour, float layer, bool transform, int x, int y)
     : base(leftPoint, topPoint, panelWidth, panelHeight, textureAddress, colour, onClickMethod, layer, transform, x, y)
 {
     font         = TextureManager.GetFont(fontAddress);
     text         = displayText;
     stringOffset = new Vector2(this.Bounds.Width * 0.5f, this.Bounds.Height * 0.5f);
     stringOrigin = font.MeasureString(displayText) * 0.5f;
 }
コード例 #7
0
 // You're allowed to create a button that doesn't do anything.
 public Button(EDisplaySetting displaySetting, string title, ClickMethod onClickMethod)
     : this(displaySetting, title)
 {
     this.OnClick = onClickMethod;
 }
コード例 #8
0
ファイル: UIButton.cs プロジェクト: GinSoaked/miniXNAEngine
 public UIIndexedButton(int leftPoint, int topPoint, int panelWidth, int panelHeight, string textureAddress, Color colour, ClickMethod onClickMethod, float layer, bool transforms, int x, int y)
     : base(leftPoint, topPoint, panelWidth, panelHeight, colour, layer, transforms)
 {
     texture = TextureManager.GetTexture(textureAddress);
     method = onClickMethod;
     this.x = x;
     this.y = y;
 }
コード例 #9
0
ファイル: UIButton.cs プロジェクト: GinSoaked/miniXNAEngine
 public void setMethod(ClickMethod c)
 {
     method = c;
 }
コード例 #10
0
 // You're allowed to create a button that doesn't do anything.
 public Button(EDisplaySetting displaySetting, string title, ClickMethod onClickMethod) : this(displaySetting, title)
 {
     this.OnClick = onClickMethod;
 }
コード例 #11
0
 public void setMethod(ClickMethod c)
 {
     method = c;
 }