comparison clients/editor/scripts/gui/mapeditor.py @ 318:e2ac8bb1a22c

* Added tooltips and hotkey information for some buttons * Fixed a small bug where toolbar did not resize when button style was changed
author cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
date Sat, 15 Aug 2009 18:31:01 +0000
parents a185aff39051
children 8b125ec749d7
comparison
equal deleted inserted replaced
317:a185aff39051 318:e2ac8bb1a22c
146 self._drawAction = Action(text=u"Draw", icon="gui/icons/add_instance.png", checkable=True) 146 self._drawAction = Action(text=u"Draw", icon="gui/icons/add_instance.png", checkable=True)
147 self._removeAction = Action(text=u"Remove", icon="gui/icons/erase_instance.png", checkable=True) 147 self._removeAction = Action(text=u"Remove", icon="gui/icons/erase_instance.png", checkable=True)
148 self._moveAction = Action(text=u"Move", icon="gui/icons/move_instance.png", checkable=True) 148 self._moveAction = Action(text=u"Move", icon="gui/icons/move_instance.png", checkable=True)
149 self._objectpickerAction = Action(text=u"Pick object", icon="gui/icons/objectpicker.png", checkable=True) 149 self._objectpickerAction = Action(text=u"Pick object", icon="gui/icons/objectpicker.png", checkable=True)
150 150
151 self._selectAction.helptext = u"Select cells on layer" 151 self._selectAction.helptext = u"Select cells on layer (S)"
152 self._moveAction.helptext = u"Moves instances" 152 self._moveAction.helptext = u"Moves instances (M)"
153 self._drawAction.helptext = u"Adds new instances based on currently selected object" 153 self._drawAction.helptext = u"Adds new instances based on currently selected object (I)"
154 self._removeAction.helptext = u"Deletes instances" 154 self._removeAction.helptext = u"Deletes instances (R)"
155 self._objectpickerAction.helptext = u"Click an instance to set the current object to the one used by instance" 155 self._objectpickerAction.helptext = u"Click an instance to set the current object to the one used by instance"
156 156
157 action.toggled.connect(self._buttonToggled, sender=self._selectAction) 157 action.toggled.connect(self._buttonToggled, sender=self._selectAction)
158 action.toggled.connect(self._buttonToggled, sender=self._moveAction) 158 action.toggled.connect(self._buttonToggled, sender=self._moveAction)
159 action.toggled.connect(self._buttonToggled, sender=self._drawAction) 159 action.toggled.connect(self._buttonToggled, sender=self._drawAction)
178 rotateRightAction = Action(text=u"Rotate clockwise", icon="gui/icons/rotate_clockwise.png") 178 rotateRightAction = Action(text=u"Rotate clockwise", icon="gui/icons/rotate_clockwise.png")
179 zoomInAction = Action(text=u"Zoom in", icon="gui/icons/zoom_in.png") 179 zoomInAction = Action(text=u"Zoom in", icon="gui/icons/zoom_in.png")
180 zoomOutAction = Action(text=u"Zoom out", icon="gui/icons/zoom_out.png") 180 zoomOutAction = Action(text=u"Zoom out", icon="gui/icons/zoom_out.png")
181 zoomResetAction = Action(text=u"Reset zoom", icon="gui/icons/zoom_default.png") 181 zoomResetAction = Action(text=u"Reset zoom", icon="gui/icons/zoom_default.png")
182 screenshotAction = Action(text=u"Take screenshot", icon="gui/icons/take_screenshot.png") 182 screenshotAction = Action(text=u"Take screenshot", icon="gui/icons/take_screenshot.png")
183
184 rotateLeftAction.helptext = u"Rotate counterclockwise by 90 degrees"
185 rotateRightAction.helptext = u"Rotate clockwise by 90 degrees"
186 zoomInAction.helptext = u"Zoom in (CTRL + Mousewheel up)"
187 zoomOutAction.helptext = u"Zoom out (CTRL + Mousewheel down)"
188 zoomResetAction.helptext = u"Reset zoom to default level"
189 screenshotAction.helptext = u"Take screenshot (F7)"
183 190
184 action.activated.connect(self.rotateCounterClockwise, sender=rotateLeftAction) 191 action.activated.connect(self.rotateCounterClockwise, sender=rotateLeftAction)
185 action.activated.connect(self.rotateClockwise, sender=rotateRightAction) 192 action.activated.connect(self.rotateClockwise, sender=rotateRightAction)
186 action.activated.connect(self.zoomIn, sender=zoomInAction) 193 action.activated.connect(self.zoomIn, sender=zoomInAction)
187 action.activated.connect(self.zoomOut, sender=zoomOutAction) 194 action.activated.connect(self.zoomOut, sender=zoomOutAction)