initial instruction scene
This commit is contained in:
parent
170382d2ca
commit
a9c2d781bb
34
raw/text/t_instructions.txt
Normal file
34
raw/text/t_instructions.txt
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
Keys
|
||||||
|
Movement
|
||||||
|
Items
|
||||||
|
Skill
|
||||||
|
Menu
|
||||||
|
Pause
|
||||||
|
Stats
|
||||||
|
Root Town ▶ Dungeon
|
||||||
|
Use the Chaos Gate.
|
||||||
|
Dungeon ▶ Root Town
|
||||||
|
Use an Ocarina.
|
||||||
|
HP Recovery
|
||||||
|
Health Drink (50%)
|
||||||
|
Healing Elixer (100%)
|
||||||
|
SP Recovery
|
||||||
|
Mage's Soul (50%)
|
||||||
|
Emperor's Soul (100%)
|
||||||
|
Noble Wine:
|
||||||
|
Restores HP+SP.
|
||||||
|
Antidote:
|
||||||
|
Poison Treatment.
|
||||||
|
Restorative:
|
||||||
|
Curse Treatment.
|
||||||
|
Resurrect:
|
||||||
|
Revive a player.
|
||||||
|
Ocarina:
|
||||||
|
Move to Root Town.
|
||||||
|
Attack Power UP
|
||||||
|
Ap Corv
|
||||||
|
Repth - One Player
|
||||||
|
La Repth - Everyone
|
||||||
|
Data Drain
|
||||||
|
Use on Boss monsters to weaken them.
|
||||||
|
Requirements Monster HP 50% Kite SP 100%
|
@ -5,6 +5,7 @@ import javax.microedition.lcdui.Display;
|
|||||||
import javax.microedition.midlet.MIDlet;
|
import javax.microedition.midlet.MIDlet;
|
||||||
|
|
||||||
import sillysagiri.Sagiri;
|
import sillysagiri.Sagiri;
|
||||||
|
import sillysagiri.scene.Instruction;
|
||||||
import sillysagiri.scene.MainMenu;
|
import sillysagiri.scene.MainMenu;
|
||||||
import sillysagiri.scene.MainMenu;
|
import sillysagiri.scene.MainMenu;
|
||||||
|
|
||||||
@ -26,7 +27,7 @@ public class DotHack extends MIDlet implements Runnable {
|
|||||||
thread.setPriority(Thread.MAX_PRIORITY);
|
thread.setPriority(Thread.MAX_PRIORITY);
|
||||||
thread.start();
|
thread.start();
|
||||||
|
|
||||||
sagiri.Set_Scene(new MainMenu());
|
sagiri.Set_Scene(new Instruction());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void pauseApp() {}
|
public void pauseApp() {}
|
||||||
|
@ -39,7 +39,7 @@ public class Sagiri
|
|||||||
|
|
||||||
public Input input;
|
public Input input;
|
||||||
|
|
||||||
public int fps = 60;
|
public int fps = 10;
|
||||||
|
|
||||||
private Scene _scene_current = null;
|
private Scene _scene_current = null;
|
||||||
public long time_begin = 0;
|
public long time_begin = 0;
|
||||||
|
214
src/sillysagiri/scene/Instruction.java
Normal file
214
src/sillysagiri/scene/Instruction.java
Normal file
@ -0,0 +1,214 @@
|
|||||||
|
package sillysagiri.scene;
|
||||||
|
|
||||||
|
import javax.microedition.lcdui.Graphics;
|
||||||
|
import javax.microedition.lcdui.Image;
|
||||||
|
import javax.microedition.lcdui.game.Sprite;
|
||||||
|
|
||||||
|
import sillysagiri.BMF;
|
||||||
|
import sillysagiri.Sagiri;
|
||||||
|
import sillysagiri.Scene;
|
||||||
|
import sillysagiri.Utils;
|
||||||
|
|
||||||
|
public class Instruction extends Scene {
|
||||||
|
|
||||||
|
private final int STATE_TAB_KEYS = 0;
|
||||||
|
private final int STATE_TAB_MOVE = 1;
|
||||||
|
private final int STATE_TAB_ITEMS = 2;
|
||||||
|
private final int STATE_TAB_SKILL = 3;
|
||||||
|
|
||||||
|
private byte state_tab = 0;
|
||||||
|
private byte state_page = 0;
|
||||||
|
|
||||||
|
private BMF bmf_black;
|
||||||
|
private BMF bmf_lime;
|
||||||
|
private BMF bmf_blue;
|
||||||
|
|
||||||
|
private Image img_loop;
|
||||||
|
private Image img_keypad;
|
||||||
|
private Image img_out;
|
||||||
|
private Image img_arrow;
|
||||||
|
|
||||||
|
private String[] str_list1;
|
||||||
|
private String[] str_list2;
|
||||||
|
|
||||||
|
public void Preload() {
|
||||||
|
try
|
||||||
|
{
|
||||||
|
bmf_black = BMF.Create("/silly/bmf/nds12_0.silly.gz", "/silly/bmf/nds12.fnt", 0xff000000);
|
||||||
|
bmf_lime = BMF.Create("/silly/bmf/nds12_0.silly.gz", "/silly/bmf/nds12.fnt", 0xffB6FF00);
|
||||||
|
bmf_blue = BMF.Create("/silly/bmf/onds12_0.silly.gz", "/silly/bmf/onds12.fnt", 0xff00dbff);
|
||||||
|
|
||||||
|
img_loop = Image.createImage("/m_2.png");
|
||||||
|
img_keypad = Image.createImage("/bH.png");
|
||||||
|
img_out = Image.createImage("/out.png");
|
||||||
|
img_arrow = Image.createImage("/i_0.png");
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
sagiri.Set_Scene(new DeathError(e));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Destroy() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Update(long dt, Graphics g) {
|
||||||
|
Utils.Clear_Screen(g, 255, 108, 0);
|
||||||
|
|
||||||
|
int loopCount = (int)Math.ceil((float)Utils.GetScreenHeight()/img_loop.getHeight());
|
||||||
|
for (int i = 0; i<loopCount; i++)
|
||||||
|
g.drawImage(img_loop, 0, i*img_loop.getHeight(), Graphics.LEFT | Graphics.TOP);
|
||||||
|
|
||||||
|
int size_header = (int)(bmf_blue.lineHeight*1.5);
|
||||||
|
g.setColor(109, 0, 0);
|
||||||
|
g.fillRect(5, 5, Utils.GetScreenWidth()-10, size_header);
|
||||||
|
|
||||||
|
bmf_blue.DrawEx(g, "Instructions", 10, (size_header/2)+5, Graphics.LEFT | Graphics.VCENTER);
|
||||||
|
g.drawImage(img_out, Utils.GetScreenWidth()-10, (size_header/2)+5, Graphics.RIGHT|Graphics.VCENTER);
|
||||||
|
|
||||||
|
g.fillRect(5, size_header+7, Utils.GetScreenWidth()-10, size_header);
|
||||||
|
|
||||||
|
int cursory = size_header+7 + (size_header/2);
|
||||||
|
g.drawRegion(
|
||||||
|
img_arrow,
|
||||||
|
0, 0, 7, 11,
|
||||||
|
Sprite.TRANS_NONE,
|
||||||
|
7, cursory,
|
||||||
|
Graphics.VCENTER | Graphics.LEFT);
|
||||||
|
|
||||||
|
g.drawRegion(
|
||||||
|
img_arrow,
|
||||||
|
7, 0, 7, 11,
|
||||||
|
Sprite.TRANS_NONE,
|
||||||
|
Utils.GetScreenWidth()-7, cursory,
|
||||||
|
Graphics.VCENTER | Graphics.RIGHT);
|
||||||
|
|
||||||
|
short[] size_t1 = bmf_black.Measure("Keys");
|
||||||
|
short[] size_t2 = bmf_black.Measure("Movement");
|
||||||
|
short[] size_t3 = bmf_black.Measure("Items");
|
||||||
|
short[] size_t4 = bmf_black.Measure("Skill");
|
||||||
|
int size_t = size_t1[0] + size_t2[0] + size_t3[0] + size_t4[0];
|
||||||
|
int separator = ((Utils.GetScreenWidth()-10) - size_t - 38) / 3;
|
||||||
|
short[] size_h = bmf_black.Measure("KeysMovementItemsSkill");
|
||||||
|
// cursory = (size_header+7) + 2;
|
||||||
|
cursory = (size_header+7) + (size_header-size_h[1])/2;
|
||||||
|
int cursorx = 24;
|
||||||
|
|
||||||
|
if (state_tab == 0) bmf_lime.Draw(g, "Keys", cursorx, cursory);
|
||||||
|
else bmf_black.Draw(g, "Keys", cursorx, cursory);
|
||||||
|
|
||||||
|
if (state_tab == 1) bmf_lime.Draw(g, "Movement", cursorx+=size_t1[0]+separator, cursory);
|
||||||
|
else bmf_black.Draw(g, "Movement", cursorx+=size_t1[0]+separator, cursory);
|
||||||
|
|
||||||
|
if (state_tab == 2) bmf_lime.Draw(g, "Items", cursorx+=size_t2[0]+separator, cursory);
|
||||||
|
else bmf_black.Draw(g, "Items", cursorx+=size_t2[0]+separator, cursory);
|
||||||
|
|
||||||
|
if (state_tab == 3) bmf_lime.Draw(g, "Skill", cursorx+=size_t3[0]+separator, cursory);
|
||||||
|
else bmf_black.Draw(g, "Skill", cursorx+=size_t3[0]+separator, cursory);
|
||||||
|
|
||||||
|
switch (state_tab) {
|
||||||
|
case STATE_TAB_KEYS:
|
||||||
|
{
|
||||||
|
g.drawImage(img_keypad, Utils.GetScreenWidth()/2, Utils.GetScreenHeight()/2, Graphics.VCENTER | Graphics.HCENTER);
|
||||||
|
|
||||||
|
cursorx = (Utils.GetScreenWidth()/2) - img_keypad.getWidth()/2 - 3;
|
||||||
|
cursory = 116;
|
||||||
|
g.drawLine(cursorx, cursory, cursorx-20, cursory-8);
|
||||||
|
bmf_black.DrawEx(g, "Menu", cursorx-23, cursory-8-bmf_black.lineHeight/2, Graphics.RIGHT|Graphics.VCENTER);
|
||||||
|
|
||||||
|
cursorx = (Utils.GetScreenWidth()/2) + img_keypad.getWidth()/2 + 3;
|
||||||
|
cursory = 116;
|
||||||
|
g.drawLine(cursorx, cursory, cursorx+20, cursory-8);
|
||||||
|
bmf_black.DrawEx(g, "Stats", cursorx+23, cursory-8-bmf_black.lineHeight/2, Graphics.LEFT|Graphics.VCENTER);
|
||||||
|
|
||||||
|
cursorx = (Utils.GetScreenWidth()/2) + img_keypad.getWidth()/2 + 3;
|
||||||
|
cursory = 132;
|
||||||
|
g.drawLine(cursorx, cursory, cursorx+20, cursory-3);
|
||||||
|
bmf_black.DrawEx(g, "Movement", cursorx+23, cursory-3-bmf_black.lineHeight/2, Graphics.LEFT|Graphics.VCENTER);
|
||||||
|
|
||||||
|
cursorx = (Utils.GetScreenWidth()/2) - img_keypad.getWidth()/2 - 3;
|
||||||
|
cursory = 201;
|
||||||
|
g.drawLine(cursorx, cursory, cursorx-20, cursory+4);
|
||||||
|
bmf_black.DrawEx(g, "Menu", cursorx-23, cursory+4-bmf_black.lineHeight/2, Graphics.RIGHT|Graphics.VCENTER);
|
||||||
|
|
||||||
|
cursorx = (Utils.GetScreenWidth()/2) + img_keypad.getWidth()/2 + 3;
|
||||||
|
cursory = 201;
|
||||||
|
g.drawLine(cursorx, cursory, cursorx+20, cursory+4);
|
||||||
|
bmf_black.DrawEx(g, "Pause", cursorx+23, cursory+4-bmf_black.lineHeight/2, Graphics.LEFT|Graphics.VCENTER);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case STATE_TAB_MOVE:
|
||||||
|
{
|
||||||
|
cursory = size_header*2 + 12;
|
||||||
|
bmf_black.Draw(g, "Root Town ▶ Dungeon", 5, cursory);
|
||||||
|
bmf_black.Draw(g, "Use the Chaos Gate.", 10, cursory+=bmf_black.lineHeight);
|
||||||
|
|
||||||
|
bmf_black.Draw(g, "Dungeon ▶ Root Town", 5, cursory+=bmf_black.lineHeight+5);
|
||||||
|
bmf_black.Draw(g, "Use an Ocarina.", 10, cursory+=bmf_black.lineHeight);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case STATE_TAB_ITEMS:
|
||||||
|
{
|
||||||
|
cursory = size_header*2 + 12;
|
||||||
|
bmf_black.Draw(g, "HP Recovery", 10, cursory);
|
||||||
|
bmf_black.Draw(g, "Health Drink (50%)", 20, cursory+=bmf_black.lineHeight);
|
||||||
|
bmf_black.Draw(g, "Healing Elixer (100%)", 20, cursory+=bmf_black.lineHeight);
|
||||||
|
|
||||||
|
bmf_black.Draw(g, "SP Recovery", 10, cursory+=bmf_black.lineHeight+5);
|
||||||
|
bmf_black.Draw(g, "Mage's Soul (50%)", 20, cursory+=bmf_black.lineHeight);
|
||||||
|
bmf_black.Draw(g, "Emperor's Soul (100%)", 20, cursory+=bmf_black.lineHeight);
|
||||||
|
|
||||||
|
bmf_black.Draw(g, "Noble Wine:", 10, cursory+=bmf_black.lineHeight+5);
|
||||||
|
bmf_black.Draw(g, "Restores HP+SP.", 20, cursory+=bmf_black.lineHeight);
|
||||||
|
|
||||||
|
bmf_black.Draw(g, "Antidote:", 10, cursory+=bmf_black.lineHeight+5);
|
||||||
|
bmf_black.Draw(g, "Poison Treatment.", 20, cursory+=bmf_black.lineHeight);
|
||||||
|
|
||||||
|
bmf_black.Draw(g, "Restorative:", 10, cursory+=bmf_black.lineHeight+5);
|
||||||
|
bmf_black.Draw(g, "Curse Treatment.", 20, cursory+=bmf_black.lineHeight);
|
||||||
|
|
||||||
|
bmf_black.Draw(g, "Resurrect:", 10, cursory+=bmf_black.lineHeight+5);
|
||||||
|
bmf_black.Draw(g, "Revive a player.", 20, cursory+=bmf_black.lineHeight);
|
||||||
|
|
||||||
|
bmf_black.Draw(g, "Ocarina:", 10, cursory+=bmf_black.lineHeight+5);
|
||||||
|
bmf_black.Draw(g, "Move to Root Town.", 20, cursory+=bmf_black.lineHeight);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case STATE_TAB_SKILL:
|
||||||
|
{
|
||||||
|
cursory = size_header*2 + 12;
|
||||||
|
bmf_black.Draw(g, "Attack Power UP", 10, cursory);
|
||||||
|
bmf_black.Draw(g, "Ap Corv", 20, cursory+=bmf_black.lineHeight);
|
||||||
|
|
||||||
|
bmf_black.Draw(g, "HP Recovery", 10, cursory+=bmf_black.lineHeight+5);
|
||||||
|
bmf_black.Draw(g, "Repth - One Player", 20, cursory+=bmf_black.lineHeight);
|
||||||
|
bmf_black.Draw(g, "La Repth - Everyone", 20, cursory+=bmf_black.lineHeight);
|
||||||
|
|
||||||
|
bmf_black.Draw(g, "Data Drain", 10, cursory+=bmf_black.lineHeight+5);
|
||||||
|
bmf_black.Draw(g, "Use on Boss monsters to weaken them.", 20, cursory+=bmf_black.lineHeight);
|
||||||
|
bmf_black.Draw(g, "Requirements Monster HP 50% Kite SP 100%", 20, cursory+=bmf_black.lineHeight);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sagiri.input.IsKeyDown(new int[]{Sagiri.KEY_RIGHT, Sagiri.KEY_6}))
|
||||||
|
{
|
||||||
|
state_tab++;
|
||||||
|
state_page = 0;
|
||||||
|
if (state_tab > 3) state_tab = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sagiri.input.IsKeyDown(new int[]{Sagiri.KEY_LEFT, Sagiri.KEY_4}))
|
||||||
|
{
|
||||||
|
state_tab--;
|
||||||
|
state_page = 0;
|
||||||
|
if (state_tab < 0) state_tab = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -5,17 +5,30 @@ import javax.microedition.lcdui.Image;
|
|||||||
import javax.microedition.lcdui.game.Sprite;
|
import javax.microedition.lcdui.game.Sprite;
|
||||||
|
|
||||||
import sillysagiri.BMF;
|
import sillysagiri.BMF;
|
||||||
|
import sillysagiri.Sagiri;
|
||||||
import sillysagiri.Scene;
|
import sillysagiri.Scene;
|
||||||
import sillysagiri.Utils;
|
import sillysagiri.Utils;
|
||||||
|
|
||||||
public class MainMenu extends Scene {
|
public class MainMenu extends Scene {
|
||||||
|
private final int STATE_MENU_NEWGAME = 0;
|
||||||
|
private final int STATE_MENU_LOADGAME = 1;
|
||||||
|
private final int STATE_MENU_INSTRUCTION = 2;
|
||||||
|
private final int STATE_MENU_OPTIONS = 3;
|
||||||
|
private final int STATE_MENU_LEADERBOARD = 4;
|
||||||
|
private final int STATE_MENU_CREDITS = 5;
|
||||||
|
private final int STATE_MENU_EXITGAME = 6;
|
||||||
|
|
||||||
|
public final int STATE_BANDAINAMCO = 0;
|
||||||
|
public final int STATE_MAINMENU = 1;
|
||||||
|
|
||||||
private long counter = 0;
|
private long counter = 0;
|
||||||
private int state = 0;
|
private int state = 0;
|
||||||
|
private int state_menu = 0;
|
||||||
|
|
||||||
private BMF bmf_white;
|
private BMF bmf_white;
|
||||||
private BMF bmf_blue;
|
private BMF bmf_blue;
|
||||||
|
|
||||||
private Image img_bg;
|
private Image img_loop;
|
||||||
private Image img_box;
|
private Image img_box;
|
||||||
private Image img_bandai;
|
private Image img_bandai;
|
||||||
private Image img_head1;
|
private Image img_head1;
|
||||||
@ -31,17 +44,8 @@ public class MainMenu extends Scene {
|
|||||||
bmf_white = BMF.Create("/silly/bmf/onds12_0.silly.gz", "/silly/bmf/onds12.fnt", 0xffffffff);
|
bmf_white = BMF.Create("/silly/bmf/onds12_0.silly.gz", "/silly/bmf/onds12.fnt", 0xffffffff);
|
||||||
bmf_blue = BMF.Create("/silly/bmf/onds12_0.silly.gz", "/silly/bmf/onds12.fnt", 0xff00dbff);
|
bmf_blue = BMF.Create("/silly/bmf/onds12_0.silly.gz", "/silly/bmf/onds12.fnt", 0xff00dbff);
|
||||||
bmf_blue.lineHeight = (short)(bmf_blue.lineHeight*1.5);
|
bmf_blue.lineHeight = (short)(bmf_blue.lineHeight*1.5);
|
||||||
Image img_loop = Image.createImage("/m_2.png");
|
|
||||||
img_bandai = Image.createImage("/c_0.png");
|
img_bandai = Image.createImage("/c_0.png");
|
||||||
|
img_loop = Image.createImage("/m_2.png");
|
||||||
int loopCount = (int)Math.ceil((float)Utils.GetScreenHeight()/img_loop.getHeight());
|
|
||||||
|
|
||||||
img_bg = Image.createImage(img_loop.getWidth(), Utils.GetScreenHeight());
|
|
||||||
Utils.Clear_Image(img_bg, 255, 108, 0);
|
|
||||||
Graphics g_bg = img_bg.getGraphics();
|
|
||||||
|
|
||||||
for (int i = 0; i<loopCount; i++)
|
|
||||||
g_bg.drawImage(img_loop, 0, i*img_loop.getHeight(), Graphics.LEFT | Graphics.TOP);
|
|
||||||
|
|
||||||
int maxlength = 0;
|
int maxlength = 0;
|
||||||
list_strmenu = Utils.Get_StringSilly("/silly/txt/t_mainmenu.silly", 7);
|
list_strmenu = Utils.Get_StringSilly("/silly/txt/t_mainmenu.silly", 7);
|
||||||
@ -70,7 +74,6 @@ public class MainMenu extends Scene {
|
|||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
e.printStackTrace();
|
|
||||||
sagiri.Set_Scene(new DeathError(e));
|
sagiri.Set_Scene(new DeathError(e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -80,13 +83,15 @@ public class MainMenu extends Scene {
|
|||||||
|
|
||||||
public void Update(long dt, Graphics g) {
|
public void Update(long dt, Graphics g) {
|
||||||
counter += dt;
|
counter += dt;
|
||||||
|
Utils.Clear_Screen(g, 255, 108, 0);
|
||||||
|
|
||||||
|
int loopCount = (int)Math.ceil((float)Utils.GetScreenHeight()/img_loop.getHeight());
|
||||||
|
for (int i = 0; i<loopCount; i++)
|
||||||
|
g.drawImage(img_loop, 0, i*img_loop.getHeight(), Graphics.LEFT | Graphics.TOP);
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
Utils.Clear_Screen(g, 255, 108, 0);
|
|
||||||
g.drawImage(img_bg, 0, 0, Graphics.TOP | Graphics.LEFT);
|
|
||||||
|
|
||||||
g.drawImage(
|
g.drawImage(
|
||||||
img_bandai,
|
img_bandai,
|
||||||
Utils.GetScreenWidth()/2, Utils.GetScreenHeight()/2,
|
Utils.GetScreenWidth()/2, Utils.GetScreenHeight()/2,
|
||||||
@ -109,9 +114,6 @@ public class MainMenu extends Scene {
|
|||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
Utils.Clear_Screen(g, 255, 108, 0);
|
|
||||||
g.drawImage(img_bg, 0, 0, Graphics.TOP | Graphics.LEFT);
|
|
||||||
|
|
||||||
int padding = 3;
|
int padding = 3;
|
||||||
g.drawImage(img_head1, padding, padding, Graphics.LEFT | Graphics.TOP);
|
g.drawImage(img_head1, padding, padding, Graphics.LEFT | Graphics.TOP);
|
||||||
g.drawImage(img_head2, Utils.GetScreenWidth()-padding, padding, Graphics.RIGHT | Graphics.TOP);
|
g.drawImage(img_head2, Utils.GetScreenWidth()-padding, padding, Graphics.RIGHT | Graphics.TOP);
|
||||||
@ -122,20 +124,15 @@ public class MainMenu extends Scene {
|
|||||||
g.drawImage(img_box, Utils.GetScreenWidth()/2, cursor-(bmf_blue.lineHeight/2), Graphics.HCENTER | Graphics.TOP);
|
g.drawImage(img_box, Utils.GetScreenWidth()/2, cursor-(bmf_blue.lineHeight/2), Graphics.HCENTER | Graphics.TOP);
|
||||||
|
|
||||||
for(int i=0; i<list_strmenu.length; i++)
|
for(int i=0; i<list_strmenu.length; i++)
|
||||||
bmf_blue.DrawEx(g, list_strmenu[i], Utils.GetScreenWidth()/2, cursor+bmf_blue.lineHeight*i, Graphics.HCENTER | Graphics.TOP);
|
{
|
||||||
|
if (state_menu == i)
|
||||||
// bmf_blue.DrawEx(g, "NEW GAME", Utils.GetScreenWidth()/2, cursor, Graphics.HCENTER | Graphics.TOP);
|
bmf_white.DrawEx(g, list_strmenu[i], Utils.GetScreenWidth()/2, cursor+bmf_blue.lineHeight*i, Graphics.HCENTER | Graphics.TOP);
|
||||||
// bmf_blue.DrawEx(g, "LOAD GAME", Utils.GetScreenWidth()/2, cursor+=bmf_blue.lineHeight, Graphics.HCENTER | Graphics.TOP);
|
else
|
||||||
// bmf_blue.DrawEx(g, "INSTRUCTION", Utils.GetScreenWidth()/2, cursor+=bmf_blue.lineHeight, Graphics.HCENTER | Graphics.TOP);
|
bmf_blue.DrawEx(g, list_strmenu[i], Utils.GetScreenWidth()/2, cursor+bmf_blue.lineHeight*i, Graphics.HCENTER | Graphics.TOP);
|
||||||
// bmf_blue.DrawEx(g, "OPTIONS", Utils.GetScreenWidth()/2, cursor+=bmf_blue.lineHeight, Graphics.HCENTER | Graphics.TOP);
|
}
|
||||||
// bmf_blue.DrawEx(g, "LEADERBOARD", Utils.GetScreenWidth()/2, cursor+=bmf_blue.lineHeight, Graphics.HCENTER | Graphics.TOP);
|
|
||||||
// bmf_blue.DrawEx(g, "CREDITS", Utils.GetScreenWidth()/2, cursor+=bmf_blue.lineHeight, Graphics.HCENTER | Graphics.TOP);
|
|
||||||
// bmf_blue.DrawEx(g, "EXIT GAME", Utils.GetScreenWidth()/2, cursor+=bmf_blue.lineHeight, Graphics.HCENTER | Graphics.TOP);
|
|
||||||
|
|
||||||
// if (counter > 360) counter = 0;
|
|
||||||
|
|
||||||
padding = (int)(Math.sin((float)counter/200) * 3) + 3;
|
padding = (int)(Math.sin((float)counter/200) * 3) + 3;
|
||||||
cursor = (int)(Utils.GetScreenHeight()*0.35);
|
cursor = (int)(Utils.GetScreenHeight()*0.35) + state_menu*bmf_blue.lineHeight;
|
||||||
|
|
||||||
g.drawRegion(
|
g.drawRegion(
|
||||||
img_arrow,
|
img_arrow,
|
||||||
@ -152,6 +149,68 @@ public class MainMenu extends Scene {
|
|||||||
Sprite.TRANS_NONE,
|
Sprite.TRANS_NONE,
|
||||||
(Utils.GetScreenWidth()/2) - (img_box.getWidth()/2)-padding, cursor,
|
(Utils.GetScreenWidth()/2) - (img_box.getWidth()/2)-padding, cursor,
|
||||||
Graphics.RIGHT | Graphics.TOP);
|
Graphics.RIGHT | Graphics.TOP);
|
||||||
|
|
||||||
|
if (sagiri.input.IsKeyDown(new int[]{Sagiri.KEY_UP, Sagiri.KEY_LEFT, Sagiri.KEY_2, Sagiri.KEY_4}))
|
||||||
|
{
|
||||||
|
state_menu--;
|
||||||
|
if (state_menu < 0) state_menu = list_strmenu.length-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sagiri.input.IsKeyDown(new int[]{Sagiri.KEY_DOWN, Sagiri.KEY_RIGHT, Sagiri.KEY_8, Sagiri.KEY_6}))
|
||||||
|
{
|
||||||
|
state_menu++;
|
||||||
|
if (state_menu > list_strmenu.length-1) state_menu = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (sagiri.input.IsKeyDown(new int[]{Sagiri.KEY_CENTER, Sagiri.KEY_5}) || sagiri.input.IsKeyDown(Sagiri.KEY_LEFT_SOFT))
|
||||||
|
{
|
||||||
|
ProccedMenu();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ProccedMenu()
|
||||||
|
{
|
||||||
|
switch (state_menu) {
|
||||||
|
case STATE_MENU_NEWGAME:
|
||||||
|
{
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case STATE_MENU_LOADGAME:
|
||||||
|
{
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case STATE_MENU_INSTRUCTION:
|
||||||
|
{
|
||||||
|
sagiri.Set_Scene(new Instruction());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case STATE_MENU_OPTIONS:
|
||||||
|
{
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case STATE_MENU_LEADERBOARD:
|
||||||
|
{
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case STATE_MENU_CREDITS:
|
||||||
|
{
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case STATE_MENU_EXITGAME:
|
||||||
|
{
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user