Skip to content

Commit

Permalink
https://github.com/hasii2011/albow-python-3/issues/34
Browse files Browse the repository at this point in the history
  • Loading branch information
hasii2011 committed May 27, 2019
1 parent 4df4137 commit 3fb8696
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion albow/demo/loggingConfiguration.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
},
"demoSimple": {
"format": "%(asctime)s - %(levelname)s: %(module)s: %(message)s"
"format": "%(asctime)s.%(msecs)06d - %(levelname)s: %(module)s: %(message)s",
"datefmt" : "%H:%M:%S"
}
},
"handlers": {
Expand Down
4 changes: 2 additions & 2 deletions albow/demo/screens/DemoUserEventsScreen.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def enter_screen(self):
"""
Called from the Shell after switching to this screen from another screen.
"""
self.logger.info("Start timers")
self.logger.debug("Start timers")
pygame.time.set_timer(DemoUserEventsScreen.CLOCK_EVENT, 5 * 1000)
pygame.time.set_timer(DemoUserEventsScreen.KLINGON_TORPEDO_EVENT, 7 * 1000)

Expand All @@ -72,7 +72,7 @@ def leave_screen(self):
#
# To disable the timer for an event, set the milliseconds argument to 0.
#
self.logger.info("Stop timers")
self.logger.debug("Stop timers")
pygame.time.set_timer(DemoUserEventsScreen.CLOCK_EVENT, 0)
pygame.time.set_timer(DemoUserEventsScreen.KLINGON_TORPEDO_EVENT, 0)

Expand Down
8 changes: 4 additions & 4 deletions albow/widgets/TextBox.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(self, theText: str = "", theNumberOfColumns: int = 28, theNumberOfR

self.lines = lines
self._text = theText
self.logger.info(f"size: {self.size}")
self.logger.debug(f"size: {self.size}")

def get_text(self):
return self._text
Expand Down Expand Up @@ -119,7 +119,7 @@ def draw(self, theSurface: Surface):
if lastIdx >= len(self.lines):
lastIdx = len(self.lines) - 1

self.logger.info(f"firstIdx: {firstIdx} lastIdx: {lastIdx}")
self.logger.debug(f"firstIdx: {firstIdx} lastIdx: {lastIdx}")
for idx in range(firstIdx, lastIdx):

buf = self.font.render(self.lines[idx], True, color)
Expand Down Expand Up @@ -157,10 +157,10 @@ def computeBoxSize(self, theNumberOfColumns: int, theNumberOfRows: int) -> tuple

width, height = self.font.size(TextBox.CANONICAL_WIDEST_TALLEST_CHARACTER)

self.logger.info(f"width: {width}, height: {height}")
self.logger.debug(f"width: {width}, height: {height}")

size = (width * theNumberOfColumns, (height * theNumberOfRows) - self.margin)
self.logger.info(f"size {size}")
self.logger.debug(f"size {size}")

return size

Expand Down

0 comments on commit 3fb8696

Please sign in to comment.