-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from iholston/feat/gui
feat/gui merge
- Loading branch information
Showing
19 changed files
with
556 additions
and
224 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ mouse | |
pywin32 | ||
pyautogui | ||
requests | ||
urllib3 | ||
urllib3 | ||
dearpygui |
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
[Paths] | ||
leaguepath = D:/Riot Games/League of Legends | ||
|
||
[Game] | ||
maxlevel = 300 | ||
gamemode = 840 | ||
|
||
[Graphical] | ||
textcolor = [0.0, 255.0, 0.0, 255.0] | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,45 @@ | ||
""" | ||
Gets an account username and password for leveling | ||
Implement this file to connect to your database of league accounts. | ||
There is an example file in resources that can drop-in replace this for | ||
those who want a quick and simple option. | ||
A simple implementation of account.py using a json file | ||
""" | ||
|
||
import json | ||
import os | ||
import constants | ||
|
||
accounts_path = os.path.dirname(os.getcwd()) + "/resources/accounts.json" | ||
with open(accounts_path, 'r') as f: | ||
data = json.load(f) | ||
|
||
def get_username() -> str: | ||
"""Gets username from database""" | ||
return 'account_username' | ||
"""Gets an available account username from JSON file""" | ||
for account in data['accounts']: | ||
if not account['leveled']: | ||
return account['username'] | ||
|
||
def get_password() -> str: | ||
"""Gets password from database""" | ||
return 'account_password' | ||
"""Gets an available account password from JSON file""" | ||
for account in data['accounts']: | ||
if not account['leveled']: | ||
return account['password'] | ||
|
||
def set_account_as_leveled() -> None: | ||
"""Sets account as leveled in database""" | ||
pass | ||
"""Sets account as leveled in the JSON file""" | ||
for account in data['accounts']: | ||
if not account['leveled']: | ||
account['leveled'] = True | ||
with open(accounts_path, 'w') as json_file: | ||
json.dump(data, json_file) | ||
return | ||
|
||
def add_account(account) -> None: | ||
"""Writes account to JSON""" | ||
data.append(account) | ||
with open(constants.LOCAL_ACCOUNTS_PATH, 'w') as outfile: | ||
outfile.write(json.dumps(data, indent=4)) | ||
|
||
def get_all_accounts() -> dict: | ||
"""Returns all account information""" | ||
global data | ||
with open(accounts_path, 'r') as f: | ||
data = json.load(f) | ||
return data |
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.