mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Fix for EvMenu width
This commit is contained in:
parent
6ebbf9c4ee
commit
b74de1c673
1 changed files with 6 additions and 3 deletions
|
|
@ -1005,13 +1005,16 @@ class EvMenu(object):
|
|||
else:
|
||||
# add a default white color to key
|
||||
table.append(" |lc%s|lt|w%s|n|le%s" % (raw_key, raw_key, desc_string))
|
||||
logger.log_msg('Table Width Max: %s' % table_width_max)
|
||||
logger.log_msg('Max Width: %d' % _MAX_TEXT_WIDTH)
|
||||
ncols = (_MAX_TEXT_WIDTH // table_width_max) # number of ncols
|
||||
logger.log_msg('Max Columns: %d' % ncols)
|
||||
|
||||
ncols = (_MAX_TEXT_WIDTH // table_width_max) + 1 # number of ncols
|
||||
|
||||
if ncols <= 0:
|
||||
if ncols < 0:
|
||||
# no visible option at all
|
||||
return ""
|
||||
|
||||
ncols = ncols + 1 if ncols == 0 else ncols
|
||||
# get the amount of rows needed (start with 4 rows)
|
||||
nrows = 4
|
||||
while nrows * ncols < nlist:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue