Changeset 191


Ignore:
Timestamp:
07/08/09 02:15:38 (10 years ago)
Author:
bretzel_parpg
Message:

Word wrap is now implemented. Since pychan doesn't have it built in, you can use the standard python
module textwrap and it works beautifully

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PARPG/scripts/popups.py

    r189 r191  
    1616#   along with PARPG.  If not, see <http://www.gnu.org/licenses/>. 
    1717 
     18import textwrap 
    1819import fife 
    1920import pychan 
     
    265266                                                   position_technique="center:center", 
    266267                                                   min_size=(175,175)) 
     268             
     269        new_desc = textwrap.fill(desc, 34) 
    267270 
    268271        self.scroll = pychan.widgets.ScrollArea(name='scroll', size=(150,150)) 
    269         self.description = pychan.widgets.Label(name='descText', text=unicode(desc)) 
     272        self.description = pychan.widgets.Label(name='descText', text=unicode(new_desc)) 
    270273        self.scroll.addChild(self.description) 
    271274        self.examineWindow.addChild(self.scroll) 
Note: See TracChangeset for help on using the changeset viewer.