protected internal override void Draw(int x, int y) { Renderer.SetTexture((Texture)null); switch (this.m_Style) { case WindowsTextBoxStyle.Normal: GumpPaint.DrawSunken3D(x, y, this.m_Width, this.m_Height, GumpColors.Window); break; case WindowsTextBoxStyle.Flat: GumpPaint.DrawFlat(x, y, this.m_Width, this.m_Height, GumpColors.ControlDarkDark, GumpColors.Window); break; } }
protected internal override unsafe void Draw(int X, int Y) { if (this.m_ScrollTexture == null) { this.m_ScrollTexture = new Texture(16, 16, TextureTransparency.None); LockData lockData = this.m_ScrollTexture.Lock(LockFlags.WriteOnly); ushort num1 = Engine.C32216(GumpColors.ControlLightLight); ushort num2 = Engine.C32216(GumpColors.ScrollBar); for (int index1 = 0; index1 < 16; ++index1) { ushort *numPtr = (ushort *)((IntPtr)lockData.pvSrc + index1 * lockData.Pitch); for (int index2 = 0; index2 < 16; ++index2) { *numPtr++ = ((index1 & 1) + index2 & 1) != 0 ? num2 : num1; } } this.m_ScrollTexture.Unlock(); } this.m_ScrollTexture.Draw(X, Y, this.Width, this.Height); int barHeight = this.GetBarHeight(); int num3 = Y + 16; int num4 = this.Height - 32; int position = this.GetPosition(num4 - barHeight); Renderer.SetTexture((Texture)null); if (this.m_State == GEditorScroller.State.LargeScrollUp) { if (position > 0) { Renderer.PushAlpha(0.9f); Renderer.SolidRect(GumpColors.ControlDarkDark, X, Y + this.Width, this.Width, position); Renderer.PopAlpha(); int num1 = this.PointToClient(new Point(Engine.m_xMouse, Engine.m_yMouse)).Y - 16; if (position > num1) { this.Value -= this.LargeOffset; } else { this.m_State = GEditorScroller.State.Inactive; } } } else if (this.m_State == GEditorScroller.State.LargeScrollDown && num4 - position - barHeight > 0) { Renderer.PushAlpha(0.9f); Renderer.SolidRect(GumpColors.ControlDarkDark, X, num3 + position + barHeight, this.Width, num4 - position - barHeight); Renderer.PopAlpha(); int num1 = this.PointToClient(new Point(Engine.m_xMouse, Engine.m_yMouse)).Y - 16; if (position + barHeight < num1) { this.Value += this.LargeOffset; } else { this.m_State = GEditorScroller.State.Inactive; } } GumpPaint.DrawRaised3D(X, num3 + position, 16, barHeight); if (this.m_State == GEditorScroller.State.SmallScrollUp) { GumpPaint.DrawFlat(X, Y, this.Width, this.Width); Engine.m_WinScrolls[0].Draw(X + 5, Y + 7, GumpColors.ControlText); this.Value -= this.SmallOffset; } else { GumpPaint.DrawRaised3D(X, Y, this.Width, this.Width); Engine.m_WinScrolls[0].Draw(X + 4, Y + 6, GumpColors.ControlText); } Renderer.SetTexture((Texture)null); if (this.m_State == GEditorScroller.State.SmallScrollDown) { GumpPaint.DrawFlat(X, Y + this.Height - this.Width, this.Width, this.Width); Engine.m_WinScrolls[1].Draw(X + 5, Y + this.Height - this.Width + 7, GumpColors.ControlText); this.Value += this.SmallOffset; } else { GumpPaint.DrawRaised3D(X, Y + this.Height - this.Width, this.Width, this.Width); Engine.m_WinScrolls[1].Draw(X + 4, Y + this.Height - this.Width + 6, GumpColors.ControlText); } }
protected internal override void Draw(int x, int y) { Renderer.SetTexture((Texture)null); int num = 0; switch (this.m_Style) { case WindowsButtonStyle.Normal: switch (this.m_State) { case 0: GumpPaint.DrawRaised3D(x, y, this.m_Width, this.m_Height); this.CaptionDown = false; break; case 1: GumpPaint.DrawRaised3D(x, y, this.m_Width, this.m_Height); this.CaptionDown = false; break; case 2: GumpPaint.DrawFlat(x, y, this.m_Width, this.m_Height, GumpColors.ControlDark, GumpColors.Control); this.CaptionDown = true; num = 1; break; } break; case WindowsButtonStyle.Flat: switch (this.m_State) { case 0: GumpPaint.DrawFlat(x, y, this.m_Width, this.m_Height, GumpColors.ControlDarkDark, GumpColors.Control); this.CaptionDown = false; break; case 1: GumpPaint.DrawFlat(x, y, this.m_Width, this.m_Height, GumpColors.ControlDarkDark, GumpColors.ControlAlternate); this.CaptionDown = false; break; case 2: GumpPaint.DrawFlat(x, y, this.m_Width, this.m_Height, GumpColors.ControlDarkDark, GumpPaint.Blend(GumpColors.ControlAlternate, GumpColors.ControlLightLight, 128)); this.CaptionDown = false; break; } break; } if (this.m_Image == null) { return; } if (this.m_vCache == null) { this.m_vCache = new VertexCache(); } if (this.m_ImageColor == -1) { this.m_vCache.Draw(this.m_Image, num + x + (this.m_Width - (this.m_Image.xMax - this.m_Image.xMin + 1)) / 2 - this.m_Image.xMin, num + y + (this.m_Height - (this.m_Image.yMax - this.m_Image.yMin + 1)) / 2 - this.m_Image.yMin); } else { this.m_vCache.Draw(this.m_Image, num + x + (this.m_Width - (this.m_Image.xMax - this.m_Image.xMin + 1)) / 2 - this.m_Image.xMin, num + y + (this.m_Height - (this.m_Image.yMax - this.m_Image.yMin + 1)) / 2 - this.m_Image.yMin, this.m_ImageColor); } }