@@ -319,15 +319,13 @@ internal void ConstructEvaluateButtons(GameObject argsHolder)
319319 default , new Color ( 1 , 1 , 1 , 0 ) ) ;
320320 UIFactory . SetLayoutElement ( evalGroupObj , minHeight : 25 , flexibleHeight : 0 , flexibleWidth : 5000 ) ;
321321
322- var colors = new ColorBlock ( ) ;
323- colors = RuntimeProvider . Instance . SetColorBlock ( colors , new Color ( 0.4f , 0.4f , 0.4f ) ,
324- new Color ( 0.4f , 0.7f , 0.4f ) , new Color ( 0.3f , 0.3f , 0.3f ) ) ;
325-
326322 var evalButton = UIFactory . CreateButton ( evalGroupObj ,
327323 "EvalButton" ,
328324 $ "Evaluate ({ ParamCount } )",
329- null ,
330- colors ) ;
325+ null ) ;
326+
327+ RuntimeProvider . Instance . SetColorBlock ( evalButton , new Color ( 0.4f , 0.4f , 0.4f ) ,
328+ new Color ( 0.4f , 0.7f , 0.4f ) , new Color ( 0.3f , 0.3f , 0.3f ) ) ;
331329
332330 UIFactory . SetLayoutElement ( evalButton . gameObject , minWidth : 100 , minHeight : 22 , flexibleWidth : 0 ) ;
333331
@@ -345,7 +343,7 @@ internal void ConstructEvaluateButtons(GameObject argsHolder)
345343 argsHolder . SetActive ( true ) ;
346344 m_isEvaluating = true ;
347345 evalText . text = "Evaluate" ;
348- evalButton . colors = RuntimeProvider . Instance . SetColorBlock ( evalButton . colors , new Color ( 0.3f , 0.6f , 0.3f ) ) ;
346+ RuntimeProvider . Instance . SetColorBlock ( evalButton , new Color ( 0.3f , 0.6f , 0.3f ) ) ;
349347
350348 cancelButton . gameObject . SetActive ( true ) ;
351349 }
@@ -365,18 +363,17 @@ internal void ConstructEvaluateButtons(GameObject argsHolder)
365363 m_isEvaluating = false ;
366364
367365 evalText . text = $ "Evaluate ({ ParamCount } )";
368- evalButton . colors = RuntimeProvider . Instance . SetColorBlock ( evalButton . colors , new Color ( 0.4f , 0.4f , 0.4f ) ) ;
366+ RuntimeProvider . Instance . SetColorBlock ( evalButton , new Color ( 0.4f , 0.4f , 0.4f ) ) ;
369367 } ) ;
370368 }
371369 else if ( this is CacheMethod )
372370 {
373371 // simple method evaluate button
374372
375- var colors = new ColorBlock ( ) ;
376- colors = RuntimeProvider . Instance . SetColorBlock ( colors , new Color ( 0.4f , 0.4f , 0.4f ) ,
373+ var evalButton = UIFactory . CreateButton ( m_rightGroup , "EvalButton" , "Evaluate" , ( ) => { ( this as CacheMethod ) . Evaluate ( ) ; } ) ;
374+ RuntimeProvider . Instance . SetColorBlock ( evalButton , new Color ( 0.4f , 0.4f , 0.4f ) ,
377375 new Color ( 0.4f , 0.7f , 0.4f ) , new Color ( 0.3f , 0.3f , 0.3f ) ) ;
378376
379- var evalButton = UIFactory . CreateButton ( m_rightGroup , "EvalButton" , "Evaluate" , ( ) => { ( this as CacheMethod ) . Evaluate ( ) ; } , colors ) ;
380377 UIFactory . SetLayoutElement ( evalButton . gameObject , minWidth : 100 , minHeight : 22 , flexibleWidth : 0 ) ;
381378 }
382379 }
0 commit comments