Skip to content

Commit

Permalink
in Progress of re-doing the load screen. Im going to give the load ba…
Browse files Browse the repository at this point in the history
…r a reflection. (and maybe segments (like the ubuntu bar)... im not sure yet... imma be googling aruond to see what other games are doing)

And make a logo of some sort for the image.
Just need to install photoshop.

I may or may not use a background image for the load image. 
it would need to be large though. cause the client needs to be prepared for varying resolutions.
  • Loading branch information
Lt.Sego authored and Lt.Sego committed Mar 29, 2010
1 parent 49a866f commit 7c291e1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
21 changes: 13 additions & 8 deletions Client/src/org/pokenet/client/GameClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ public class GameClient extends BasicGame {
private boolean m_close = false; //Used to tell the game to close or not.
private Image[] m_spriteImageArray = new Image[240]; /* WARNING: Replace with actual number of sprites */
public boolean m_chatServerIsActive;
private Image m_loadImage;

/**
* Load options
*/
Expand Down Expand Up @@ -144,6 +146,7 @@ public class GameClient extends BasicGame {
m_soundPlayer.start();
//m_soundPlayer.setTrack("introandgym");
}

}

/**
Expand All @@ -152,6 +155,7 @@ public class GameClient extends BasicGame {
*/
public GameClient(String title) {
super(title);

}

/**
Expand All @@ -160,7 +164,9 @@ public GameClient(String title) {
@SuppressWarnings("deprecation")
@Override
public void init(GameContainer gc) throws SlickException {

// gc.getGraphics().setBackground(Color.white);
m_loadImage = new Image("res/ui/pokeball.png");

LoadingList.setDeferredLoading(true);


Expand Down Expand Up @@ -390,25 +396,23 @@ public void update(GameContainer gc, int delta) throws SlickException {
public void render(GameContainer gc, Graphics g) throws SlickException {
if (m_nextResource != null) {
g.setColor(Color.white);
g.drawString("Loading: "+m_nextResource.getDescription(), 10, 100);
g.drawString("Loading: "+m_nextResource.getDescription(), 10, gc.getHeight() - 90);
}

int total = LoadingList.get().getTotalResources();
int maxWidth = gc.getWidth() - 20;
int loaded = LoadingList.get().getTotalResources() - LoadingList.get().getRemainingResources();
if(!m_started){
g.drawImage(m_loadImage, gc.getWidth() / 2 - m_loadImage.getWidth() / 2, gc.getHeight() / 2 - m_loadImage.getHeight());

float bar = loaded / (float) total;

// non-imagy loading bar
g.setColor(m_loadGreen);
g.setAntiAlias(true);
g.fillRoundRect(15, 154, bar*(maxWidth - 10), 20, 10);
g.fillRoundRect(15, gc.getHeight() - 120, bar*(maxWidth - 10), 20, 10);
g.setColor(Color.gray);
g.drawRoundRect(10 ,150, maxWidth, 28, 15);




g.drawRoundRect(10 ,gc.getHeight() - 124, maxWidth, 28, 15);
}

if (m_started){
Expand Down Expand Up @@ -872,6 +876,7 @@ public static void main(String [] args) {
800, 600, fullscreen);
gc.setTargetFrameRate(50);
gc.start();

} catch (Exception e) {
e.printStackTrace();
}
Expand Down
2 changes: 1 addition & 1 deletion Client/src/org/pokenet/client/ui/LoginScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private void setClientRevision() {
m_clientRev = new Label("Client Version: svn:" + s.nextLine());
f = new File(path + "rev.txt");
s = new Scanner(f);
m_clientRev.setText(m_clientRev.getText() + " // " + s.nextLine());
m_clientRev.setText(m_clientRev.getText() + " // s" + s.nextLine());

} else {
f = new File(path + "rev.txt");
Expand Down

0 comments on commit 7c291e1

Please sign in to comment.