Mercurial > rinkhals
comparison gamelib/toolbar.py @ 546:e57a0cf38cc7
And fix headings, now that it's easy to do so.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Sat, 28 Nov 2009 11:09:01 +0000 |
parents | 56a3a3f54e3d |
children | 27c09c58d89d |
comparison
equal
deleted
inserted
replaced
545:56a3a3f54e3d | 546:e57a0cf38cc7 |
---|---|
217 self.tr() | 217 self.tr() |
218 self.td(gui.Spacer(0, height), colspan=2) | 218 self.td(gui.Spacer(0, height), colspan=2) |
219 | 219 |
220 def add_heading(self, text): | 220 def add_heading(self, text): |
221 self.tr() | 221 self.tr() |
222 self.td(mklabel(text), colspan=2) | 222 self.td(mklabel(text, width=constants.TOOLBAR_WIDTH, align=0), colspan=2) |
223 | 223 |
224 def add_tool_button(self, text, tool, price=None, cursor=None): | 224 def add_tool_button(self, text, tool, price=None, cursor=None): |
225 if price is not None: | 225 if price is not None: |
226 text = "%s (%s)" % (text, price) | 226 text = "%s (%s)" % (text, price) |
227 return self.add_tool(text, lambda: self.gameboard.set_selected_tool(tool, | 227 return self.add_tool(text, lambda: self.gameboard.set_selected_tool(tool, |