File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
blade-engine/src/com/bladecoder/engine/ui Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 30
30
import com .badlogic .gdx .graphics .g2d .SpriteBatch ;
31
31
import com .badlogic .gdx .graphics .g2d .TextureAtlas ;
32
32
import com .badlogic .gdx .scenes .scene2d .ui .Skin ;
33
+ import com .badlogic .gdx .utils .reflect .ClassReflection ;
33
34
import com .bladecoder .engine .assets .EngineAssetManager ;
34
35
import com .bladecoder .engine .model .World ;
35
36
import com .bladecoder .engine .util .Config ;
@@ -93,16 +94,16 @@ private BladeScreen getCustomScreenInstance(String prop, Class<?> defaultClass)
93
94
94
95
if ( clsName != null && !clsName .isEmpty ()) {
95
96
try {
96
- instanceClass = Class .forName (clsName );
97
- return (BladeScreen )instanceClass .newInstance ();
97
+ instanceClass = ClassReflection .forName (clsName );
98
+ return (BladeScreen )ClassReflection .newInstance (instanceClass );
98
99
} catch (Exception e ) {
99
100
EngineLogger .error ("Error instancing screen. " + e .getMessage ());
100
101
instanceClass = defaultClass ;
101
102
}
102
103
}
103
104
104
105
try {
105
- return (BladeScreen )instanceClass .newInstance ();
106
+ return (BladeScreen )ClassReflection .newInstance (instanceClass );
106
107
} catch (Exception e ) {
107
108
EngineLogger .error ("Error instancing screen" , e );
108
109
}
You can’t perform that action at this time.
0 commit comments