Skip to content

Commit

Permalink
Added inspector presentation to the card model and card element
Browse files Browse the repository at this point in the history
  • Loading branch information
syrel committed Sep 7, 2017
1 parent 25782ac commit 46e8444
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
gt-inspector
gtInspectorCardIn: aComposite
<gtInspectorPresentationOrder: 1>

self card ifNotNil: [ :aCardModel | aCardModel gtInspectorCardIn: aComposite ]
4 changes: 2 additions & 2 deletions src/Bloc-MemoryGame-Demo.package/MgdCardModel.class/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
I am a card model that can be flipped or not.
When card is flipped player should see a symbol that is used to compare two cards.
I am a card model that can be flipped in order to show its back or face.
When card is flipped on the face a player should see a symbol that is used to compare two cards.

!! Examples:

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
gt-inspector
gtInspectorCardIn: aComposite
<gtInspectorPresentationOrder: 1>

aComposite fastTable
title: 'Card' translated;
display: [ {
#Symbol: -> self symbol printString.
#'Visible side:' -> (self isFlipped ifTrue: [ 'Face' ] ifFalse: [ 'Back' ])
} ];
column: 'Name' evaluated: [ :each | each key ];
column: 'Value' evaluated: [ :each | each value ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
gt-inspector
gtInspectorCardSubscribtionsIn: aComposite
<gtInspectorPresentationOrder: 2>

^ self announcer gtInspectorSubscriptionsIn: aComposite
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"commentStamp" : "AliakseiSyrel 9/7/2017 10:51",
"commentStamp" : "AliakseiSyrel 9/7/2017 12:40",
"super" : "Object",
"category" : "Bloc-MemoryGame-Demo-Model",
"classinstvars" : [ ],
Expand Down

0 comments on commit 46e8444

Please sign in to comment.