@@ -319,15 +319,13 @@ internal void ConstructEvaluateButtons(GameObject argsHolder)
319
319
default , new Color ( 1 , 1 , 1 , 0 ) ) ;
320
320
UIFactory . SetLayoutElement ( evalGroupObj , minHeight : 25 , flexibleHeight : 0 , flexibleWidth : 5000 ) ;
321
321
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
-
326
322
var evalButton = UIFactory . CreateButton ( evalGroupObj ,
327
323
"EvalButton" ,
328
324
$ "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 ) ) ;
331
329
332
330
UIFactory . SetLayoutElement ( evalButton . gameObject , minWidth : 100 , minHeight : 22 , flexibleWidth : 0 ) ;
333
331
@@ -345,7 +343,7 @@ internal void ConstructEvaluateButtons(GameObject argsHolder)
345
343
argsHolder . SetActive ( true ) ;
346
344
m_isEvaluating = true ;
347
345
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 ) ) ;
349
347
350
348
cancelButton . gameObject . SetActive ( true ) ;
351
349
}
@@ -365,18 +363,17 @@ internal void ConstructEvaluateButtons(GameObject argsHolder)
365
363
m_isEvaluating = false ;
366
364
367
365
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 ) ) ;
369
367
} ) ;
370
368
}
371
369
else if ( this is CacheMethod )
372
370
{
373
371
// simple method evaluate button
374
372
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 ) ,
377
375
new Color ( 0.4f , 0.7f , 0.4f ) , new Color ( 0.3f , 0.3f , 0.3f ) ) ;
378
376
379
- var evalButton = UIFactory . CreateButton ( m_rightGroup , "EvalButton" , "Evaluate" , ( ) => { ( this as CacheMethod ) . Evaluate ( ) ; } , colors ) ;
380
377
UIFactory . SetLayoutElement ( evalButton . gameObject , minWidth : 100 , minHeight : 22 , flexibleWidth : 0 ) ;
381
378
}
382
379
}
0 commit comments