home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Game Level Design
/
GLDesign.bin
/
Software
/
UnrealEngine2Runtime
/
UE2Runtime-22262001_Demo.exe
/
GUI
/
Classes
/
GUISplitter.uc
< prev
next >
Wrap
Text File
|
2003-06-30
|
2KB
|
80 lines
// ====================================================================
// Class: GUI.GUISplitter
//
// GUISplitters allow the user to size two other controls (usually Panels)
//
// Written by Jack Porter
// (c) 2002, Epic Games, Inc. All Rights Reserved
// ====================================================================
class GUISplitter extends GUIPanel
native;
cpptext
{
void PreDraw(UCanvas* Canvas);
void Draw(UCanvas* Canvas);
UBOOL MouseMove(INT XDelta, INT YDelta);
UBOOL MousePressed(UBOOL IsRepeat);
UBOOL MouseReleased();
UBOOL MouseHover();
void SplitterUpdatePositions();
}
enum EGUISplitterType
{
SPLIT_Vertical,
SPLIT_Horizontal,
};
var(Menu) EGUISplitterType SplitOrientation;
var(Menu) float SplitPosition; // 0.0 - 1.0
var bool bFixedSplitter; // Can splitter be moved?
var bool bDrawSplitter; // Draw the actual splitter bar
var float SplitAreaSize; // size of splitter thing
var string DefaultPanels[2]; // Names of the default panels
var GUIComponent Panels[2]; // Quick Reference
var float MaxPercentage; // How big can any 1 panel get
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
Super.Initcomponent(MyController, MyOwner);
if (DefaultPanels[0]!="")
{
Panels[0] = AddComponent(DefaultPanels[0]);
if (DefaultPanels[1]!="")
Panels[1] = Addcomponent(DefaultPanels[1]);
}
SplitterUpdatePositions();
}
event GUIComponent AppendComponent(GUIComponent NewComp)
{
Controls[Controls.Length] = NewComp;
NewComp.InitComponent(Controller, Self);
NewComp.bBoundToParent = true;
NewComp.bScaleToParent = true;
RemapComponents();
return NewComp;
}
native function SplitterUpdatePositions();
defaultproperties
{
StyleName="SquareButton"
SplitOrientation=SPLIT_Vertical
bCaptureTabs=False
bNeverFocus=True
bTabStop=False
bAcceptsInput=True
SplitPosition=0.5
SplitAreaSize=8
bDrawSplitter=True
bBoundToParent=True
bScaleToParent=True
MaxPercentage=0.0
}