-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎉 feat: added sub section basic functionality but not full functionality
- Loading branch information
1 parent
067c108
commit 8f6d912
Showing
11 changed files
with
205 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
class_name ItemSetting | ||
|
||
var visibility: bool = true | ||
var categorized: bool = false | ||
|
||
func _init(visibility = true) -> void: | ||
func _init(visibility = true, categorized = false) -> void: | ||
self.visibility = visibility | ||
self.categorized = categorized | ||
|
||
func as_dictionary() -> Dictionary: | ||
return { | ||
"visibility": self.visibility | ||
"visibility": self.visibility, | ||
"categorized": self.categorized | ||
} | ||
|
||
static func dictionary_to_item_setting(input: Dictionary) -> ItemSetting: | ||
var visibility = input["visibility"] if input.has("visibility") else true | ||
return ItemSetting.new(visibility) | ||
var categorized = input["categorized"] if input.has("categorized") else false | ||
return ItemSetting.new(visibility, categorized) | ||
|
||
static func default() -> ItemSetting: | ||
return ItemSetting.new(true) | ||
return ItemSetting.new() | ||
|
||
func duplicate() -> ItemSetting: | ||
return new(self.visibility) | ||
return new(self.visibility, self.categorized) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.