Mercurial > fife-parpg
changeset 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 | 62ec3b530cc6 |
files | clients/editor/plugins/HistoryManager.py clients/editor/scripts/editor.py clients/editor/scripts/gui/mapeditor.py clients/editor/scripts/gui/toolbar.py |
diffstat | 4 files changed, 21 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/clients/editor/plugins/HistoryManager.py Sat Aug 15 18:10:51 2009 +0000 +++ b/clients/editor/plugins/HistoryManager.py Sat Aug 15 18:31:01 2009 +0000 @@ -28,18 +28,25 @@ self.editor = scripts.editor.getEditor() self.engine = self.editor.getEngine() - self._undoGroup = ActionGroup(name=u"UndoGroup") self._showAction = Action(u"History manager", checkable=True) self._undoAction = Action(u"Undo", "gui/icons/undo.png") self._redoAction = Action(u"Redo", "gui/icons/redo.png") self._nextAction = Action(u"Next branch", "gui/icons/next_branch.png") self._prevAction = Action(u"Previous branch", "gui/icons/previous_branch.png") + + self._showAction.helptext = u"Toggle HistoryManager" + self._undoAction.helptext = u"Undo action (CTRL+Z)" + self._redoAction.helptext = u"Redo action (CTRL+SHIFT+Z)" + self._nextAction.helptext = u"Next branch (CTRL+ALT+Z" + self._prevAction.helptext = u"Previous branch (CTRL+ALT+SHIFT+Z)" + scripts.gui.action.activated.connect(self.toggle, sender=self._showAction) scripts.gui.action.activated.connect(self._undo, sender=self._undoAction) scripts.gui.action.activated.connect(self._redo, sender=self._redoAction) scripts.gui.action.activated.connect(self._next, sender=self._nextAction) scripts.gui.action.activated.connect(self._prev, sender=self._prevAction) + self._undoGroup = ActionGroup(name=u"UndoGroup") self._undoGroup.addAction(self._undoAction) self._undoGroup.addAction(self._redoAction) self._undoGroup.addAction(self._nextAction)
--- a/clients/editor/scripts/editor.py Sat Aug 15 18:10:51 2009 +0000 +++ b/clients/editor/scripts/editor.py Sat Aug 15 18:31:01 2009 +0000 @@ -187,6 +187,7 @@ self._windowMenu.addAction(self._mapgroup) helpAction = Action(u"Help", "gui/icons/help.png") + helpAction.helptext = u"Displays a window with some simple instructions" action.activated.connect(self._showHelpDialog, sender=helpAction) self._helpMenu.addAction(helpAction)
--- a/clients/editor/scripts/gui/mapeditor.py Sat Aug 15 18:10:51 2009 +0000 +++ b/clients/editor/scripts/gui/mapeditor.py Sat Aug 15 18:31:01 2009 +0000 @@ -148,10 +148,10 @@ self._moveAction = Action(text=u"Move", icon="gui/icons/move_instance.png", checkable=True) self._objectpickerAction = Action(text=u"Pick object", icon="gui/icons/objectpicker.png", checkable=True) - self._selectAction.helptext = u"Select cells on layer" - self._moveAction.helptext = u"Moves instances" - self._drawAction.helptext = u"Adds new instances based on currently selected object" - self._removeAction.helptext = u"Deletes instances" + self._selectAction.helptext = u"Select cells on layer (S)" + self._moveAction.helptext = u"Moves instances (M)" + self._drawAction.helptext = u"Adds new instances based on currently selected object (I)" + self._removeAction.helptext = u"Deletes instances (R)" self._objectpickerAction.helptext = u"Click an instance to set the current object to the one used by instance" action.toggled.connect(self._buttonToggled, sender=self._selectAction) @@ -181,6 +181,13 @@ zoomResetAction = Action(text=u"Reset zoom", icon="gui/icons/zoom_default.png") screenshotAction = Action(text=u"Take screenshot", icon="gui/icons/take_screenshot.png") + rotateLeftAction.helptext = u"Rotate counterclockwise by 90 degrees" + rotateRightAction.helptext = u"Rotate clockwise by 90 degrees" + zoomInAction.helptext = u"Zoom in (CTRL + Mousewheel up)" + zoomOutAction.helptext = u"Zoom out (CTRL + Mousewheel down)" + zoomResetAction.helptext = u"Reset zoom to default level" + screenshotAction.helptext = u"Take screenshot (F7)" + action.activated.connect(self.rotateCounterClockwise, sender=rotateLeftAction) action.activated.connect(self.rotateClockwise, sender=rotateRightAction) action.activated.connect(self.zoomIn, sender=zoomInAction)
--- a/clients/editor/scripts/gui/toolbar.py Sat Aug 15 18:10:51 2009 +0000 +++ b/clients/editor/scripts/gui/toolbar.py Sat Aug 15 18:31:01 2009 +0000 @@ -142,7 +142,7 @@ for action in actions: self.addAction(action) - self.adaptLayout(False) + self.adaptLayout() def setOrientation(self, orientation): if orientation == ToolBar.ORIENTATION['Vertical']: