temp fix for double-free
This commit is contained in:
@@ -220,7 +220,7 @@ CString OptionRow::GetRowTitle() const
|
|||||||
|
|
||||||
return sTitle;
|
return sTitle;
|
||||||
}
|
}
|
||||||
|
#include "ActorUtil.h"
|
||||||
/* Set up text, underlines and titles for options. This can be called
|
/* Set up text, underlines and titles for options. This can be called
|
||||||
* as soon as m_RowDef is available. */
|
* as soon as m_RowDef is available. */
|
||||||
void OptionRow::InitText()
|
void OptionRow::InitText()
|
||||||
@@ -235,7 +235,7 @@ void OptionRow::InitText()
|
|||||||
m_textTitle = new BitmapText( m_pParentType->m_textTitle );
|
m_textTitle = new BitmapText( m_pParentType->m_textTitle );
|
||||||
m_Frame.AddChild( m_textTitle );
|
m_Frame.AddChild( m_textTitle );
|
||||||
|
|
||||||
m_sprBullet.Load( THEME->GetPathG(m_pParentType->m_sType,"bullet") );
|
m_sprBullet = ActorUtil::MakeActor( THEME->GetPathG(m_pParentType->m_sType,"bullet") );
|
||||||
m_sprBullet->SetDrawOrder(-1); // under title
|
m_sprBullet->SetDrawOrder(-1); // under title
|
||||||
m_Frame.AddChild( m_sprBullet );
|
m_Frame.AddChild( m_sprBullet );
|
||||||
|
|
||||||
@@ -573,7 +573,7 @@ void OptionRow::UpdateEnabledDisabled()
|
|||||||
if( m_bHidden )
|
if( m_bHidden )
|
||||||
color.a = 0;
|
color.a = 0;
|
||||||
|
|
||||||
if( m_sprBullet.IsLoaded() )
|
if( m_sprBullet != NULL )
|
||||||
m_sprBullet->SetGlobalDiffuseColor( color );
|
m_sprBullet->SetGlobalDiffuseColor( color );
|
||||||
m_textTitle->SetGlobalDiffuseColor( color );
|
m_textTitle->SetGlobalDiffuseColor( color );
|
||||||
|
|
||||||
@@ -662,7 +662,7 @@ void OptionRow::UpdateEnabledDisabled()
|
|||||||
m_textTitle->BeginTweening( m_pParentType->TWEEN_SECONDS );
|
m_textTitle->BeginTweening( m_pParentType->TWEEN_SECONDS );
|
||||||
m_textTitle->SetDiffuseAlpha( color.a );
|
m_textTitle->SetDiffuseAlpha( color.a );
|
||||||
|
|
||||||
if( m_sprBullet.IsLoaded() )
|
if( m_sprBullet != NULL )
|
||||||
{
|
{
|
||||||
m_sprBullet->StopTweening();
|
m_sprBullet->StopTweening();
|
||||||
m_sprBullet->BeginTweening( m_pParentType->TWEEN_SECONDS );
|
m_sprBullet->BeginTweening( m_pParentType->TWEEN_SECONDS );
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ protected:
|
|||||||
vector<BitmapText *> m_textItems; // size depends on m_bRowIsLong and which players are joined
|
vector<BitmapText *> m_textItems; // size depends on m_bRowIsLong and which players are joined
|
||||||
vector<OptionsCursor *> m_Underline[NUM_PLAYERS]; // size depends on m_bRowIsLong and which players are joined
|
vector<OptionsCursor *> m_Underline[NUM_PLAYERS]; // size depends on m_bRowIsLong and which players are joined
|
||||||
|
|
||||||
AutoActor m_sprBullet;
|
Actor *m_sprBullet;
|
||||||
BitmapText *m_textTitle;
|
BitmapText *m_textTitle;
|
||||||
OptionIcon *m_OptionIcons[NUM_PLAYERS];
|
OptionIcon *m_OptionIcons[NUM_PLAYERS];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user