mirror of
https://github.com/pret/pokemon-reverse-engineering-tools.git
synced 2026-04-26 01:11:24 -05:00
clean up more imports in map_editor.py
This commit is contained in:
parent
8dcde9ae28
commit
185a29698e
|
|
@ -16,17 +16,24 @@ from Tkinter import (
|
||||||
TclError,
|
TclError,
|
||||||
)
|
)
|
||||||
|
|
||||||
import ttk
|
from ttk import (
|
||||||
from ttk import Frame, Style
|
Frame,
|
||||||
import PIL
|
Style,
|
||||||
from PIL import Image, ImageTk
|
Combobox,
|
||||||
|
)
|
||||||
|
|
||||||
|
# This is why requirements.txt says to install pillow instead of the original
|
||||||
|
# PIL.
|
||||||
|
from PIL import (
|
||||||
|
Image,
|
||||||
|
ImageTk,
|
||||||
|
)
|
||||||
|
|
||||||
|
import gfx
|
||||||
|
import preprocessor
|
||||||
import configuration
|
import configuration
|
||||||
config = configuration.Config()
|
config = configuration.Config()
|
||||||
|
|
||||||
from preprocessor import separate_comment
|
|
||||||
import gfx
|
|
||||||
|
|
||||||
def setup_logging():
|
def setup_logging():
|
||||||
"""
|
"""
|
||||||
Temporary function that configures logging to go straight to console.
|
Temporary function that configures logging to go straight to console.
|
||||||
|
|
@ -163,7 +170,7 @@ class Application(Frame):
|
||||||
|
|
||||||
def get_map_list(self):
|
def get_map_list(self):
|
||||||
self.available_maps = sorted(m for m in get_available_maps(config=self.config))
|
self.available_maps = sorted(m for m in get_available_maps(config=self.config))
|
||||||
self.map_list = ttk.Combobox(self.button_frame, height=24, width=24, values=self.available_maps)
|
self.map_list = Combobox(self.button_frame, height=24, width=24, values=self.available_maps)
|
||||||
if len(self.available_maps):
|
if len(self.available_maps):
|
||||||
self.map_list.set(self.available_maps[0])
|
self.map_list.set(self.available_maps[0])
|
||||||
|
|
||||||
|
|
@ -695,7 +702,7 @@ def asm_at_label(asm, label):
|
||||||
# go until the next label
|
# go until the next label
|
||||||
content = []
|
content = []
|
||||||
for line in lines:
|
for line in lines:
|
||||||
l, comment = separate_comment(line + '\n')
|
l, comment = preprocessor.separate_comment(line + '\n')
|
||||||
if ':' in l:
|
if ':' in l:
|
||||||
break
|
break
|
||||||
content += [[l, comment]]
|
content += [[l, comment]]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user