Example #1
0
 public override void _Ready()
 {
     button      = GetChild <Button>(0);
     button.Text = ((InputEvent)InputMap.GetActionList(InputHandler.GetNameFromKey(input))[0]).AsText();
     GetChild <RichTextLabel>(1).Text = text;
     button.Connect("pressed", this, nameof(ButtonPressed));
     SettingsOptions.RegisterUpdatedEvent(UpdatingKeyConfig);
     previousText = button.Text;
 }
Example #2
0
 public override void _Ready()
 {
     instance = this;
     datas[0] = SavingAndLoading.LoadingGameSaveData(savePath + "0" + savePathEnd);
     datas[1] = SavingAndLoading.LoadingGameSaveData(savePath + "1" + savePathEnd);
     datas[2] = SavingAndLoading.LoadingGameSaveData(savePath + "2" + savePathEnd);
     SavingAndLoading.LoadingOptionsSaveData("user://Option.save");
     AllDataLoaded = true;
     SettingsOptions.RegisterUpdatedEvent(UpdateGameSettings);
 }
Example #3
0
    public override void _Ready()
    {
        Button holder = GetChild <Button>(0);

        holder.Pressed = SettingsOptions.GetSetting <bool>(optionName);
        holder.Connect("toggled", this, nameof(ChangeSetting));
        button = holder;
        SettingsOptions.RegisterUpdatedEvent(UpdateValue);
        button.Text = text;
    }
 public override void _Ready()
 {
     number = GetChild <SpinBox>(0);
     slider = GetChild <Slider>(1);
     number.Connect("value_changed", this, nameof(ValuesChanged));
     slider.Connect("value_changed", this, nameof(ValuesChanged));
     number.MaxValue = max;
     slider.MaxValue = max;
     slider.MinValue = min;
     number.MinValue = min;
     GetChild <RichTextLabel>(2).BbcodeText = "[center]" + name + "[/center]";
     number.Value = SettingsOptions.GetSetting <float>(optionName) * multiplier;
     slider.Value = number.Value;
     SettingsOptions.RegisterUpdatedEvent(UpdateValue);
 }
Example #5
0
 private void DeferedSetup()
 {
     options      = PlayerOptions.Instance;
     bookMenu     = PlayersJournal.instance;
     soundRequest = SoundManager.instance;
     gunCamera    = WeaponController.instance;
     SettingsOptions.RegisterUpdatedEvent(UpdateCharacterSettings);
     upgrades.LoadUpgrades(GameManager.Instance.GetDataUsed().upgrades.GetAllUpgrades());
     foreach (string s in GameManager.Instance.GetDataUsed().scans)
     {
         GD.Print(s);
         PlayersJournal.instance.AddPageToBook(AutoLoadScanInfo.PullInfo(s));
     }
     InputHandler.Instance.ConnectToMouseMovement(this, nameof(Rotating));
     Init(100);
 }