-
-
Notifications
You must be signed in to change notification settings - Fork 708
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: remove
DearPyGui_Ext
submodule and update standard Axis
colors
- Loading branch information
Showing
27 changed files
with
985 additions
and
4 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
Submodule DearPyGui_Ext
deleted from
e21b2a
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Raylock, LLC | ||
|
||
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. |
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 |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<a id="user-content-dear-pygui" class="anchor" aria-hidden="true" href="#dear-pygui"> | ||
|
||
<div align="center"> | ||
<img src="https://github.com/hoffstadt/DearPyGui/blob/assets/newlogo.jpg?raw=true" alt="Dear PyGui"> | ||
</div> | ||
|
||
</a> | ||
|
||
<h6 align="center">(This library is available under a free and permissive license however, if you Enjoy <i>Dear PyGui</i> please consider becoming a <a href="https://github.com/hoffstadt/DearPyGui/wiki/Sponsors">Sponsor</a>)</h6> | ||
|
||
 | ||
[](https://pypi.org/project/dearpygui-ext/) | ||
[](https://github.com/hoffstadt/DearPyGui_Ext/actions/workflows/BuildPackage.yml) | ||
[](https://dearpygui-ext.readthedocs.io/en/latest/?badge=latest) | ||
|
||
**Dear PyGui Extensions** is a collection of useful tools, abstractions, and simplification layers built with/for _Dear PyGui_ users. | ||
|
||
## Installation | ||
|
||
Ensure you have at least Python 3.6 64bit and _dearpygui_. | ||
``` | ||
pip install dearpygui_ext | ||
or | ||
pip3 install dearpygui_ext | ||
``` | ||
|
||
## Resources | ||
|
||
[](https://discord.gg/tyE7Gu4) | ||
[](https://www.reddit.com/r/DearPyGui/) | ||
|
||
- [Documentation](https://github.com/hoffstadt/DearPyGui/wiki) comprehensive documentaion, tutorials, and examples. | ||
- [Feature Tracker](https://github.com/hoffstadt/DearPyGui/projects/5) all proposed new features. | ||
- [Bug Tracker](https://github.com/hoffstadt/DearPyGui/projects/1) current bugs and issues. | ||
|
||
## Support | ||
|
||
If you are having issues or want to help, here are some places you can go: | ||
- [Github Discussions](https://github.com/hoffstadt/DearPyGui_Ext/discussions/) | ||
- [Discord Forum](https://discord.gg/tyE7Gu4) | ||
- [Reddit](https://www.reddit.com/r/DearPyGui/) | ||
|
||
## Sponsors | ||
|
||
 | ||
 | ||
|
||
If you enjoy _Dear PyGui_ and _Dear PyGui Extensions_ please consider becoming a [sponsor](https://github.com/hoffstadt/DearPyGui/wiki/Sponsors). | ||
|
||
Ongoing _Dear PyGui_ development is financially supported by users and private sponsors. | ||
|
||
These include: | ||
* 🏢 [Anthony Tanbakuchi](https://github.com/kuchi) _Corporate Sponsor_ | ||
* 🏆 [Dean Keinan](https://github.com/deankeinan) _Partner Sponsor_ | ||
* 🏆 [何凌锋](https://github.com/Hedaozi) _Partner Sponsor_ | ||
* 🏆 [Anthony Doupe](https://github.com/Atlamillias) _Partner Sponsor_ | ||
* 🏆 [Ray Heasman](https://github.com/rheasman) _Partner Sponsor_ | ||
* 🏆 [Marco Studer](https://github.com/Mstpyt) _Partner Sponsor_ | ||
* 🏆 [Scripts](https://github.com/scriptslol) _Partner Sponsor_ | ||
* 🥇 [Caden Bloxham](https://github.com/cbxm) _Gold Sponsor_ | ||
* 🥇 [Yan Zaretskiy](https://github.com/mindv0rtex) _Gold Sponsor_ | ||
* 🥇 [Leron Gray](https://github.com/daddycocoaman) _Gold Sponsor_ | ||
* 🥇 [Trinnik](https://github.com/Trinnik) _Gold Sponsor_ | ||
* 🥇 [Barney Mannerings](https://github.com/barnabee) _Gold Sponsor_ | ||
* 🥇 [RB Blackstone](https://github.com/RBBlackstone) _Gold Sponsor_ | ||
* 🥇 [Charles Ray](https://github.com/ray-5050) _Gold Sponsor_ | ||
|
||
|
||
Thank you to all other [sponsors](https://github.com/hoffstadt/DearPyGui/wiki/Sponsors) for keeping this project moving forward! | ||
|
||
<a href="https://www.buymeacoffee.com/DearPyGui"><img src="https://img.buymeacoffee.com/button-api/?text=Buy us a coffee&emoji=&slug=DearPyGui&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff"></a> | ||
|
||
## Credits | ||
|
||
Developed by [Jonathan Hoffstadt](https://github.com/hoffstadt), [Preston Cothren](https://github.com/Pcothren), and every direct or indirect contributor. | ||
|
||
[Omar Cornut](http://www.miracleworld.net/) for all his incredible work on [Dear ImGui](https://github.com/ocornut/imgui). | ||
|
||
[Evan Pezent](http://evanpezent.com/) for all his work on [ImPlot](https://github.com/epezent/implot). | ||
|
||
[Johann Muszynski](https://github.com/Nelarius) for all of his work on [imnodes](https://github.com/Nelarius/imnodes). | ||
|
||
## License | ||
|
||
_Dear PyGui_ and _Dear PyGui Extensions_ are licensed under the [MIT License](https://github.com/hoffstadt/DearPyGui_Ext/blob/master/LICENSE). |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
* | ||
!*.ttf | ||
!*.otf | ||
!.gitignore | ||
!*.py | ||
!*.png | ||
!*.ico |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
__pycache__/ |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
pass |
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 |
---|---|---|
@@ -0,0 +1,109 @@ | ||
import dearpygui.dearpygui as dpg | ||
|
||
class mvLogger: | ||
|
||
def __init__(self, parent=None): | ||
|
||
self.log_level = 0 | ||
self._auto_scroll = True | ||
self.filter_id = None | ||
if parent: | ||
self.window_id = parent | ||
else: | ||
self.window_id = dpg.add_window(label="mvLogger", pos=(200, 200), width=500, height=500) | ||
self.count = 0 | ||
self.flush_count = 1000 | ||
|
||
with dpg.group(horizontal=True, parent=self.window_id): | ||
dpg.add_checkbox(label="Auto-scroll", default_value=True, callback=lambda sender:self.auto_scroll(dpg.get_value(sender))) | ||
dpg.add_button(label="Clear", callback=lambda: dpg.delete_item(self.filter_id, children_only=True)) | ||
|
||
dpg.add_input_text(label="Filter", callback=lambda sender: dpg.set_value(self.filter_id, dpg.get_value(sender)), | ||
parent=self.window_id) | ||
self.child_id = dpg.add_child_window(parent=self.window_id, autosize_x=True, autosize_y=True) | ||
self.filter_id = dpg.add_filter_set(parent=self.child_id) | ||
|
||
with dpg.theme() as self.trace_theme: | ||
with dpg.theme_component(0): | ||
dpg.add_theme_color(dpg.mvThemeCol_Text, (0, 255, 0, 255)) | ||
|
||
with dpg.theme() as self.debug_theme: | ||
with dpg.theme_component(0): | ||
dpg.add_theme_color(dpg.mvThemeCol_Text, (64, 128, 255, 255)) | ||
|
||
with dpg.theme() as self.info_theme: | ||
with dpg.theme_component(0): | ||
dpg.add_theme_color(dpg.mvThemeCol_Text, (255, 255, 255, 255)) | ||
|
||
with dpg.theme() as self.warning_theme: | ||
with dpg.theme_component(0): | ||
dpg.add_theme_color(dpg.mvThemeCol_Text, (255, 255, 0, 255)) | ||
|
||
with dpg.theme() as self.error_theme: | ||
with dpg.theme_component(0): | ||
dpg.add_theme_color(dpg.mvThemeCol_Text, (255, 0, 0, 255)) | ||
|
||
with dpg.theme() as self.critical_theme: | ||
with dpg.theme_component(0): | ||
dpg.add_theme_color(dpg.mvThemeCol_Text, (255, 0, 0, 255)) | ||
|
||
def auto_scroll(self, value): | ||
self._auto_scroll = value | ||
|
||
def _log(self, message, level): | ||
|
||
if level < self.log_level: | ||
return | ||
|
||
self.count+=1 | ||
|
||
if self.count > self.flush_count: | ||
self.clear_log() | ||
|
||
theme = self.info_theme | ||
|
||
if level == 0: | ||
message = "[TRACE]\t\t" + message | ||
theme = self.trace_theme | ||
elif level == 1: | ||
message = "[DEBUG]\t\t" + message | ||
theme = self.debug_theme | ||
elif level == 2: | ||
message = "[INFO]\t\t" + message | ||
elif level == 3: | ||
message = "[WARNING]\t\t" + message | ||
theme = self.warning_theme | ||
elif level == 4: | ||
message = "[ERROR]\t\t" + message | ||
theme = self.error_theme | ||
elif level == 5: | ||
message = "[CRITICAL]\t\t" + message | ||
theme = self.critical_theme | ||
|
||
new_log = dpg.add_text(message, parent=self.filter_id, filter_key=message) | ||
dpg.bind_item_theme(new_log, theme) | ||
if self._auto_scroll: | ||
scroll_max = dpg.get_y_scroll_max(self.child_id) | ||
dpg.set_y_scroll(self.child_id, -1.0) | ||
|
||
def log(self, message): | ||
self._log(message, 0) | ||
|
||
def log_debug(self, message): | ||
self._log(message, 1) | ||
|
||
def log_info(self, message): | ||
self._log(message, 2) | ||
|
||
def log_warning(self, message): | ||
self._log(message, 3) | ||
|
||
def log_error(self, message): | ||
self._log(message, 4) | ||
|
||
def log_critical(self, message): | ||
self._log(message, 5) | ||
|
||
def clear_log(self): | ||
dpg.delete_item(self.filter_id, children_only=True) | ||
self.count = 0 |
Oops, something went wrong.