//-------------------------------------------------------------------------------------- // Methods: //-------------------------------------------------------------------------------------- /// <summary> /// Initializes the state. /// </summary> public override void Initialize() { buttonNormal = core.LoadMenuTexture("Button1"); buttonHover = core.LoadMenuTexture("Button2"); buttonActive = core.LoadMenuTexture("Button3"); sliderBackground = core.LoadMenuTexture("Slider0"); sliderNormal = core.LoadMenuTexture("Slider1"); sliderHover = core.LoadMenuTexture("Slider2"); sliderActive = core.LoadMenuTexture("Slider3"); titleLblPos = getScaledValue(new Rect(INNER_BOX_X, 50, INNER_BOX_W, 50)); const int SX1 = 264, SX2 = 504, SY1 = 200, SY2 = 350; int sw = sliderBackground.width, sh = sliderBackground.height; soundLblPos = getScaledValue(new Rect(SX1, SY1, SX2 - SX1, sh)); soundSldPos = getScaledValue(new Rect(SX2, SY1, sw, sh)); musicLblPos = getScaledValue(new Rect(SX1, SY2, SX2 - SX1, sh)); musicSldPos = getScaledValue(new Rect(SX2, SY2, sw, sh)); const int BX1 = 256, BX2 = 664, BY1 = 555; int bw = buttonNormal.width, bh = buttonNormal.height; acceptBtnPos = getScaledValue(new Rect(BX1, BY1, bw, bh)); cancelBtnPos = getScaledValue(new Rect(BX2, BY1, bw, bh)); savedSoundVolume = soundVolume = core.SoundVolume; savedMusicVolume = musicVolume = core.MusicVolume; titleStyle = GuiUtil.MakeLabelStyle(FONT_SIZE_X2, AtariPalette.Hue00Lum00, TextAnchor.UpperCenter); textStyle = GuiUtil.MakeLabelStyle(FONT_SIZE_X2, AtariPalette.Hue00Lum00, TextAnchor.MiddleCenter); sliderStyle = GuiUtil.MakeHSliderStyle(sliderBackground); thumbStyle = GuiUtil.MakeHSliderThumbStyle(sliderNormal, sliderHover, sliderActive); buttonStyle = GuiUtil.MakeButtonStyle(FONT_SIZE_X1, AtariPalette.Hue00Lum00, buttonNormal, buttonHover, buttonActive); }