Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Tablexia-old
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
labs
Tablexia-old
Commits
f06bb212
Commit
f06bb212
authored
Dec 10, 2014
by
Matyáš Latner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#323
Reset pozice naplánovaných akcí po chybě tak, aby byla viditelná poslední prováděná akce.
parent
c5ec8323
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
src/main/java/cz/nic/tablexia/game/games/potme/PotmeActivity.java
.../java/cz/nic/tablexia/game/games/potme/PotmeActivity.java
+4
-4
src/main/java/cz/nic/tablexia/game/games/potme/action/widget/ActionsStripWidget.java
...ia/game/games/potme/action/widget/ActionsStripWidget.java
+16
-4
No files found.
src/main/java/cz/nic/tablexia/game/games/potme/PotmeActivity.java
View file @
f06bb212
...
...
@@ -439,7 +439,7 @@ public class PotmeActivity extends GameActivity implements TileMapClickListener
@Override
protected
void
showGame
()
{
goToPlanningMode
();
goToPlanningMode
(
null
);
super
.
showGame
();
actionsWidget
.
showActions
();
}
...
...
@@ -651,12 +651,12 @@ public class PotmeActivity extends GameActivity implements TileMapClickListener
}
}
private
void
goToPlanningMode
()
{
private
void
goToPlanningMode
(
Integer
actionNumber
)
{
hideFadeLayer
();
actionsStripWidget
.
setStartButtonState
();
actionsWidget
.
enableActions
();
actionsStripWidget
.
enableControl
();
actionsStripWidget
.
displaySelectedActions
();
actionsStripWidget
.
displaySelectedActions
(
actionNumber
);
setMapWidgetsClickable
(
true
);
planningStartTime
=
(
int
)
scene
.
getSecondsElapsedTotal
();
}
...
...
@@ -801,7 +801,7 @@ public class PotmeActivity extends GameActivity implements TileMapClickListener
private
void
performaErrorAction
()
{
errorCount
++;
resetGameState
();
goToPlanningMode
();
goToPlanningMode
(
Integer
.
valueOf
(
selectedActionPosition
)
);
}
private
void
unregisterUpdateHandler
()
{
...
...
src/main/java/cz/nic/tablexia/game/games/potme/action/widget/ActionsStripWidget.java
View file @
f06bb212
...
...
@@ -108,7 +108,7 @@ public class ActionsStripWidget extends Entity implements ActionListener {
createNextActionField
();
createOverlay
();
displaySelectedActions
();
displaySelectedActions
(
null
);
}
...
...
@@ -534,9 +534,17 @@ public class ActionsStripWidget extends Entity implements ActionListener {
return
selectedActions
;
}
public
void
displaySelectedActions
()
{
public
void
displaySelectedActions
(
Integer
actionNumber
)
{
showOverlay
(
false
);
moveScrollPaneBottomToAction
(
0
,
null
,
true
);
int
position
=
0
;
if
(
actionNumber
!=
null
&&
isScreenFilledWithActions
(
selectedActions
.
size
()))
{
position
=
actionNumber
.
intValue
();
if
(!
isScreenFilledWithActions
(
selectedActions
.
size
()
-
position
))
{
moveScrollPaneTopToAction
(
selectedActions
.
size
()
+
1
,
null
);
return
;
}
}
moveScrollPaneBottomToAction
(
position
,
null
,
true
);
}
public
void
displayProcessedActions
(
int
actionNumber
,
boolean
useEaseFunction
,
IEntityModifierListener
modifierListener
)
{
...
...
@@ -632,7 +640,11 @@ public class ActionsStripWidget extends Entity implements ActionListener {
}
private
boolean
isScreenFilledWithActions
()
{
return
((
selectedActions
.
size
()
+
1
)
*
(
PotmeActivity
.
ACTION_SIZE_BIGGER
+
ACTION_OFFSET
))
>
height
;
return
isScreenFilledWithActions
(
selectedActions
.
size
()
+
1
);
}
private
boolean
isScreenFilledWithActions
(
int
actionCount
)
{
return
(
actionCount
*
(
PotmeActivity
.
ACTION_SIZE_BIGGER
+
ACTION_OFFSET
))
>
height
;
}
public
int
getCurrentActionOffset
(
int
position
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment