Class OverlayWindow
Represents a transparent overlay window.
Implements
Inherited Members
Namespace: GameOverlay.Windows
Assembly: GameOverlay.dll
Syntax
public class OverlayWindow : IDisposable
Constructors
| Improve this Doc View SourceOverlayWindow()
Initializes a new OverlayWindow.
Declaration
public OverlayWindow()
OverlayWindow(Int32, Int32, Int32, Int32)
Initializes a new OverlayWindow using the given postion and size.
Declaration
public OverlayWindow(int x, int y, int width, int height)
Parameters
Type | Name | Description |
---|---|---|
Int32 | x | The x-coordinate of the window. |
Int32 | y | The y-coordinate of the window. |
Int32 | width | The width of the window. |
Int32 | height | The height of the window. |
Properties
| Improve this Doc View SourceClassName
Gets or sets the windows class name.
Declaration
public string ClassName { get; set; }
Property Value
Type | Description |
---|---|
String |
Handle
Gets the window handle of this instance.
Declaration
public IntPtr Handle { get; }
Property Value
Type | Description |
---|---|
IntPtr |
Height
Gets or sets the height of the window.
Declaration
public int Height { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
IsInitialized
A Boolean indicating whether this instance is initialized.
Declaration
public bool IsInitialized { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsTopmost
Gets or sets a Boolean indicating whether this window is topmost.
Declaration
public bool IsTopmost { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
IsVisible
Gets or sets a Boolean indicating whether this window is visible.
Declaration
public bool IsVisible { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
MenuName
Gets the windows menu name.
Declaration
public string MenuName { get; set; }
Property Value
Type | Description |
---|---|
String |
Title
Gets or sets the windows title.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
String |
Width
Gets or sets the width of the window.
Declaration
public int Width { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
X
Gets or sets the x-coordinate of the window.
Declaration
public int X { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Y
Gets or sets the y-coordinate of the window.
Declaration
public int Y { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceCreate()
Setup and initializes the window.
Declaration
public virtual void Create()
Dispose()
Releases all resources used by this OverlayWindow.
Declaration
public void Dispose()
Dispose(Boolean)
Releases all resources used by this OverlayWindow.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | A Boolean value indicating whether this is called from the destructor. |
Equals(OverlayWindow)
Returns a value indicating whether two specified instances of OverlayWindow represent the same value.
Declaration
public bool Equals(OverlayWindow value)
Parameters
Type | Name | Description |
---|---|---|
OverlayWindow | value | An object to compare to this instance. |
Returns
Type | Description |
---|---|
Boolean | true if |
Equals(OverlayWindow, OverlayWindow)
Returns a value indicating whether two specified instances of OverlayWindow represent the same value.
Declaration
public static bool Equals(OverlayWindow left, OverlayWindow right)
Parameters
Type | Name | Description |
---|---|---|
OverlayWindow | left | The first object to compare. |
OverlayWindow | right | The second object to compare. |
Returns
Type | Description |
---|---|
Boolean | true if |
Equals(Object)
Returns a value indicating whether this instance and a specified Object represent the same type and value.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object to compare with this instance. |
Returns
Type | Description |
---|---|
Boolean | true if |
Overrides
| Improve this Doc View SourceFinalize()
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
Declaration
protected void Finalize()
FitTo(IntPtr, Boolean)
Adapts to another window in the postion and size.
Declaration
public void FitTo(IntPtr windowHandle, bool attachToClientArea = false)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | windowHandle | The target window handle. |
Boolean | attachToClientArea | A Boolean determining whether to fit to the client area of the target window. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A 32-bit signed integer hash code. |
Overrides
| Improve this Doc View SourceHide()
Makes the window invisible.
Declaration
public void Hide()
Join()
Waits until the Thread used by this instance has exited.
Declaration
public virtual void Join()
Move(Int32, Int32)
Changes the position of the window using the given coordinates.
Declaration
public void Move(int x, int y)
Parameters
Type | Name | Description |
---|---|---|
Int32 | x | The new x-coordinate of the window. |
Int32 | y | The new y-coordinate of the window. |
OnPositionChanged(Int32, Int32)
Gets called whenever the position of the window changes.
Declaration
protected virtual void OnPositionChanged(int x, int y)
Parameters
Type | Name | Description |
---|---|---|
Int32 | x | The new x-coordinate of the window. |
Int32 | y | The new y-coordinate of the window. |
OnPropertyChanged(String, Object)
Gets called whenever a property of this instance changes.
Declaration
protected virtual void OnPropertyChanged(string propertyName, object value)
Parameters
Type | Name | Description |
---|---|---|
String | propertyName | The name of the changed property. (case-sensitive) |
Object | value | The new value of the changed property. |
OnSizeChanged(Int32, Int32)
Gets called whenever the size of the window changes.
Declaration
protected virtual void OnSizeChanged(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
Int32 | width | The new width of the window. |
Int32 | height | The new height of the window. |
OnVisibilityChanged(Boolean)
Gets called whenever the visibility of the window changes.
Declaration
protected virtual void OnVisibilityChanged(bool isVisible)
Parameters
Type | Name | Description |
---|---|---|
Boolean | isVisible | A Boolean indicating the new visibility of the window. |
PlaceAbove(IntPtr)
Places the OverlayWindow above the target window according to the windows z-order.
Declaration
public void PlaceAbove(IntPtr windowHandle)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | windowHandle | The target window handle. |
Recreate()
Destroys the current window and creates a new one using the same attributes.
Declaration
public void Recreate()
Resize(Int32, Int32)
Changes the size of the window using the given width and height.
Declaration
public void Resize(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
Int32 | width | The new width of the window. |
Int32 | height | The new height of the window. |
Resize(Int32, Int32, Int32, Int32)
Changes the size of the window using the given dimension.
Declaration
public void Resize(int x, int y, int width, int height)
Parameters
Type | Name | Description |
---|---|---|
Int32 | x | The new x-coordinate of the window. |
Int32 | y | The new y-coordinate of the window. |
Int32 | width | The new width of the window. |
Int32 | height | The new height of the window. |
Show()
Makes the window visible.
Declaration
public void Show()
ToString()
Converts this OverlayWindow structure to a human-readable string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string representation of this OverlayWindow. |
Overrides
Events
| Improve this Doc View SourcePositionChanged
Fires when the postion of the window has changed.
Declaration
public event EventHandler<OverlayPositionEventArgs> PositionChanged
Event Type
Type | Description |
---|---|
EventHandler<OverlayPositionEventArgs> |
PropertyChanged
Fires when a property of this class changed it's value.
Declaration
public event EventHandler<OverlayPropertyChangedEventArgs> PropertyChanged
Event Type
Type | Description |
---|---|
EventHandler<OverlayPropertyChangedEventArgs> |
SizeChanged
Fires when the size of the window has changed.
Declaration
public event EventHandler<OverlaySizeEventArgs> SizeChanged
Event Type
Type | Description |
---|---|
EventHandler<OverlaySizeEventArgs> |
VisibilityChanged
Fires when the visibility of the window has changed.
Declaration
public event EventHandler<OverlayVisibilityEventArgs> VisibilityChanged
Event Type
Type | Description |
---|---|
EventHandler<OverlayVisibilityEventArgs> |