Skip to content

Commit

Permalink
Merge pull request #1 from JanSeliv/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
JanSeliv authored May 26, 2023
2 parents 8329800 + d2403df commit a9ad75d
Show file tree
Hide file tree
Showing 9 changed files with 127 additions and 14 deletions.
74 changes: 74 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Visual Studio 2015 user specific files
.vs/

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app
*.ipa

# These project files can be generated by the engine
*.xcodeproj
*.xcworkspace
*.sln
*.suo
*.opensdf
*.sdf
*.VC.db
*.VC.opendb

# Precompiled Assets
SourceArt/**/*.png
SourceArt/**/*.tga

# Binary Files
Binaries/*
Plugins/*/Binaries/*

# Builds
Build/*

# Whitelist PakBlacklist-<BuildConfiguration>.txt files
!Build/*/
Build/*/**
!Build/*/PakBlacklist*.txt

# Don't ignore icon files in Build
!Build/**/*.ico

# Built data for maps
*_BuiltData.uasset

# Configuration files generated by the Editor
Saved/*

# Compiled source files for the engine to use
Intermediate/*
Plugins/*/Intermediate/*

# Cache files for the editor to use
DerivedDataCache/*
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Yevhenii Selivanov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# ⚙️ Settings Widget Constructor

Settings Widget Constructor is a handy plugin for Unreal Engine 5 that lets you automatically generate user interface (UI) for your game settings. All it takes is a few clicks and adding a new row to the table for each desired option.

![Settings UI](https://user-images.githubusercontent.com/20540872/147825296-ce7d33da-dfda-4757-b070-bfd08f700134.jpg)

<img width="948" alt="image" src="https://github.com/JanSeliv/Bomber/assets/20540872/5b4592a4-173d-4e6c-8a31-a502c14bd2c6">

## 📚 Documentation

Detailed documentation about the Settings Widget Constructor can be found [here](https://docs.google.com/document/d/1IXnOqrgaXTClP-0cIo28a9f6GHc9N1BCgTNnMk-X9VQ).

## 📅 Changelog
#### 2023-05-26
- 🎉 Initial public release.

## 📫 Feedback & Contribution

This is an open-source project and we encourage you to contribute. If you encounter any bugs 🐛, or if you have any feature requests 📝, please file an issue in the GitHub repository.

## 📜 License

This project is licensed under the terms of the MIT license. See [LICENSE](LICENSE) for more details.

We hope you find this plugin useful and we look forward to your feedback and contributions. 🚀
10 changes: 1 addition & 9 deletions SettingsWidgetConstructor.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"Description": "Plugin allows automatically generate settings on the UI from data table",
"Category": "UI",
"CreatedBy": "Yevhenii Selivanov",
"CreatedByURL": "https://github.com/JanSeliv/Bomber",
"CreatedByURL": "https://github.com/JanSeliv/SettingsWidgetConstructor",
"DocsURL": "",
"MarketplaceURL": "",
"SupportURL": "mailto:[email protected]",
Expand All @@ -28,17 +28,9 @@
}
],
"Plugins": [
{
"Name": "MyEditorUtils",
"Enabled": true
},
{
"Name": "GameplayTagsEditor",
"Enabled": true
},
{
"Name": "FunctionPicker",
"Enabled": true
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* FFunctionPicker SetMembers = FFunctionPicker::Empty;
*/
USTRUCT(BlueprintType)
struct FSWCFunctionPicker
struct SETTINGSWIDGETCONSTRUCTOR_API FSWCFunctionPicker
{
GENERATED_BODY()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// Called on every change in this this row
void FSWCMyTableRow::OnDataTableChanged(const UDataTable* InDataTable, const FName InRowName)
{
if (!GEditor && !GEditor->IsPlaySessionInProgress()) // Is Editor not PIE world
if (!GEditor || !GEditor->IsPlaySessionInProgress()) // Is Editor not PIE world
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* The UI widget of settings.
* It generates and manages settings specified in rows of the Settings Data Table.
*/
UCLASS()
UCLASS(Abstract, Blueprintable, BlueprintType)
class SETTINGSWIDGETCONSTRUCTOR_API USettingsWidget : public UUserWidget
{
GENERATED_BODY()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ UObject* USWCMyUserWidgetFactory::FactoryCreateNew(UClass* Class, UObject* InPar
// Make sure we are trying to factory a blueprint, then create and init one
check(Class->IsChildOf(USWCMyUserWidgetBlueprint::StaticClass()));

FString ParentPath = InParent->GetPathName();

const TSubclassOf<UUserWidget> ParentClass = GetWidgetClass();
if (ParentClass == nullptr || !FKismetEditorUtilities::CanCreateBlueprintOfClass(ParentClass))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "SettingTagCustomization.h"
#include "FunctionPickerType/FunctionPickerCustomization.h"
//---
#include "KismetCompiler.h"
#include "Modules/ModuleManager.h"

#define LOCTEXT_NAMESPACE "FSettingsWidgetConstructorEditorModule"
Expand All @@ -17,6 +18,8 @@ void FSettingsWidgetConstructorEditorModule::StartupModule()
{
RegisterPropertyCustomizations();
RegisterSettingAssets();

FKismetCompilerContext::RegisterCompilerForBP(USWCMyUserWidgetBlueprint::StaticClass(), &UWidgetBlueprint::GetCompilerForWidgetBP);
}

// Called before the module is unloaded, right before the module object is destroyed
Expand Down

0 comments on commit a9ad75d

Please sign in to comment.