noone313 / terminal_framework

MIT License
1 stars 1 forks source link

Organizing and adding features #1

Open Hussein-L-AlMadhachi opened 2 months ago

Hussein-L-AlMadhachi commented 2 months ago

سلام عليكم

عندي مقترح حتى نرتب الكود هذا

مقترحي انه نحط كلشي مربوط سوة بكلاس واحد

مثلاً:

class Text:
    def __init__( self , text , x_pos, y_pos , color="some default color"):
         self.text = text
         self.color = color
         self.bgcolor = "black"   #default value
         self.x = x_pos
         self.y_pos
         # code implementation

    def underline( self ):
         # code implementation

    def color( self , color ):
         self.color
         # code implementation so changes may take effect

    def bgcolor( self , color):
         # code implementation

    def italics( self ):
         # code implementation

   def append( self,  text ):
        self.text += text
        # code implementation so changes may take effect

بحيث هيج تستعمله

MyText = term_frame.Text( 0,0,'hello','cyan' )
MyText.append( ' world' ) # hello world
MyText.bgcolor("white")
MyText.underline

اذا عجبك الموضوع بلغني حتى اسوي اعادة ترتيب للكود و اضيف هاي الميزات بهاي الطريقة

و ادزلك الpull request

noone313 commented 2 months ago

و عليكم السلام عاشت ايدك ابدي و اي شي تحتاج اني موجود

Hussein-L-AlMadhachi commented 2 months ago

سهلة ان شاء الله

Hussein-L-AlMadhachi commented 2 months ago

رح اضيف support لل 256bit colors هذا ينطيك الوان اكثر بس رح ابقي الألوان الأساسية الي انت ضفتها

256 colors

شتكول؟

Hussein-L-AlMadhachi commented 2 months ago

قصدي red و blue و هذن تبقى نفسها بس قيمها الرقمية شوي تتغير

noone313 commented 2 months ago

عاشت ايدك