* Entity Inspector->smartedit->color chooser sets actual key, was always _color
This commit is contained in:
parent
5b226482b8
commit
286f784ecf
|
|
@ -255,17 +255,15 @@ void update(){
|
||||||
gtk_entry_set_text( GTK_ENTRY( m_entry.m_entry.m_entry ), value.c_str() );
|
gtk_entry_set_text( GTK_ENTRY( m_entry.m_entry.m_entry ), value.c_str() );
|
||||||
}
|
}
|
||||||
typedef MemberCaller<ColorAttribute, &ColorAttribute::update> UpdateCaller;
|
typedef MemberCaller<ColorAttribute, &ColorAttribute::update> UpdateCaller;
|
||||||
void browse( const BrowsedPathEntry::SetPathCallback& setPath ){
|
void browse( const BrowsedPathEntry::SetPathCallback& setPath ){ /* hijack BrowsedPathEntry to call colour chooser */
|
||||||
//const char *filename = misc_model_dialog( gtk_widget_get_toplevel( GTK_WIDGET( m_entry.m_entry.m_frame ) ) );
|
Vector3 color( 1, 1, 1 );
|
||||||
|
string_parse_vector3( gtk_entry_get_text( GTK_ENTRY( m_entry.m_entry.m_entry ) ), color );
|
||||||
/* hijack BrowsedPathEntry to call colour chooser */
|
if( color_dialog( gtk_widget_get_toplevel( GTK_WIDGET( m_entry.m_entry.m_frame ) ), color ) ){
|
||||||
Entity_setColour();
|
char buffer[64];
|
||||||
|
sprintf( buffer, "%g %g %g", color[0], color[1], color[2] );
|
||||||
// if ( filename != 0 ) {
|
gtk_entry_set_text( GTK_ENTRY( m_entry.m_entry.m_entry ), buffer );
|
||||||
// setPath( filename );
|
apply();
|
||||||
// apply();
|
}
|
||||||
// }
|
|
||||||
update();
|
|
||||||
}
|
}
|
||||||
typedef MemberCaller1<ColorAttribute, const BrowsedPathEntry::SetPathCallback&, &ColorAttribute::browse> BrowseCaller;
|
typedef MemberCaller1<ColorAttribute, const BrowsedPathEntry::SetPathCallback&, &ColorAttribute::browse> BrowseCaller;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user