Gah - a solution with more questions. – EntropicLqd

Legacy:Solid Snake/CeFloatingWindow

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
Chaos Engine:: ceInterface >> ceFloatingWindow

Variables

i_WindowBackgroundImage (GUIImage) automated 
This is legacy code and will be removed at some stage.
i_WindowBackgroundGradient (GUIImage) automated 
This is legacy code and will be removed at some stage.
OldMouseX (float)
Stores the old mouse X position which is used for the calculation the movement of the window.
OldMouseY (float)
Stores the old mouse Y position which is used for the calculation the movement of the window.
WindowBackgroundImage (Material
This defines what image to use as the window background. This is now legacy code.
WindowBackgroundColor (color
This defines what image color to use for the window background. This is now legacy code.
bUseTitleBar (bool
This toggles the use of a title/head bar on the window.
LeftBorder (int
This defines the left border at which the window cannot move/enlarge past.
RightBorder (int
This defines the right border at which the window cannot move/enlarge past.
UpperBorder (int
This defines the top border at which the window cannot move/enlarge past.
BottomBorder (int
This defines the bottom border at which the window cannot move/enlarge past.

A lot of these variables were first defined on the creation of this class. I will probably optimize a lot of the code a little later on, or compress them into structs to allow for easier code handling.

Functions

InitComponent(GUIController MyController, GUIComponent MyOwner) 
This function is called on the creation of the window. What occurs here is simple variable setting, the creation of the title bar (if bUseTitleBar is true) and the setting of the background image (Now redundant).
MyController (GUIController
This is the GUIController.
MyOwner (GUIComponent)
Often when GUIComponents are created, they are owned by another GUIComponent.
GUIButton AddSystemButton(string StyleName) [GUIButton]
This creates the buttons that stay within the title bar, returning the created button.
StyleName (string
This is the style name of the style that should be created for the new button.
AddSystemMenu() 
This is a function which you can subclass to create more buttons.
GetModuleInfo() [class<ceModuleInfo>]
This function returns the ceModuleInfo class that resides within ceGUIController.ModuleInfo. If that variable is none, then it returns class'ceModuleInfo' as the default value.
InternalOnClick(GUIComponent Sender) [bool]
This function is called when most GUIComponents are clicked.
Sender (GUIComponent
This points to the GUIComponent that called this function. Returns a boolean value.
InternalOnPreDraw(Canvas|Canvas) [bool]
With InternalOnPreDraw, you can change GUIComponent values safely before they are rendered, thus this is the best place to change their images or their positions. Return true if you wish to override the native OnPreDraw function.
Canvas (Canvas
This points to the Canvas which called this function.
SetFocus(GUIComponent Who) 
This is called when focus is set back to the window. The main reason for this is to reset the desktop menu bar, although you can use it for other purposes as well.
Who (GUIComponent
I haven't figured out this one yet.
SetWindowPosition(float NewActualLeft, float NewActualTop, float NewActualWidth, float NewActualHeight) 
This function sets the new window position and width.
NewActualLeft (float
This is the new left position of the window in pixels.
NewActualTop (float
This is the new top position of the window in pixels.
NewActualWidth (float
This is the new width of the window in pixels.
NewActualHeight (float
This is the new height of the window in pixels.
FloatingMousePressed(GUIComponent Sender, bool bRepeat) 
This is another function which specifically handles the mouse interactions with the window, in specifically the dragging of the window mouse to move/resize the window.
Sender (GUIComponent
This is the GUIComponent that called this function.
bRepeat (bool
Not 100% sure at this moment. I guess this is true if the mouse clicks are repeated.
FloatingMouseRelease(GUIComponent Sender) 
This is in response to when the mouse is released when dragging the window to move/resize the window.
Sender (GUIComponent
This is the GUIComponent that called this function.
ForceWindowPosition(float NewActualLeft, float NewActualTop, float NewActualWidth, float NewActualHeight) 
This function forces the window position to the ones parsed and saves it.
NewActualLeft (float
This is the new left position of the window in pixels.
NewActualTop (float
This is the new top position of the window in pixels.
NewActualWidth (float
This is the new width of the window in pixels.
NewActualHeight (float
This is the new height of the window in pixels.
FloatingPreDraw(Canvas C) [bool
This function controls the calculation of the new window position and size.
function FloatingRendered(Canvas C) 
This function doesn't do anything any more.

Comments