Changeset 268
- Timestamp:
- 02/19/08 19:35:04 (11 months ago)
- Author:
- bob
- Message:
-
- Location:
- artub
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r197
|
r268
|
|
| 27 | 27 | 'size2': 8, |
| 28 | 28 | } |
| | 29 | elif wx.Platform == "__WXMAC__": |
| | 30 | faces = { 'times': 'Times', |
| | 31 | 'mono' : 'Monaco', |
| | 32 | 'helv' : 'Helvetica', |
| | 33 | 'other': 'Courier New', |
| | 34 | 'size' : 12, |
| | 35 | 'size2': 10, |
| | 36 | } |
| 29 | 37 | else: |
| 30 | 38 | faces = { 'times': 'Times', |
| 31 | | 'mono' : 'Courier', |
| | 39 | 'mono' : 'Courier New', |
| 32 | 40 | 'helv' : 'Helvetica', |
| 33 | 41 | 'other': 'new century schoolbook', |
| … |
… |
|
| 136 | 144 | |
| 137 | 145 | # Global default styles for all languages |
| 138 | | self.StyleSetSpec(stc.STC_STYLE_DEFAULT, "face:%(helv)s,size:%(size)d" % faces) |
| | 146 | self.StyleSetSpec(stc.STC_STYLE_DEFAULT, "face:%(mono)s,size:%(size)d" % faces) |
| 139 | 147 | self.StyleClearAll() # Reset all to be like the default |
| 140 | 148 | |
| 141 | 149 | # Global default styles for all languages |
| 142 | | self.StyleSetSpec(stc.STC_STYLE_DEFAULT, "face:%(helv)s,size:%(size)d" % faces) |
| | 150 | self.StyleSetSpec(stc.STC_STYLE_DEFAULT, "face:%(mono)s,size:%(size)d" % faces) |
| 143 | 151 | self.StyleSetSpec(stc.STC_STYLE_LINENUMBER, "back:#C0C0C0,face:%(helv)s,size:%(size2)d" % faces) |
| 144 | 152 | self.StyleSetSpec(stc.STC_STYLE_CONTROLCHAR, "face:%(other)s" % faces) |
| … |
… |
|
| 148 | 156 | # Python styles |
| 149 | 157 | # Default |
| 150 | | self.StyleSetSpec(stc.STC_P_DEFAULT, "fore:#000000,face:%(helv)s,size:%(size)d" % faces) |
| | 158 | self.StyleSetSpec(stc.STC_P_DEFAULT, "fore:#000000,face:%(mono)s,size:%(size)d" % faces) |
| 151 | 159 | # Comments |
| 152 | 160 | # self.StyleSetSpec(stc.STC_P_COMMENTLINE, "fore:#007F00,face:%(other)s,size:%(size)d" % faces) |
| … |
… |
|
| 154 | 162 | self.StyleSetSpec(stc.STC_P_NUMBER, "fore:#007F7F,size:%(size)d" % faces) |
| 155 | 163 | # String |
| 156 | | self.StyleSetSpec(stc.STC_P_STRING, "fore:#7F007F,face:%(helv)s,size:%(size)d" % faces) |
| | 164 | self.StyleSetSpec(stc.STC_P_STRING, "fore:#7F007F,face:%(mono)s,size:%(size)d" % faces) |
| 157 | 165 | # Single quoted string |
| 158 | | self.StyleSetSpec(stc.STC_P_CHARACTER, "fore:#7F007F,face:%(helv)s,size:%(size)d" % faces) |
| | 166 | self.StyleSetSpec(stc.STC_P_CHARACTER, "fore:#7F007F,face:%(mono)s,size:%(size)d" % faces) |
| 159 | 167 | # Keyword |
| 160 | 168 | self.StyleSetSpec(stc.STC_P_WORD, "fore:#00007F,bold,size:%(size)d" % faces) |
| … |
… |
|
| 170 | 178 | self.StyleSetSpec(stc.STC_P_OPERATOR, "bold,size:%(size)d" % faces) |
| 171 | 179 | # Identifiers |
| 172 | | self.StyleSetSpec(stc.STC_P_IDENTIFIER, "fore:#000000,face:%(helv)s,size:%(size)d" % faces) |
| | 180 | self.StyleSetSpec(stc.STC_P_IDENTIFIER, "fore:#000000,face:%(mono)s,size:%(size)d" % faces) |
| 173 | 181 | # Comment-blocks |
| 174 | 182 | self.StyleSetSpec(stc.STC_P_COMMENTBLOCK, "fore:#7F7F7F,size:%(size)d" % faces) |
-
|
r267
|
r268
|
|
| 7 | 7 | set_sys_path() |
| 8 | 8 | |
| | 9 | print "Running Artub version", __version__ |
| 9 | 10 | import gettext |
| 10 | 11 | gettext.install('artub', 'locale', unicode=1) |
| 11 | 12 | import locale |
| 12 | 13 | import wx |
| | 14 | print "Using wxPython", wx.VERSION_STRING |
| 13 | 15 | try: |
| 14 | 16 | info = wx.Locale.GetLanguageInfo(wx.Locale.GetSystemLanguage()) |
-
|
r267
|
r268
|
|
| 948 | 948 | #: propertiesbar/propertyeditors.py:1045 |
| 949 | 949 | msgid "Inherited from " |
| 950 | | msgstr "Hérité de" |
| | 950 | msgstr "Hérité de " |
| 951 | 951 | |
| 952 | 952 | #: redistributable.py:12 |
-
|
r250
|
r268
|
|
| 24 | 24 | def on_look(self): |
| 25 | 25 | if self.walk_point: |
| 26 | | game.ego.walk_to(self.walk_point.x, self.walk_point.y) |
| 27 | | |
| 28 | | game.ego.say(self.description) |
| | 26 | ego.walk_to(self.walk_point.x, self.walk_point.y) |
| | 27 | |
| | 28 | ego.say(self.description) |
| 29 | 29 | |
| 30 | 30 | def on_hand(self): |
| 31 | 31 | if self.walk_point: |
| 32 | | game.ego.walk_to(self.walk_point.x, self.walk_point.y) |
| | 32 | ego.walk_to(self.walk_point.x, self.walk_point.y) |
| 33 | 33 | |
| 34 | 34 | def on_lose_focus(self, newobj): |
| … |
… |
|
| 40 | 40 | def on_walk(self): |
| 41 | 41 | if self.walk_point: |
| 42 | | game.ego.walk_to(self.walk_point.x, self.walk_point.y) |
| | 42 | ego.walk_to(self.walk_point.x, self.walk_point.y) |
| 43 | 43 | |
| 44 | 44 | def on_left_button_down(self): |
-
|
r266
|
r268
|
|
| 328 | 328 | |
| 329 | 329 | if isinstance(parent, Sprite): |
| 330 | | print >> sys.__stderr__, "set parent", parent |
| | 330 | # print >> sys.__stderr__, "set parent", parent |
| 331 | 331 | self.parent = parent |
| 332 | 332 | |
| … |
… |
|
| 460 | 460 | |
| 461 | 461 | def set_boxes(self): |
| | 462 | print "set_boxes", self, len(self.contours), hasattr(self, "regions"), self.boxes |
| 462 | 463 | if len(self.contours): return |
| 463 | 464 | for i in self.boxes: |
| 464 | 465 | c = Contour(i.points) |
| | 466 | print "adding contour", c |
| 465 | 467 | self.contours.append(c) |
| | 468 | print self.to_string() |
| 466 | 469 | center = self.get_center() |
| 467 | 470 | self.center = (center.x, center.y) |
| … |
… |
|
| 553 | 556 | Sprite.__init__(self, parent) |
| 554 | 557 | poujolRegion.__init__(self, *args) |
| 555 | | self.boxes = [] |
| | 558 | #self.boxes = [] |
| 556 | 559 | self.active = True |
| 557 | 560 | |
-
|
r266
|
r268
|
|
| 99 | 99 | print "<p> </p>" |
| 100 | 100 | self.footer() |
| 101 | | open(os.path.join(wx.GetApp().artub_path, 'startup', 'dynamic.html'), 'w').write(self.restore_outputs()) |
| | 101 | s = self.restore_outputs().encode('iso-8859-1') |
| | 102 | open(os.path.join(wx.GetApp().artub_path, 'startup', 'dynamic.html'), 'w').write(s) |
| 102 | 103 | except: |
| 103 | 104 | raise |
Download in other formats:
|
|