This commit aims to clean up the significant mess that was the timer code and amassing of functions.
In order to better clean up the main GUI code these functions have been moved to their own respective
script files. More specifically any future commits that contain window styling aspects will be added
to the styles.py script and any timer related code will be moved into timers.py. The timer code has
also been abstracted a little more, however, we are still restricted by the API, one solution would
be to modify warpy and better standardize the returns from the three open world json objects.
Currently there is explicit handler functions within the class that can set this information, however,
it may be more reasonable to return smarter json objects that have the current state attached.
This commit removes the API from this repository and to the warpy
repo. There are also a change to the warpy class call and import
as documented in the warpy repository.
By breaking up the timers into their own functions they are now capable of
running more intelligently using the difference between the current time
and expiration time for API polling rates. Polling attempts are skewed by
two minutes to attempt to prevent negative timedeltas. These are handled
on the off chance they are negative but it would be best to avoid negative
timedeltas in general.
Additional changes include more documentation, todos, and the removal/
addition of debug text.
This is a major change in how this overlay will be defined as it will now be asynchronous. After doing
a bit of research this is likely to be the best option since there will be various functions polling
the API for information. If one requests takes to long the GUI will get hung up, this resolves that
issue.
Note: This is a first dive into asynchronous so future commits may aim to resolve sloppy asynchronous
implementations.
The following components and features have been implemented per this initial commit:
- Python library wrapping warframestat.us API endpoint w/ decorated functions
- Full transparency for overlay window (click through and alpha)
- Added status for open worlds
- Added support for variable window sizes (does not resize automatically)