public void InitialiseP1(FrontEnd.ButtonInfo buttonInfo, int inShowStyle) { this.SetDefaults(); sparklesPosition = 0; Zobject.ZobjectInfo info = new Zobject.ZobjectInfo(); info.position = buttonInfo.position; info.texture = buttonInfo.texture; normalTexture = info.texture; info.startState = ZobjectState.kZobjectHidden; info.isMapObject = false; zobject.Initialise(info); zobject.SetShowStyle(inShowStyle); zobject.SetThrobSize(0.1f); zobject.SetThrobTime(0.16f); position = buttonInfo.position; if (buttonInfo.texture != null) { width = (float)(buttonInfo.texture).pixelsWide; height = (float)(buttonInfo.texture).pixelsHigh; } if (Globals.g_main.usingTextureResolution == TextureResolutionEnum.kTextureResolution_High) { width /= 2.0f; height /= 2.0f; } goToScreen = buttonInfo.goToScreen; zobject.SetAtlas(null); //buttonInfo.textureLabel = null; if (buttonInfo.textureLabel != null) { if (zobjectLabel == null) { zobjectLabel = new Zobject(); } info.texture = buttonInfo.textureLabel; zobjectLabel.Initialise(info); zobjectLabel.SetShowStyle(inShowStyle); } }