Skip to content

Commit

Permalink
Merge branch 'creation-screen' into ingame
Browse files Browse the repository at this point in the history
Conflicts:
	Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/screens/CreatureCreationScreen.java
	Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/utils/FontHelper.java
  • Loading branch information
Frederick Maasch committed May 13, 2012
2 parents 7616253 + 3811c90 commit ca18ff9
Show file tree
Hide file tree
Showing 9 changed files with 418 additions and 102 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions Tamagotchi-android/assets/create-creature/pack
Expand Up @@ -17,3 +17,36 @@ PetDefault
orig: 249, 181 orig: 249, 181
offset: 0, 0 offset: 0, 0
index: -1 index: -1

CCButtons1.png
format: RGBA8888
filter: Nearest,Nearest
repeat: none
MainButtonRemove
rotate: false
xy: 2, 2
size: 55, 55
orig: 55, 55
offset: 0, 0
index: -1
MainButtonAccept
rotate: false
xy: 59, 2
size: 55, 55
orig: 55, 55
offset: 0, 0
index: -1
CreateButtonGirl
rotate: false
xy: 2, 59
size: 55, 55
orig: 55, 55
offset: 0, 0
index: -1
CreateButtonBoy
rotate: false
xy: 59, 59
size: 55, 55
orig: 55, 55
offset: 0, 0
index: -1
Expand Up @@ -25,7 +25,8 @@ public class TamagotchiConfiguration {
public int logLevel = Application.LOG_DEBUG; public int logLevel = Application.LOG_DEBUG;
public float stageWidth = 800; public float stageWidth = 800;
public float stageHeight = 480; public float stageHeight = 480;
public Color backgroundColor = new Color((226f / 255), (232f / 255), (254f / 255), 1f); public Color defaultBackgroundColor = new Color(226f / 255f, 232f / 255f, 254f / 255f, 1f);
public Color creatureCreationBackgroundColor = new Color(42f / 255f, 42f / 255f, 42f / 255f, 1f);


// Persistence // Persistence
public CreatureDao creatureDao; public CreatureDao creatureDao;
Expand Down
Expand Up @@ -10,6 +10,7 @@
import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.scenes.scene2d.Stage; import com.badlogic.gdx.scenes.scene2d.Stage;
import com.redditandroiddevelopers.tamagotchi.TamagotchiConfiguration;
import com.redditandroiddevelopers.tamagotchi.TamagotchiGame; import com.redditandroiddevelopers.tamagotchi.TamagotchiGame;


/** /**
Expand Down Expand Up @@ -138,9 +139,15 @@ public void show() {
*/ */
protected abstract Stage createStage(SpriteBatch batch); protected abstract Stage createStage(SpriteBatch batch);


/**
* Called at the start of every {@code render()}, before {@code update()}
* and {@code draw()}. By default, dispatch a {@code gl} call to render a
* background color as specified in
* {@link TamagotchiConfiguration#defaultBackgroundColor}.
*/
protected void drawBackground() { protected void drawBackground() {
final Color bgColor = game.config.backgroundColor; final Color bgc = game.config.defaultBackgroundColor;
Gdx.gl.glClearColor(bgColor.r, bgColor.g, bgColor.b, 1); Gdx.gl.glClearColor(bgc.r, bgc.g, bgc.b, bgc.a);
} }


@Override @Override
Expand Down

0 comments on commit ca18ff9

Please sign in to comment.