emre1393 / xtreamui_mirror

This is an installation mirror for xtream ui software.
GNU General Public License v3.0
82 stars 143 forks source link

help update printc to install.py #30

Open xoceunder opened 1 year ago

xoceunder commented 1 year ago

I'm trying to fix the problem you have if you add more text information

printc("Welcome to Python Examples Start installation? Y/N", col.WARNING)

def printc(rText, rColour=col.OKBLUE, rPadding=0, rLimit=47):
    print("%s ┌─────────────────────────────────────────────────┐ %s" % (rColour, col.ENDC))
    for i in range(rPadding): print("%s │                                                 │ %s" % (rColour, col.ENDC))
    array = [rText[i:i+rLimit] for i in range(0, len(rText), rLimit)]
    for i in array : print("%s │ %s%s%s │ %s" % (rColour, " "*round(23-(len(rText)/2)), i, " "*round(46-(22-(len(rText)/2))-len(rText)), col.ENDC))
    #print("%s │ %s%s%s │ %s" % (rColour, " "*round(23-(len(rText)/2)), rText, " "*round(46-(22-(len(rText)/2))-len(rText)), col.ENDC))
    for i in range(rPadding): print("%s │                                                 │ %s" % (rColour, col.ENDC))
    print("%s └─────────────────────────────────────────────────┘ %s" % (rColour, col.ENDC))
    print(" ")

Screenshot_28