Ejemplo n.º 1
0
    public override void _Ready()
    {
        uploadDialog = GetNode <CustomConfirmationDialog>(UploadDialogPath);

        modSelect = GetNode <OptionButton>(ModSelectPath);

        unknownItemActions   = GetNode <Control>(UnknownItemActionsPath);
        createNewButton      = GetNode <Button>(CreateNewButtonPath);
        showManualEnterId    = GetNode <Button>(ShowManualEnterIdPath);
        manualIdEntry        = GetNode <LineEdit>(ManualIdEntryPath);
        acceptManualId       = GetNode <Button>(AcceptManualIdPath);
        manualEnterIdSection = GetNode <Control>(ManualEnterIdSectionPath);

        detailsEditor               = GetNode <Control>(DetailsEditorPath);
        editedTitle                 = GetNode <LineEdit>(EditedTitlePath);
        editedDescription           = GetNode <TextEdit>(EditedDescriptionPath);
        editedVisibility            = GetNode <CheckBox>(EditedVisibilityPath);
        editedTags                  = GetNode <LineEdit>(EditedTagsPath);
        previewImageRect            = GetNode <TextureRect>(PreviewImageRectPath);
        toBeUploadedContentLocation = GetNode <Label>(ToBeUploadedContentLocationPath);
        changeNotes                 = GetNode <TextEdit>(ChangeNotesPath);

        workshopNotice = GetNode <CustomRichTextLabel>(WorkshopNoticePath);
        errorDisplay   = GetNode <Label>(ErrorDisplayPath);

        uploadSucceededDialog = GetNode <CustomDialog>(UploadSucceededDialogPath);
        uploadSucceededText   = GetNode <CustomRichTextLabel>(UploadSucceededTextPath);

        fileSelectDialog = GetNode <FileDialog>(FileSelectDialogPath);

        fileSelectDialog.Filters = SteamHandler.RecommendedFileEndings.Select(e => "*" + e).ToArray();

        UpdateWorkshopNoticeTexts();
    }
Ejemplo n.º 2
0
 public override void _Ready()
 {
     saveList         = GetNode <SaveList>(SaveListPath);
     saveNameBox      = GetNode <LineEdit>(SaveNameBoxPath);
     saveButton       = GetNode <Button>(SaveButtonPath);
     overwriteConfirm = GetNode <CustomConfirmationDialog>(OverwriteConfirmPath);
 }
Ejemplo n.º 3
0
    public override void _Ready()
    {
        differentVersionDialog = GetNode <CustomConfirmationDialog>(DifferentVersionDialogPath);

        // Keep this node running while paused
        PauseMode = PauseModeEnum.Process;
    }
Ejemplo n.º 4
0
 public override void _Ready()
 {
     primaryMenu            = GetNode <Control>(PrimaryMenuPath);
     loadMenu               = GetNode <Control>(LoadMenuPath);
     optionsMenu            = GetNode <OptionsMenu>(OptionsMenuPath);
     saveMenu               = GetNode <NewSaveMenu>(SaveMenuPath);
     unsavedProgressWarning = GetNode <CustomConfirmationDialog>(UnsavedProgressWarningPath);
 }
Ejemplo n.º 5
0
    public override void _Ready()
    {
        InputEventItemScene  = GD.Load <PackedScene>("res://src/engine/input/key_mapping/InputEventItem.tscn");
        InputGroupItemScene  = GD.Load <PackedScene>("res://src/engine/input/key_mapping/InputGroupItem.tscn");
        InputActionItemScene = GD.Load <PackedScene>("res://src/engine/input/key_mapping/InputActionItem.tscn");

        conflictDialog    = GetNode <CustomConfirmationDialog>(ConflictDialogPath);
        resetInputsDialog = GetNode <CustomConfirmationDialog>(ResetInputsDialog);
    }
Ejemplo n.º 6
0
    public override void _Ready()
    {
        loadingItem              = GetNode <Control>(LoadingItemPath);
        noSavesItem              = GetNode <Control>(NoSavesItemPath);
        savesList                = GetNode <BoxContainer>(SavesListPath);
        deleteConfirmDialog      = GetNode <CustomConfirmationDialog>(DeleteConfirmDialogPath);
        loadOlderConfirmDialog   = GetNode <CustomConfirmationDialog>(LoadOlderSaveDialogPath);
        loadNewerConfirmDialog   = GetNode <CustomConfirmationDialog>(LoadNewerSaveDialogPath);
        loadInvalidConfirmDialog = GetNode <CustomConfirmationDialog>(LoadInvalidSaveDialogPath);
        loadIncompatibleDialog   = GetNode <CustomConfirmationDialog>(LoadIncompatibleDialogPath);
        upgradeSaveDialog        = GetNode <CustomConfirmationDialog>(UpgradeSaveDialogPath);
        upgradeFailedDialog      = GetNode <ErrorDialog>(UpgradeFailedDialogPath);

        listItemScene = GD.Load <PackedScene>("res://src/saving/SaveListItem.tscn");
    }
Ejemplo n.º 7
0
    /// <summary>
    ///   Setup the main menu.
    /// </summary>
    private void RunMenuSetup()
    {
        Background           = GetNode <TextureRect>("Background");
        guiAnimations        = GetNode <AnimationPlayer>("GUIAnimations");
        thriveLogo           = GetNode <TextureRect>(ThriveLogoPath);
        newGameButton        = GetNode <Button>(NewGameButtonPath);
        freebuildButton      = GetNode <Button>(FreebuildButtonPath);
        creditsContainer     = GetNode <Control>(CreditsContainerPath);
        credits              = GetNode <CreditsScroll>(CreditsScrollPath);
        licensesDisplay      = GetNode <LicensesDisplay>(LicensesDisplayPath);
        storeLoggedInDisplay = GetNode <Label>(StoreLoggedInDisplayPath);
        modManager           = GetNode <ModManager>(ModManagerPath);

        MenuArray?.Clear();

        // Get all of menu items
        MenuArray = GetTree().GetNodesInGroup("MenuItem");

        if (MenuArray == null)
        {
            GD.PrintErr("Failed to find all the menu items!");
            return;
        }

        RandomizeBackground();

        options         = GetNode <OptionsMenu>("OptionsMenu");
        saves           = GetNode <SaveManagerGUI>("SaveManagerGUI");
        gles2Popup      = GetNode <CustomConfirmationDialog>(GLES2PopupPath);
        modLoadFailures = GetNode <ErrorDialog>(ModLoadFailuresPath);

        // Set initial menu
        SwitchMenu();

        // Easter egg message
        thriveLogo.RegisterToolTipForControl("thriveLogoEasterEgg", "mainMenu");

        if (OS.GetCurrentVideoDriver() == OS.VideoDriver.Gles2 && !IsReturningToMenu)
        {
            gles2Popup.PopupCenteredShrink();
        }

        UpdateStoreNameLabel();
    }
