Rename interface.bar.Bar -> interface.percentage_bar.PercentageBar
This commit is contained in:
parent
6e0112fd59
commit
e5485300ef
2 changed files with 3 additions and 3 deletions
|
@ -14,8 +14,8 @@ from .actions import Action, ActionResult
|
||||||
from .ai import HostileEnemy
|
from .ai import HostileEnemy
|
||||||
from .events import GameOverEventHandler, MainGameEventHandler
|
from .events import GameOverEventHandler, MainGameEventHandler
|
||||||
from .geometry import Point, Rect, Size
|
from .geometry import Point, Rect, Size
|
||||||
from .interface.bar import Bar
|
|
||||||
from .interface import color
|
from .interface import color
|
||||||
|
from .interface.percentage_bar import PercentageBar
|
||||||
from .map import Map
|
from .map import Map
|
||||||
from .messages import MessageLog
|
from .messages import MessageLog
|
||||||
from .object import Actor, Entity, Hero, Monster
|
from .object import Actor, Entity, Hero, Monster
|
||||||
|
@ -86,7 +86,7 @@ class Engine:
|
||||||
self.update_field_of_view()
|
self.update_field_of_view()
|
||||||
|
|
||||||
# Interface elements
|
# Interface elements
|
||||||
self.hit_points_bar = Bar(position=Point(4, 45), width=20, colors=list(color.HealthBar.bar_colors()))
|
self.hit_points_bar = PercentageBar(position=Point(4, 45), width=20, colors=list(color.HealthBar.bar_colors()))
|
||||||
|
|
||||||
self.message_log.add_message('Greetings adventurer!', fg=(127, 127, 255), stack=False)
|
self.message_log.add_message('Greetings adventurer!', fg=(127, 127, 255), stack=False)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ from typing import List, Optional, Tuple
|
||||||
from . import color
|
from . import color
|
||||||
from ..geometry import Point
|
from ..geometry import Point
|
||||||
|
|
||||||
class Bar:
|
class PercentageBar:
|
||||||
'''A bar that expresses a percentage.'''
|
'''A bar that expresses a percentage.'''
|
||||||
|
|
||||||
def __init__(self, *, position: Point, width: int, colors: Optional[List[Tuple[float, color.Color]]] = None):
|
def __init__(self, *, position: Point, width: int, colors: Optional[List[Tuple[float, color.Color]]] = None):
|
Loading…
Add table
Add a link
Reference in a new issue