本文整理汇总了C#中Client.Gump.IsChildOf方法的典型用法代码示例。如果您正苦于以下问题:C# Gump.IsChildOf方法的具体用法?C# Gump.IsChildOf怎么用?C# Gump.IsChildOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client.Gump
的用法示例。
在下文中一共展示了Gump.IsChildOf方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnFocusChanged
protected internal override void OnFocusChanged(Gump g)
{
if (this.m_Destroy && ((g == null) || !g.IsChildOf(this)))
{
Gumps.Destroy(this);
}
}
示例2: RecurseMouseUp
private static bool RecurseMouseUp(int X, int Y, Gump g, int mX, int mY, MouseButtons mb)
{
if (g.Visible && (g.m_NonRestrictivePicking || (((mX >= X) && (mX < (X + g.Width))) && ((mY >= Y) && (mY < (Y + g.Height))))))
{
Gump[] gumpArray = g.Children.ToArray();
for (int i = gumpArray.Length - 1; i >= 0; i--)
{
Gump gump = gumpArray[i];
if (RecurseMouseUp(X + gump.X, Y + gump.Y, gump, mX, mY, mb))
{
return true;
}
}
if (!g.m_NonRestrictivePicking || (((mX >= X) && (mX < (X + g.Width))) && ((mY >= Y) && (mY < (Y + g.Height)))))
{
if ((m_Modal == null) && g.HitTest(mX - X, mY - Y))
{
g.OnMouseUp(mX - X, mY - Y, mb);
return true;
}
if (((m_Modal != null) && g.IsChildOf(m_Modal)) && g.HitTest(mX - X, mY - Y))
{
g.OnMouseUp(mX - X, mY - Y, mb);
return true;
}
}
}
return false;
}
示例3: RecurseMouseMove
private static bool RecurseMouseMove(int X, int Y, Gump g, int mX, int mY, MouseButtons mb)
{
if (g.Visible && (g.m_NonRestrictivePicking || (((mX >= X) && (mX < (X + g.Width))) && ((mY >= Y) && (mY < (Y + g.Height))))))
{
Gump[] gumpArray = g.Children.ToArray();
for (int i = gumpArray.Length - 1; i >= 0; i--)
{
Gump gump = gumpArray[i];
if (RecurseMouseMove(X + gump.X, Y + gump.Y, gump, mX, mY, mb))
{
return true;
}
}
if (!g.m_NonRestrictivePicking || (((mX >= X) && (mX < (X + g.Width))) && ((mY >= Y) && (mY < (Y + g.Height)))))
{
if ((m_Modal == null) && g.HitTest(mX - X, mY - Y))
{
if (m_LastOver == g)
{
g.OnMouseMove(mX - X, mY - Y, mb);
}
else
{
if (m_LastOver != null)
{
m_LastOver.OnMouseLeave();
}
g.OnMouseEnter(mX - X, mY - Y, mb);
if (g.Tooltip != null)
{
m_TipDelay = new TimeDelay(g.Tooltip.Delay);
}
else
{
m_TipDelay = null;
}
m_LastOver = g;
}
return true;
}
if (((m_Modal != null) && g.IsChildOf(m_Modal)) && g.HitTest(mX - X, mY - Y))
{
if (m_LastOver == g)
{
g.OnMouseMove(mX - X, mY - Y, mb);
}
else
{
if (m_LastOver != null)
{
m_LastOver.OnMouseLeave();
}
g.OnMouseEnter(mX - X, mY - Y, mb);
if (g.Tooltip != null)
{
m_TipDelay = new TimeDelay(g.Tooltip.Delay);
}
else
{
m_TipDelay = null;
}
m_LastOver = g;
}
return true;
}
}
}
return false;
}
示例4: RecurseMouseDown
private static bool RecurseMouseDown(int X, int Y, Gump g, int mX, int mY, MouseButtons mb)
{
if (g.Visible && (g.m_NonRestrictivePicking || (((mX >= X) && (mX < (X + g.Width))) && ((mY >= Y) && (mY < (Y + g.Height))))))
{
Gump[] gumpArray = g.Children.ToArray();
for (int i = gumpArray.Length - 1; i >= 0; i--)
{
Gump gump = gumpArray[i];
if (RecurseMouseDown(X + gump.X, Y + gump.Y, gump, mX, mY, mb))
{
return true;
}
}
if (!g.m_NonRestrictivePicking || (((mX >= X) && (mX < (X + g.Width))) && ((mY >= Y) && (mY < (Y + g.Height)))))
{
if ((m_Modal == null) && g.HitTest(mX - X, mY - Y))
{
if (m_TextFocus != null)
{
m_TextFocus.Unfocus();
m_TextFocus = null;
}
if (((m_Drag == null) && g.m_CanDrag) && (mb == MouseButtons.Left))
{
m_StartDrag = g;
m_StartDragPoint = new Point(mX, mY);
g.m_OffsetX = mX - X;
g.m_OffsetY = mY - Y;
if (g.m_QuickDrag)
{
g.m_IsDragging = true;
m_Drag = g;
g.OnDragStart();
}
}
g.OnMouseDown(mX - X, mY - Y, mb);
Focus = g;
if (g == m_Drag)
{
return !IsWorldAt(mX, mY, false);
}
return true;
}
if (((m_Modal != null) && g.IsChildOf(m_Modal)) && g.HitTest(mX - X, mY - Y))
{
if (m_TextFocus != null)
{
m_TextFocus.Unfocus();
m_TextFocus = null;
}
if (((m_Drag == null) && g.m_CanDrag) && (mb == MouseButtons.Left))
{
m_StartDrag = g;
m_StartDragPoint = new Point(mX, mY);
g.m_OffsetX = mX - X;
g.m_OffsetY = mY - Y;
if (g.m_QuickDrag)
{
g.m_IsDragging = true;
g.OnDragStart();
m_Drag = g;
}
}
g.OnMouseDown(mX - X, mY - Y, mb);
Focus = g;
if (g == m_Drag)
{
return !IsWorldAt(mX, mY, false);
}
return true;
}
}
}
return false;
}
示例5: RecurseFindListForSingleClick
private static object[] RecurseFindListForSingleClick(int x, int y, Gump g, int mx, int my)
{
if (g.Visible && (g.m_NonRestrictivePicking || (((mx >= x) && (mx < (x + g.Width))) && ((my >= y) && (my < (y + g.Height))))))
{
Gump[] gumpArray = g.Children.ToArray();
for (int i = gumpArray.Length - 1; i >= 0; i--)
{
Gump gump = gumpArray[i];
object[] objArray = RecurseFindListForSingleClick(x + gump.X, y + gump.Y, gump, mx, my);
if (objArray != null)
{
return objArray;
}
}
if (!g.m_NonRestrictivePicking || (((mx >= x) && (mx < (x + g.Width))) && ((my >= y) && (my < (y + g.Height)))))
{
if ((m_Modal == null) && g.HitTest(mx - x, my - y))
{
return new object[] { g, new Point(mx - x, my - y) };
}
if (((m_Modal != null) && g.IsChildOf(m_Modal)) && g.HitTest(mx - x, my - y))
{
return new object[] { g, new Point(mx - x, my - y) };
}
}
}
return null;
}
示例6: RecurseDoubleClick
private static bool RecurseDoubleClick(int X, int Y, Gump g, int mX, int mY)
{
if (g.Visible && (g.m_NonRestrictivePicking || (((mX >= X) && (mX < (X + g.Width))) && ((mY >= Y) && (mY < (Y + g.Height))))))
{
Gump[] gumpArray = g.Children.ToArray();
for (int i = gumpArray.Length - 1; i >= 0; i--)
{
Gump gump = gumpArray[i];
if (RecurseDoubleClick(X + gump.X, Y + gump.Y, gump, mX, mY))
{
return true;
}
}
if (!g.m_NonRestrictivePicking || (((mX >= X) && (mX < (X + g.Width))) && ((mY >= Y) && (mY < (Y + g.Height)))))
{
if ((m_Modal == null) && g.HitTest(mX - X, mY - Y))
{
if (m_TextFocus != null)
{
m_TextFocus.Unfocus();
m_TextFocus = null;
}
g.OnDoubleClick(mX - X, mY - Y);
return true;
}
if (((m_Modal != null) && g.IsChildOf(m_Modal)) && g.HitTest(mX - X, mY - Y))
{
if (m_TextFocus != null)
{
m_TextFocus.Unfocus();
m_TextFocus = null;
}
g.OnDoubleClick(mX - X, mY - Y);
return true;
}
}
}
return false;
}