Skip to content

Commit

Permalink
main : fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
my1e5 committed Mar 15, 2023
1 parent d97f6c2 commit e3a20fb
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
wip
.vscode
persistance/*.json
persistence/*.json

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A collection of example scripts which demonstrate various features/functionality
- [Listbox](#listbox)
- [Menubar](#menubar)
- [Misc](#misc)
- [Persistance](#persistance)
- [Persistence](#persistence)
- [Plots](#plots)
- [Sizing](#sizing)
- [Spacing](#spacing)
Expand Down Expand Up @@ -60,7 +60,7 @@ Examples of how to implement all the different types of menubar and how to imple

Miscellaneous examples.

## [Persistance](persistance/)
## [Persistence](persistence/)

Examples of how to save and load the state of a GUI. This includes the values of GUI items, the position of windows, etc. A simple example using `dict` is shown as well as an approach using `dataclasses`. Both store the app state in a JSON file.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def delete_window(sender):
for values in previous_state["windows"].values():
create_new_window(None, None, (values["width"], values["height"], values["pos"], values["text"], values["slider"]))

dpg.create_viewport(title="Persistance of Windows Demo", height=700, width=1200)
dpg.create_viewport(title="Persistence of Windows Demo", height=700, width=1200)
dpg.setup_dearpygui()
dpg.show_viewport()
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __post_init__(self):
dpg.add_button(label="Print app state", callback=lambda: print(state))


dpg.create_viewport(title="App Persistance Demo using Dataclasses", height=400, width=500)
dpg.create_viewport(title="App Persistence Demo using Dataclasses", height=400, width=500)
dpg.setup_dearpygui()
dpg.show_viewport()
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def load_state():
dpg.add_input_float(label="Baz", default_value=state["settings"]["baz"], callback=lambda s, d: state["settings"].__setitem__("baz", d))
dpg.add_button(label="Print app state", callback=lambda: print(state))

dpg.create_viewport(title="App Persistance Demo using Dict", height=400, width=500)
dpg.create_viewport(title="App Persistence Demo using Dict", height=400, width=500)
dpg.setup_dearpygui()
dpg.show_viewport()
try:
Expand Down

0 comments on commit e3a20fb

Please sign in to comment.