9 protected CameraToolsMenu
m_Menu;
19 void CTKeyframe(
int index,
vector pos,
vector orient,
float int_value,
float fov,
float dof,
int pin,
float time_before,
Widget root, CameraToolsMenu parent )
26 m_InterpTimeWidget = EditBoxWidget.Cast(
m_Root.FindAnyWidget(
"keyframe_time_edit" ) );
27 m_FOVWidget = EditBoxWidget.Cast(
m_Root.FindAnyWidget(
"keyframe_fov_edit" ) );
28 m_DOFWidget = EditBoxWidget.Cast(
m_Root.FindAnyWidget(
"keyframe_dof_edit" ) );
29 m_PinWidget = EditBoxWidget.Cast(
m_Root.FindAnyWidget(
"keyframe_pin_edit" ) );
30 m_TotalTimeWidget =
TextWidget.Cast(
m_Root.FindAnyWidget(
"keyframe_time" ) );
33 m_TotalTimeBefore = time_before;
41 m_IndexWidget.SetText( m_Index.ToString() );
52 string time_text = m_InterpTimeWidget.GetText();
53 m_InterpTime = time_text.
ToFloat();
59 m_PinWidget.SetText( pin.ToString() );
64 return m_PinWidget.GetText().ToInt();
69 m_FOVWidget.SetText( fov.
ToString() );
74 return m_FOVWidget.GetText().ToFloat();
79 m_DOFWidget.SetText( dof.
ToString() );
84 return m_DOFWidget.GetText().ToFloat();
109 m_TotalTimeBefore = time;
110 m_TotalTimeWidget.SetText( ( m_TotalTimeBefore + m_InterpTime ).
ToString() );
116 m_InterpTimeWidget.SetText( m_InterpTime.
ToString() );
117 m_TotalTimeWidget.SetText( ( m_TotalTimeBefore + m_InterpTime ).
ToString() );
122 m_Root.FindAnyWidget(
"spacer" ).SetAlpha( 1 );
123 m_IndexWidget.SetColor(
ARGBF( 1, 1, 0, 0 ) );
124 m_InterpTimeWidget.SetColor(
ARGBF( 1, 1, 0, 0 ) );
125 m_TotalTimeWidget.SetColor(
ARGBF( 1, 1, 0, 0 ) );
130 m_Root.FindAnyWidget(
"spacer" ).SetAlpha( 0.625 );
131 m_IndexWidget.SetColor(
ARGBF( 1, 1, 1, 1 ) );
132 m_InterpTimeWidget.SetColor(
ARGBF( 1, 1, 1, 1 ) );
133 m_TotalTimeWidget.SetColor(
ARGBF( 1, 1, 1, 1 ) );
140 m_Menu.SelectKeyframe(
this );
150 m_Menu.SelectKeyframe(
this );
160 return ( w == m_InterpTimeWidget || w == m_TotalTimeWidget || w == m_FOVWidget || w == m_DOFWidget );
protected vector m_Position
Cached world position.
protected ServerBrowserMenuNew m_Menu
proto native WorkspaceWidget GetWorkspace()
proto native CGame GetGame()
proto native float ToFloat()
Converts string to float.
int ARGBF(float fa, float fr, float fg, float fb)
Converts <0.0, 1.0> ARGB into color.