Ejemplo n.º 8
0
    public override void _Ready()
    {
        // Options control buttons
        resetButton = GetNode <Button>(ResetButtonPath);
        saveButton  = GetNode <Button>(SaveButtonPath);

        // Tab selector buttons
        graphicsButton    = GetNode <Button>(GraphicsButtonPath);
        soundButton       = GetNode <Button>(SoundButtonPath);
        performanceButton = GetNode <Button>(PerformanceButtonPath);
        inputsButton      = GetNode <Button>(InputsButtonPath);
        miscButton        = GetNode <Button>(MiscButtonPath);

        // Graphics
        graphicsTab                  = GetNode <Control>(GraphicsTabPath);
        vsync                        = GetNode <CustomCheckBox>(VSyncPath);
        fullScreen                   = GetNode <CustomCheckBox>(FullScreenPath);
        msaaResolution               = GetNode <OptionButton>(MSAAResolutionPath);
        maxFramesPerSecond           = GetNode <OptionButton>(MaxFramesPerSecondPath);
        colourblindSetting           = GetNode <OptionButton>(ColourblindSettingPath);
        chromaticAberrationToggle    = GetNode <CustomCheckBox>(ChromaticAberrationTogglePath);
        chromaticAberrationSlider    = GetNode <Slider>(ChromaticAberrationSliderPath);
        displayAbilitiesHotBarToggle = GetNode <CustomCheckBox>(DisplayAbilitiesBarTogglePath);
        guiLightEffectsToggle        = GetNode <CustomCheckBox>(GUILightEffectsTogglePath);

        // Sound
        soundTab                   = GetNode <Control>(SoundTabPath);
        masterVolume               = GetNode <Slider>(MasterVolumePath);
        masterMuted                = GetNode <CustomCheckBox>(MasterMutedPath);
        musicVolume                = GetNode <Slider>(MusicVolumePath);
        musicMuted                 = GetNode <CustomCheckBox>(MusicMutedPath);
        ambianceVolume             = GetNode <Slider>(AmbianceVolumePath);
        ambianceMuted              = GetNode <CustomCheckBox>(AmbianceMutedPath);
        sfxVolume                  = GetNode <Slider>(SFXVolumePath);
        sfxMuted                   = GetNode <CustomCheckBox>(SFXMutedPath);
        guiVolume                  = GetNode <Slider>(GUIVolumePath);
        guiMuted                   = GetNode <CustomCheckBox>(GUIMutedPath);
        audioOutputDeviceSelection = GetNode <OptionButton>(AudioOutputDeviceSelectionPath);
        languageSelection          = GetNode <OptionButton>(LanguageSelectionPath);
        resetLanguageButton        = GetNode <Button>(ResetLanguageButtonPath);
        languageProgressLabel      = GetNode <Label>(LanguageProgressLabelPath);

        LoadLanguages();
        LoadAudioOutputDevices();

        // Performance
        performanceTab           = GetNode <Control>(PerformanceTabPath);
        cloudInterval            = GetNode <OptionButton>(CloudIntervalPath);
        cloudResolutionTitle     = GetNode <VBoxContainer>(CloudResolutionTitlePath);
        cloudResolution          = GetNode <OptionButton>(CloudResolutionPath);
        runAutoEvoDuringGameplay = GetNode <CustomCheckBox>(RunAutoEvoDuringGameplayPath);
        detectedCPUCount         = GetNode <Label>(DetectedCPUCountPath);
        activeThreadCount        = GetNode <Label>(ActiveThreadCountPath);
        assumeHyperthreading     = GetNode <CustomCheckBox>(AssumeHyperthreadingPath);
        useManualThreadCount     = GetNode <CustomCheckBox>(UseManualThreadCountPath);
        threadCountSlider        = GetNode <Slider>(ThreadCountSliderPath);

        // Inputs
        inputsTab      = GetNode <Control>(InputsTabPath);
        inputGroupList = GetNode <InputGroupList>(InputGroupListPath);
        inputGroupList.OnControlsChanged += OnControlsChanged;

        // Misc
        miscTab                   = GetNode <Control>(MiscTabPath);
        playIntro                 = GetNode <CustomCheckBox>(PlayIntroPath);
        playMicrobeIntro          = GetNode <CustomCheckBox>(PlayMicrobeIntroPath);
        tutorialsEnabledOnNewGame = GetNode <CustomCheckBox>(TutorialsEnabledOnNewGamePath);
        cheats                        = GetNode <CustomCheckBox>(CheatsPath);
        autoSave                      = GetNode <CustomCheckBox>(AutoSavePath);
        maxAutoSaves                  = GetNode <SpinBox>(MaxAutoSavesPath);
        maxQuickSaves                 = GetNode <SpinBox>(MaxQuickSavesPath);
        tutorialsEnabled              = GetNode <CustomCheckBox>(TutorialsEnabledPath);
        customUsernameEnabled         = GetNode <CustomCheckBox>(CustomUsernameEnabledPath);
        customUsername                = GetNode <LineEdit>(CustomUsernamePath);
        jsonDebugMode                 = GetNode <OptionButton>(JSONDebugModePath);
        unsavedProgressWarningEnabled = GetNode <CustomCheckBox>(UnsavedProgressWarningPath);

        screenshotDirectoryWarningBox = GetNode <CustomConfirmationDialog>(ScreenshotDirectoryWarningBoxPath);
        backConfirmationBox           = GetNode <CustomDialog>(BackConfirmationBoxPath);
        defaultsConfirmationBox       = GetNode <CustomConfirmationDialog>(DefaultsConfirmationBoxPath);
        errorAcceptBox = GetNode <ErrorDialog>(ErrorAcceptBoxPath);

        selectedOptionsTab = SelectedOptionsTab.Graphics;

        cloudResolutionTitle.RegisterToolTipForControl("cloudResolution", "options");
        guiLightEffectsToggle.RegisterToolTipForControl("guiLightEffects", "options");
        assumeHyperthreading.RegisterToolTipForControl("assumeHyperthreading", "options");
        unsavedProgressWarningEnabled.RegisterToolTipForControl("unsavedProgressWarning", "options");
    }
Ejemplo n.º 9
0
 public override void _Ready()
 {
     popup = GetNode <CustomConfirmationDialog>(PopupPath);
     organelleSpecificContent = GetNode <Container>(OrganelleSpecificContentPath);
     scrollContainer          = GetNode <ScrollContainer>(ScrollContainerPath);
 }