Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 |
//============================================================================= // Music Menu Music ListGrid //============================================================================= class MMMusListGrid extends UWindowGrid; var MMMusClientWindow MMClient; var UWindowGridColumn MusicName; var int ListCount,SelectedRow; var array<string> PackageSongs; function Created() { Super.Created(); RowHeight = 12; MusicName = AddColumn(Class'MMMusicListGrid'.Default.MusicNameStr, WinWidth-LookAndFeel.Size_ScrollbarWidth); } function Resized() { Super.Resized(); MusicName.WinWidth = WinWidth-LookAndFeel.Size_ScrollbarWidth; } function PaintColumn(Canvas C, UWindowGridColumn Column, float MouseX, float MouseY) { local float Y; local int Visible; local int Skipped; local int TopMargin; local int BottomMargin,Current; C.Font = Root.Fonts[F_Normal]; if (bShowHorizSB) BottomMargin = LookAndFeel.Size_ScrollbarWidth; else BottomMargin = 0; TopMargin = LookAndFeel.ColumnHeadingHeight; Visible = int((WinHeight - (TopMargin + BottomMargin))/RowHeight); VertSB.SetRange(0, ListCount+1, Visible); TopRow = VertSB.Pos; Skipped = 0; Y = 1; while ( (Y<RowHeight + WinHeight - RowHeight - (TopMargin + BottomMargin)) && Current<ListCount ) { if ( Skipped >= VertSB.Pos ) { // Draw highlight if ( Current==SelectedRow ) Column.DrawStretchedTexture( C, 0, Y-1 + TopMargin, Column.WinWidth, RowHeight + 1, Texture'MenuHighlight'); if ( Column==MusicName ) Column.ClipText( C, 2, Y + TopMargin, PackageSongs[Current] ); Y = Y + RowHeight; } Skipped++; Current++; } } function SelectRow(int Row) { SelectedRow = Clamp(Row,0,ListCount-1); } function DoubleClickRow(int Row) { MMClient.MainWin.NotifyToWin.EditBox.SetValue(PackageSongs[Clamp(Row,0,ListCount-1)]); MMClient.MainWin.Close(); } defaultproperties { SelectedRow=-1 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |