Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct EDGUISurfaceProps : EDGUILayoutRow
- {
- EDGUISurfaceProps() :
- m_xoff( 0, 2, 0, 1 ),
- m_yoff( 0, 2, 0, 1 ),
- m_xscale( 1, 2, 0.01f, 100 ),
- m_yscale( 1, 2, 0.01f, 100 ),
- m_angle( 0, 1, 0, 360 )
- {
- m_xoff.caption = "X offset";
- m_yoff.caption = "Y offset";
- m_xscale.caption = "X scale";
- m_yscale.caption = "Y scale";
- m_angle.caption = "Angle";
- Add( &m_group );
- m_group.Add( &m_xoff );
- m_group.Add( &m_yoff );
- m_group.Add( &m_xscale );
- m_group.Add( &m_yscale );
- m_group.Add( &m_angle );
- }
- void Prepare( EdSurface& S, int sid )
- {
- char bfr[ 32 ];
- snprintf( bfr, sizeof(bfr), "Surface #%d", sid );
- m_group.caption = bfr;
- m_group.SetOpen( true );
- m_xoff.SetValue( S.xoff );
- m_yoff.SetValue( S.yoff );
- m_xscale.SetValue( S.xscale );
- m_yscale.SetValue( S.yscale );
- m_angle.SetValue( S.angle );
- }
- EDGUIGroup m_group;
- EDGUIPropFloat m_xoff;
- EDGUIPropFloat m_yoff;
- EDGUIPropFloat m_xscale;
- EDGUIPropFloat m_yscale;
- EDGUIPropFloat m_angle;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement