Skip to content

Commit

Permalink
[Issue#11] - Add button help
Browse files Browse the repository at this point in the history
  • Loading branch information
YannLeGoff committed Jul 7, 2023
1 parent d32d4d7 commit 43b29e1
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/Pyramid-Bloc/PyramidSpacePlugin.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ PyramidSpacePlugin >> initialize [
resetSpaceButton := SpButtonPresenter new
icon: (self iconNamed: #smallUpdate);
action: [ self resetSpacePresenter ];
help: 'Refresh space in case of an issue';
yourself
]

Expand Down
6 changes: 3 additions & 3 deletions src/Pyramid/PyramidHistoryPlugin.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ PyramidHistoryPlugin >> initializeButtons [
icon: (self iconNamed: #smallUndo);
action: [ self history undo ];
enabled: self history canUndo;
help: 'Undo';
yourself.
redoButton := SpButtonPresenter new
icon: (self iconNamed: #smallRedo);
action: [
self history redo.
];
action: [ self history redo ];
enabled: self history canRedo;
help: 'Redo';
yourself
]

Expand Down
18 changes: 18 additions & 0 deletions src/Pyramid/PyramidPluginDynamicLayout.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@ PyramidPluginDynamicLayout >> changeEditorLayout [
PyramidPluginDynamicLayout >> changeLeftLayout [

self isLeftOpened: self isLeftOpened not.
self leftButton help: self leftButtonHelp.
self changeEditorLayout
]

{ #category : #'as yet unclassified' }
PyramidPluginDynamicLayout >> changeRightLayout [

self isRightOpened: self isRightOpened not.
self rightButton help: self rightButtonHelp.
self changeEditorLayout
]

Expand Down Expand Up @@ -89,10 +91,12 @@ PyramidPluginDynamicLayout >> initialize [
leftButton := SpButtonPresenter new
icon: (self iconNamed: #solidMenu);
action: [ self changeLeftLayout ];
help: self leftButtonHelp;
yourself.
rightButton := SpButtonPresenter new
icon: (self iconNamed: #solidMenu);
action: [ self changeRightLayout ];
help: self rightButtonHelp;
yourself
]

Expand Down Expand Up @@ -125,8 +129,22 @@ PyramidPluginDynamicLayout >> leftButton [
^ leftButton
]

{ #category : #'as yet unclassified' }
PyramidPluginDynamicLayout >> leftButtonHelp [

self isLeftOpened ifTrue: [ ^ 'Hide left panel' ] ifFalse: [ ^ 'Show left panel' ]
]

{ #category : #accessing }
PyramidPluginDynamicLayout >> rightButton [

^ rightButton
]

{ #category : #'as yet unclassified' }
PyramidPluginDynamicLayout >> rightButtonHelp [

self isRightOpened
ifTrue: [ ^ 'Hide right panel' ]
ifFalse: [ ^ 'Show right panel' ]
]
8 changes: 6 additions & 2 deletions src/Pyramid/PyramidSavePlugin.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,25 @@ PyramidSavePlugin >> initialize [

savingService := PyramidSavingService new
savingModel: saveModel;

methodBuilder: PyramidSavingMethodBuilder ston;
yourself.

inputsButton := SpButtonPresenter new
icon: (self iconNamed: #smallRemoteOpen);
action: [ inputsPopover popup ]; yourself.
help: 'Project configuration';
action: [ inputsPopover popup ];
yourself.
inputsPopover := PyramidPopoverFactory
makeWithPresenter: inputsView
relativeTo: inputsButton
position: SpPopoverPosition right.

saveButton := SpButtonPresenter new
icon: (self iconNamed: #smallSave);
help: 'Save project';
action: [ self saveAction ];
yourself.
yourself
]

{ #category : #accessing }
Expand Down

0 comments on commit 43b29e1

Please sign in to comment.