-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
44 lines (38 loc) · 1.1 KB
/
main.py
File metadata and controls
44 lines (38 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# This is a sample Python script.
from modules import gui
# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
API = gui.GuiBuilder()
API.make_gui()
API.run_gui()
# See PyCharm help at https://www.jetbrains.com/help/pycharm/
# TODO implement saving / export
# TODO Implement OOP Callbacks
# from dearpygui.core import *
#
#
# class Entity:
# def __init__(self):
# pass
#
# def do_something(self, *args):
# print("See?", args)
#
# def do_another(self, *args):
# print("What?", args)
#
#
# def oop_callback(instance_method):
# def cb(*args):
# return instance_method(instance_method.__self__, *args)
#
# return cb
# ent = Entity()
# add_button("See me", callback=oop_callback(ent.do_something))
# add_button("Watch me", callback=oop_callback(ent.do_another))
# start_dearpygui()
# to disable a widget
# def disable_menu(item):
# configure_item(item, enabled=False)