home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TCE: Only calc_effort on tiles where it makes sense.
[plomrogue]
/
client
/
window_management.py
diff --git
a/client/window_management.py
b/client/window_management.py
index 141cc656b6e92fa81427b704f9c87e006eabd570..4d6a403281bbd9bb1a412a222d1060c94de64440 100644
(file)
--- a/
client/window_management.py
+++ b/
client/window_management.py
@@
-1,3
+1,8
@@
+# This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
+# or any later version. For details on its copyright, license, and warranties,
+# see the file NOTICE in the root directory of the PlomRogue source package.
+
+
import curses
import types
import curses
import types
@@
-13,10
+18,11
@@
screen_size = [0,0]
class Window:
class Window:
- def __init__(self, title, draw_function, size):
+ def __init__(self, title, draw_function, size
, draw_scroll_hints
):
self.title = title
self.draw = types.MethodType(draw_function, self)
self.size = size
self.title = title
self.draw = types.MethodType(draw_function, self)
self.size = size
+ self.draw_scroll_hints = draw_scroll_hints
def set_windows():
def set_windows():
@@
-90,9
+96,12
@@
def set_windows():
curses.endwin()
stdscr = curses.initscr()
screen_size = stdscr.getmaxyx()
curses.endwin()
stdscr = curses.initscr()
screen_size = stdscr.getmaxyx()
+ global windows
+ windows = []
for config in windows_config:
size = size_window(config["config"])
for config in windows_config:
size = size_window(config["config"])
- window = Window(config["title"], config["func"], size)
+ window = Window(config["title"], config["func"], size,
+ config["scroll_hints"])
windows.append(window)
place_window(window)
redraw_windows = True
windows.append(window)
place_window(window)
redraw_windows = True
@@
-204,7
+213,8
@@
def draw_screen():
for win in windows:
offset, winmap_size, winmap = win.draw()
draw_winmap()
for win in windows:
offset, winmap_size, winmap = win.draw()
draw_winmap()
- draw_scroll_hints()
+ if win.draw_scroll_hints:
+ draw_scroll_hints()
stdscr.erase()
draw_window_border_lines()
stdscr.erase()
draw_window_border_lines()