***Note***

please copy "DeckEditorMenuBackdrop.png" into your PSP folder.  Otherwise you will have a crash when you start up!

ChangesLog:
minor refactoring of DeckMenu
added a new DeckEditorMenu which is derived from DeckMenu.  This customizes the deck editor menus with the exception of the confirmation screens (yes/no)
Still more work to be done to round out some font issues.  
TODO:
put more information text in bottom row of menu.
reorganize statistical data to allow more info to be shown.
This commit is contained in:
techdragon.nguyen@gmail.com
2010-11-03 16:49:39 +00:00
parent b7a2196878
commit dd163c8807
10 changed files with 140 additions and 74 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
OBJS = objs/ActionElement.o objs/ActionLayer.o objs/ActionStack.o objs/AIMomirPlayer.o objs/AIPlayer.o objs/AIStats.o objs/CardGui.o objs/CardDescriptor.o objs/CardDisplay.o objs/CardEffect.o objs/CardPrimitive.o objs/CardSelector.o objs/CardSelectorSingleton.o objs/Counters.o objs/Credits.o objs/Damage.o objs/DamagerDamaged.o objs/DeckDataWrapper.o objs/DeckMenu.o objs/DeckMenuItem.o objs/DeckMetaData.o objs/DeckStats.o objs/DuelLayers.o objs/Effects.o objs/ExtraCost.o objs/GameApp.o objs/GameLauncher.o objs/GameObserver.o objs/GameOptions.o objs/GameState.o objs/GameStateAwards.o objs/GameStateDeckViewer.o objs/GameStateDuel.o objs/DeckManager.o objs/GameStateMenu.o objs/GameStateOptions.o objs/GameStateShop.o objs/GameStateStory.o objs/GameStateTransitions.o objs/GuiAvatars.o objs/GuiBackground.o objs/GuiCardsController.o objs/GuiCombat.o objs/GuiFrame.o objs/GuiHand.o objs/GuiLayers.o objs/GuiMana.o objs/GuiPhaseBar.o objs/GuiPlay.o objs/GuiStatic.o objs/Logger.o objs/ManaCost.o objs/ManaCostHybrid.o objs/MenuItem.o objs/MTGAbility.o objs/MTGCardInstance.o objs/MTGCard.o objs/MTGDeck.o objs/MTGDefinitions.o objs/MTGGamePhase.o objs/MTGGameZones.o objs/MTGPack.o objs/MTGRules.o objs/Navigator.o objs/OptionItem.o objs/PhaseRing.o objs/Player.o objs/PlayerData.o objs/PlayGuiObjectController.o objs/PlayGuiObject.o objs/Pos.o objs/PrecompiledHeader.o objs/PriceList.o objs/ReplacementEffects.o objs/Rules.o objs/SimpleMenu.o objs/SimpleMenuItem.o objs/SimplePad.o objs/StoryFlow.o objs/StyleManager.o objs/Subtypes.o objs/TargetChooser.o objs/TargetsList.o objs/TextScroller.o objs/ThisDescriptor.o objs/Token.o objs/Translate.o objs/TranslateKeys.o objs/Trash.o objs/utils.o objs/WEvent.o objs/WResourceManager.o objs/WCachedResource.o objs/WDataSrc.o objs/WGui.o objs/WFilter.o objs/Tasks.o objs/WFont.o objs/AllAbilities.o OBJS = objs/ActionElement.o objs/ActionLayer.o objs/ActionStack.o objs/AIMomirPlayer.o objs/AIPlayer.o objs/AIStats.o objs/AllAbilities.o objs/CardGui.o objs/CardDescriptor.o objs/CardDisplay.o objs/CardEffect.o objs/CardPrimitive.o objs/CardSelector.o objs/CardSelectorSingleton.o objs/Counters.o objs/Credits.o objs/Damage.o objs/DamagerDamaged.o objs/DeckDataWrapper.o objs/DeckEditorMenu.o objs/DeckMenu.o objs/DeckMenuItem.o objs/DeckMetaData.o objs/DeckStats.o objs/DuelLayers.o objs/Effects.o objs/ExtraCost.o objs/GameApp.o objs/GameLauncher.o objs/GameObserver.o objs/GameOptions.o objs/GameState.o objs/GameStateAwards.o objs/GameStateDeckViewer.o objs/GameStateDuel.o objs/DeckManager.o objs/GameStateMenu.o objs/GameStateOptions.o objs/GameStateShop.o objs/GameStateStory.o objs/GameStateTransitions.o objs/GuiAvatars.o objs/GuiBackground.o objs/GuiCardsController.o objs/GuiCombat.o objs/GuiFrame.o objs/GuiHand.o objs/GuiLayers.o objs/GuiMana.o objs/GuiPhaseBar.o objs/GuiPlay.o objs/GuiStatic.o objs/Logger.o objs/ManaCost.o objs/ManaCostHybrid.o objs/MenuItem.o objs/MTGAbility.o objs/MTGCardInstance.o objs/MTGCard.o objs/MTGDeck.o objs/MTGDefinitions.o objs/MTGGamePhase.o objs/MTGGameZones.o objs/MTGPack.o objs/MTGRules.o objs/Navigator.o objs/OptionItem.o objs/PhaseRing.o objs/Player.o objs/PlayerData.o objs/PlayGuiObjectController.o objs/PlayGuiObject.o objs/Pos.o objs/PrecompiledHeader.o objs/PriceList.o objs/ReplacementEffects.o objs/Rules.o objs/SimpleMenu.o objs/SimpleMenuItem.o objs/SimplePad.o objs/StoryFlow.o objs/StyleManager.o objs/Subtypes.o objs/TargetChooser.o objs/TargetsList.o objs/TextScroller.o objs/ThisDescriptor.o objs/Token.o objs/Translate.o objs/TranslateKeys.o objs/Trash.o objs/utils.o objs/WEvent.o objs/WResourceManager.o objs/WCachedResource.o objs/WDataSrc.o objs/WGui.o objs/WFilter.o objs/Tasks.o objs/WFont.o
DEPS = $(patsubst objs/%.o, deps/%.d, $(OBJS)) DEPS = $(patsubst objs/%.o, deps/%.d, $(OBJS))
RESULT = $(shell psp-config --psp-prefix 2> Makefile.cache) RESULT = $(shell psp-config --psp-prefix 2> Makefile.cache)
Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

+11
View File
@@ -0,0 +1,11 @@
#pragma once
#include "DeckMenu.h"
class DeckEditorMenu :
public DeckMenu
{
public:
DeckEditorMenu(int id, JGuiListener* listener = NULL, int fontId = 1, const char * _title = "");
void Render();
~DeckEditorMenu();
};
+7 -3
View File
@@ -18,6 +18,7 @@ class DeckMenu:public JGuiController{
int descX, descY, descHeight, descWidth; int descX, descY, descHeight, descWidth;
int statsX, statsY, statsHeight, statsWidth; int statsX, statsY, statsHeight, statsWidth;
int avatarX, avatarY; int avatarX, avatarY;
string backgroundName;
int fontId; int fontId;
std::string title; std::string title;
@@ -25,17 +26,20 @@ class DeckMenu:public JGuiController{
int maxItems, startId; int maxItems, startId;
float selectionT, selectionY; float selectionT, selectionY;
float timeOpen; float timeOpen;
static unsigned int refCount;
static WFont* titleFont; WFont* titleFont;
static hgeParticleSystem* stars; static hgeParticleSystem* stars;
// This works only because of no multithreading // This works only because of no multithreading
static PIXEL_TYPE jewelGraphics[9]; static PIXEL_TYPE jewelGraphics[9];
void initMenuItems();
string getDescription();
string getMetaInformation();
public: public:
TextScroller * scroller; TextScroller * scroller;
bool autoTranslate; bool autoTranslate;
JQuad * getBackground();
DeckMenu(int id, JGuiListener* listener, int fontId, const string _title = ""); DeckMenu(int id, JGuiListener* listener, int fontId, const string _title = "");
~DeckMenu(); ~DeckMenu();
+3 -3
View File
@@ -7,8 +7,8 @@
#include <JGE.h> #include <JGE.h>
#include "GameState.h" #include "GameState.h"
#include "DeckEditorMenu.h"
#include "SimpleMenu.h" #include "SimpleMenu.h"
#include "DeckMenu.h"
#include "WResourceManager.h" #include "WResourceManager.h"
#include "CardGui.h" #include "CardGui.h"
#include "GameOptions.h" #include "GameOptions.h"
@@ -146,9 +146,9 @@ private:
WGuiFilters * filterMenu; WGuiFilters * filterMenu;
WSrcDeckViewer * source; WSrcDeckViewer * source;
SimpleMenu * welcome_menu; DeckEditorMenu * welcome_menu;
SimpleMenu * subMenu; SimpleMenu * subMenu;
SimpleMenu * menu; DeckEditorMenu * menu;
PriceList* pricelist; PriceList* pricelist;
PlayerData * playerdata; PlayerData * playerdata;
int price; int price;
+46
View File
@@ -0,0 +1,46 @@
#include "PrecompiledHeader.h"
#include "DeckEditorMenu.h"
#include "JTypes.h"
DeckEditorMenu::DeckEditorMenu(int id, JGuiListener* listener, int fontId, const char * _title)
: DeckMenu( id, listener, fontId, _title )
{
backgroundName = "DeckEditorMenuBackdrop";
mX = 120;
mY = 70;
titleX = 110; // center point in title box
titleY = 34;
titleWidth = 180; // width of inner box of title
descX = 275;
descY = 80;
descHeight = 154;
descWidth = 175;
statsX = 282;
statsY = 12;
statsHeight = 40;
statsWidth = 180;
avatarX = 222;
avatarY = 8;
int scrollerWidth = 80;
SAFE_DELETE(scroller); // need to delete the scroller init in the base class
scroller = NEW TextScroller(Fonts::MAIN_FONT, 40 , 230, scrollerWidth, 100, 1, 1);
}
void DeckEditorMenu::Render()
{
JRenderer *r = JRenderer::GetInstance();
r->FillRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT,ARGB(200,0,0,0));
DeckMenu::Render();
}
DeckEditorMenu::~DeckEditorMenu()
{
SAFE_DELETE( scroller );
}
+32 -30
View File
@@ -18,9 +18,7 @@ namespace
const signed int kDescriptionHorizontalBoxPadding = 5; const signed int kDescriptionHorizontalBoxPadding = 5;
} }
WFont* DeckMenu::titleFont = NULL;
hgeParticleSystem* DeckMenu::stars = NULL; hgeParticleSystem* DeckMenu::stars = NULL;
unsigned int DeckMenu::refCount = 0;
// Here comes the magic of jewel graphics // Here comes the magic of jewel graphics
PIXEL_TYPE DeckMenu::jewelGraphics[9] = {0x3FFFFFFF,0x63645AEA,0x610D0D98, PIXEL_TYPE DeckMenu::jewelGraphics[9] = {0x3FFFFFFF,0x63645AEA,0x610D0D98,
0x63645AEA,0xFF635AD5,0xFF110F67, 0x63645AEA,0xFF635AD5,0xFF110F67,
@@ -39,8 +37,9 @@ DeckMenu::DeckMenu(int id, JGuiListener* listener, int fontId, const string _tit
: JGuiController(id, listener), : JGuiController(id, listener),
fontId(fontId) { fontId(fontId) {
backgroundName = "DeckMenuBackdrop";
mX = 120; mX = 125;
mY = 55; mY = 55;
titleX = 125; // center point in title box titleX = 125; // center point in title box
@@ -74,11 +73,11 @@ fontId(fontId) {
// we want to cap the deck titles to 15 characters to avoid overflowing deck names // we want to cap the deck titles to 15 characters to avoid overflowing deck names
title = _(_title); title = _(_title);
titleFont = resources.GetWFont(Fonts::MAGIC_FONT);
startId = 0; startId = 0;
selectionT = 0; selectionT = 0;
timeOpen = 0; timeOpen = 0;
closed = false; closed = false;
++refCount;
selectionTargetY = selectionY = kVerticalMargin; selectionTargetY = selectionY = kVerticalMargin;
@@ -90,48 +89,51 @@ fontId(fontId) {
} }
// TODO: Make this configurable, perhaps by user as part of the theme options. // TODO: Make this configurable, perhaps by user as part of the theme options.
JQuad* getBackground() JQuad* DeckMenu::getBackground()
{ {
resources.RetrieveTexture("DeckMenuBackdrop.png", RETRIEVE_MANAGE ); ostringstream bgFilename;
return resources.RetrieveQuad("DeckMenuBackdrop.png", 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, "DualPaneBG" ); bgFilename << backgroundName << ".png";
resources.RetrieveTexture( bgFilename.str(), RETRIEVE_MANAGE );
return resources.RetrieveQuad(bgFilename.str(), 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, backgroundName );
} }
void DeckMenu::initMenuItems()
void DeckMenu::Render()
{ {
JRenderer * renderer = JRenderer::GetInstance();
WFont * titleFont = resources.GetWFont(Fonts::MAGIC_FONT);
WFont * mFont = resources.GetWFont(fontId);
// figure out where to place the stars initially
if (0 == mWidth) {
float sY = mY + kVerticalMargin; float sY = mY + kVerticalMargin;
for (int i = startId; i < startId + mCount; ++i) { for (int i = startId; i < startId + mCount; ++i) {
DeckMenuItem *menuItem = static_cast<DeckMenuItem *> (mObjects[i]); DeckMenuItem *menuItem = static_cast<DeckMenuItem *> (mObjects[i]);
int width = menuItem->GetWidth(); int width = menuItem->GetWidth();
if (mWidth < width) mWidth = width; if (mWidth < width) mWidth = width;
} }
if ((!title.empty()) && (mWidth < titleFont->GetStringWidth(title.c_str()))) titleWidth = titleFont->GetStringWidth(title.c_str());
mWidth = titleFont->GetStringWidth(title.c_str()); if ((!title.empty()) && (mWidth < titleWidth))
mWidth = titleWidth;
mWidth += 2*kHorizontalMargin; mWidth += 2*kHorizontalMargin;
for (int i = startId; i < startId + mCount; ++i) { for (int i = startId; i < startId + mCount; ++i) {
float y = mY + kVerticalMargin + i * kLineHeight; float y = mY + kVerticalMargin + i * kLineHeight;
DeckMenuItem * currentMenuItem = static_cast<DeckMenuItem*>(mObjects[i]); DeckMenuItem * currentMenuItem = static_cast<DeckMenuItem*>(mObjects[i]);
currentMenuItem->Relocate( mX, y); currentMenuItem->Relocate( mX, y);
if (currentMenuItem->hasFocus())
if (currentMenuItem->hasFocus()) sY = y; sY = y;
} }
stars->Fire();
selectionTargetY = selectionY = sY; selectionTargetY = selectionY = sY;
}
void DeckMenu::Render()
{
JRenderer * renderer = JRenderer::GetInstance();
WFont * mFont = resources.GetWFont(fontId);
float height = mHeight;
// figure out where to place the stars initially
if (0 == mWidth) {
initMenuItems();
stars->Fire();
timeOpen = 0; timeOpen = 0;
} }
renderer->RenderQuad(getBackground(), 0, 0 );
float height = mHeight;
if (timeOpen < 1) height *= timeOpen > 0 ? timeOpen : -timeOpen; if (timeOpen < 1) height *= timeOpen > 0 ? timeOpen : -timeOpen;
renderer->SetTexBlend(BLEND_SRC_ALPHA, BLEND_ONE); renderer->SetTexBlend(BLEND_SRC_ALPHA, BLEND_ONE);
@@ -149,10 +151,9 @@ void DeckMenu::Render()
if ( currentMenuItem->imageFilename.size() > 0 ) if ( currentMenuItem->imageFilename.size() > 0 )
{ {
JQuad * quad = resources.RetrieveTempQuad( currentMenuItem->imageFilename, TEXTURE_SUB_AVATAR ); JQuad * quad = resources.RetrieveTempQuad( currentMenuItem->imageFilename, TEXTURE_SUB_AVATAR );
if (quad) { if (quad)
renderer->RenderQuad(quad, avatarX, avatarY); renderer->RenderQuad(quad, avatarX, avatarY);
} }
}
// fill in the description part of the screen // fill in the description part of the screen
string text = currentMenuItem->desc; string text = currentMenuItem->desc;
WFont *mainFont = resources.GetWFont(Fonts::MAIN_FONT); WFont *mainFont = resources.GetWFont(Fonts::MAIN_FONT);
@@ -174,13 +175,13 @@ void DeckMenu::Render()
} }
currentMenuItem->RenderWithOffset(-kLineHeight*startId); currentMenuItem->RenderWithOffset(-kLineHeight*startId);
} }
renderer->RenderQuad(getBackground(), 0, 0 );
if (!title.empty()) if (!title.empty())
titleFont->DrawString(title.c_str(), titleX, titleY, JGETEXT_CENTER); titleFont->DrawString(title.c_str(), titleX, titleY, JGETEXT_CENTER);
scroller->Render(); scroller->Render();
renderer->RenderQuad(getBackground(), 0, 0 );
} }
} }
@@ -248,4 +249,5 @@ void DeckMenu::destroy(){
DeckMenu::~DeckMenu() DeckMenu::~DeckMenu()
{ {
SAFE_DELETE(scroller); SAFE_DELETE(scroller);
} }
+1 -3
View File
@@ -243,6 +243,7 @@ void GameApp::Destroy()
WCFilterFactory::Destroy(); WCFilterFactory::Destroy();
SimpleMenu::destroy(); SimpleMenu::destroy();
DeckMenu::destroy(); DeckMenu::destroy();
DeckEditorMenu::destroy();
options.theGame = NULL; options.theGame = NULL;
LOG("==Destroying GameApp Successful=="); LOG("==Destroying GameApp Successful==");
@@ -314,9 +315,6 @@ void GameApp::Update()
mCurrentState->Start(); mCurrentState->Start();
mNextState = NULL; mNextState = NULL;
} }
} }
+16 -19
View File
@@ -16,7 +16,8 @@
#include "MTGCardInstance.h" #include "MTGCardInstance.h"
#include "WFilter.h" #include "WFilter.h"
#include "WDataSrc.h" #include "WDataSrc.h"
#include "DeckEditorMenu.h"
#include "SimpleMenu.h"
//!! helper function; this is probably handled somewhere in the code already. //!! helper function; this is probably handled somewhere in the code already.
@@ -135,7 +136,7 @@ void GameStateDeckViewer::switchDisplay(){
void GameStateDeckViewer::updateDecks(){ void GameStateDeckViewer::updateDecks(){
SAFE_DELETE(welcome_menu); SAFE_DELETE(welcome_menu);
welcome_menu = NEW SimpleMenu( MENU_DECK_SELECTION, this, Fonts::MENU_FONT, 20, 20); welcome_menu = NEW DeckEditorMenu( MENU_DECK_SELECTION, this, Fonts::MAGIC_FONT, "Choose Deck To Edit");
DeckManager * deckManager = DeckManager::GetInstance(); DeckManager * deckManager = DeckManager::GetInstance();
vector<DeckMetaData *> playerDeckList = fillDeckMenu( welcome_menu,options.profileFile()); vector<DeckMetaData *> playerDeckList = fillDeckMenu( welcome_menu,options.profileFile());
@@ -160,7 +161,6 @@ void GameStateDeckViewer::buildEditorMenu()
if ( myDeck ) { if ( myDeck ) {
aiDeckMsg aiDeckMsg
<< "**** All changes are final ****" << endl << endl
<< "------- Deck Summary -----" << endl << "------- Deck Summary -----" << endl
<< "# Cards: "<< myDeck->getCount() << endl << "# Cards: "<< myDeck->getCount() << endl
<< "# Lands: "<< myDeck->getCount(Constants::MTG_COLOR_LAND ) << endl << "# Lands: "<< myDeck->getCount(Constants::MTG_COLOR_LAND ) << endl
@@ -185,16 +185,16 @@ void GameStateDeckViewer::buildEditorMenu()
if ( menu ) if ( menu )
SAFE_DELETE( menu ); SAFE_DELETE( menu );
//Build menu. //Build menu.
JRenderer::GetInstance()->FillRoundRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 100, ARGB(0, 0, 0, 0) );
menu = NEW SimpleMenu( MENU_DECK_BUILDER, this, Fonts::MENU_FONT, 20, 40, "Deck Editor"); menu = NEW DeckEditorMenu( MENU_DECK_BUILDER, this, Fonts::MAGIC_FONT, "Deck Editor");
menu->Add( MENU_ITEM_FILTER_BY, "Filter By...", "Narrow down the list of cards. "); menu->Add( MENU_ITEM_FILTER_BY, "Filter By...", "Narrow down the list of cards. ");
menu->Add( MENU_ITEM_SWITCH_DECKS_NO_SAVE, "Switch Decks", "Do not make any changes\nView another deck."); menu->Add( MENU_ITEM_SWITCH_DECKS_NO_SAVE, "Switch Decks", "Do not make any changes.\nView another deck.");
menu->Add( MENU_ITEM_SAVE_RENAME, "Rename Deck", "Change the name of the deck"); menu->Add( MENU_ITEM_SAVE_RENAME, "Rename Deck", "Change the name of the deck");
menu->Add( MENU_ITEM_SAVE_RETURN_MAIN_MENU, "Save & Quit Editor", "Save the changes and return to the main menu"); menu->Add( MENU_ITEM_SAVE_RETURN_MAIN_MENU, "Save & Quit Editor", "Save changes.\nReturn to the main menu");
menu->Add( MENU_ITEM_SAVE_AS_AI_DECK, "Save As AI Deck", aiDeckMsg.str() ); menu->Add( MENU_ITEM_SAVE_AS_AI_DECK, "Save As AI Deck", aiDeckMsg.str() );
menu->Add( MENU_ITEM_MAIN_MENU, "Main Menu", "Go back to the main menu.\nDo not make any changes to deck"); menu->Add( MENU_ITEM_MAIN_MENU, "Quit Editor", "Do not make any changes to deck.\nReturn to the main menu.");
menu->Add( MENU_ITEM_EDITOR_CANCEL, "Cancel"); menu->Add( MENU_ITEM_EDITOR_CANCEL, "Cancel", "Close menu.");
} }
@@ -220,8 +220,6 @@ void GameStateDeckViewer::Start()
myCollection->Sort(WSrcCards::SORT_ALPHA); myCollection->Sort(WSrcCards::SORT_ALPHA);
displayed_deck = myCollection; displayed_deck = myCollection;
buildEditorMenu();
//Icons //Icons
mIcons[Constants::MTG_COLOR_ARTIFACT] = resources.GetQuad("c_artifact"); mIcons[Constants::MTG_COLOR_ARTIFACT] = resources.GetQuad("c_artifact");
mIcons[Constants::MTG_COLOR_LAND] = resources.GetQuad("c_land"); mIcons[Constants::MTG_COLOR_LAND] = resources.GetQuad("c_land");
@@ -534,12 +532,11 @@ void GameStateDeckViewer::Update(float dt)
} }
} }
} }
} }
void GameStateDeckViewer::renderOnScreenBasicInfo(){ void GameStateDeckViewer::renderOnScreenBasicInfo(){
JRenderer *renderer = JRenderer::GetInstance();
WFont * mFont = resources.GetWFont(Fonts::MAIN_FONT); WFont * mFont = resources.GetWFont(Fonts::MAIN_FONT);
char buffer[256]; char buffer[256];
int myD = (displayed_deck == myDeck); int myD = (displayed_deck == myDeck);
@@ -555,10 +552,11 @@ void GameStateDeckViewer::renderOnScreenBasicInfo(){
else else
sprintf(buffer, "%s%i cards (%i unique)", (displayed_deck == myDeck) ? "DECK: " : " " , allCopies, displayed_deck->getCount(WSrcDeck::UNFILTERED_UNIQUE)); sprintf(buffer, "%s%i cards (%i unique)", (displayed_deck == myDeck) ? "DECK: " : " " , allCopies, displayed_deck->getCount(WSrcDeck::UNFILTERED_UNIQUE));
float w = mFont->GetStringWidth(buffer); float w = mFont->GetStringWidth(buffer);
JRenderer::GetInstance()->FillRoundRect(SCREEN_WIDTH-(w+27),y-5,w+10,15,5,ARGB(128,0,0,0)); renderer->FillRoundRect(SCREEN_WIDTH-(w+27),y+5,w+10,15,5,ARGB(128,0,0,0));
mFont->DrawString(buffer, SCREEN_WIDTH-22, y+5,JGETEXT_RIGHT);
mFont->DrawString(buffer, SCREEN_WIDTH-22, y+15, JGETEXT_RIGHT);
if (useFilter != 0) if (useFilter != 0)
JRenderer::GetInstance()->RenderQuad(mIcons[useFilter-1], SCREEN_WIDTH-10 , y + 10 , 0.0f,0.5,0.5); renderer->RenderQuad(mIcons[useFilter-1], SCREEN_WIDTH-10 , y + 15, 0.0f,0.5,0.5);
} }
//returns position of the current card (cusor) in the currently viewed color/filter //returns position of the current card (cusor) in the currently viewed color/filter
@@ -600,7 +598,7 @@ void GameStateDeckViewer::renderSlideBar(){
} }
sprintf(buffer,"%s - %i/%i", deckname.c_str(),currentPos, total); sprintf(buffer,"%s - %i/%i", deckname.c_str(),currentPos, total);
mFont->SetColor(ARGB(hudAlpha,255,255,255)); mFont->SetColor(ARGB(hudAlpha,255,255,255));
mFont->DrawString(buffer,SCREEN_WIDTH/2, y+5,JGETEXT_CENTER); mFont->DrawString(buffer, SCREEN_WIDTH/2, y, JGETEXT_CENTER);
mFont->SetColor(ARGB(255,255,255,255)); mFont->SetColor(ARGB(255,255,255,255));
@@ -1388,7 +1386,7 @@ void GameStateDeckViewer::Render() {
JRenderer * r = JRenderer::GetInstance(); JRenderer * r = JRenderer::GetInstance();
r->ClearScreen(ARGB(0,0,0,0)); r->ClearScreen(ARGB(0,0,0,0));
if(displayed_deck == myDeck) if(displayed_deck == myDeck && mStage != STAGE_MENU)
renderDeckBackground(); renderDeckBackground();
int order[3] = {1,2,3}; int order[3] = {1,2,3};
if (mRotation < 0.5 && mRotation > -0.5){ if (mRotation < 0.5 && mRotation > -0.5){
@@ -1416,7 +1414,6 @@ void GameStateDeckViewer::Render() {
if (mStage == STAGE_ONSCREEN_MENU){ if (mStage == STAGE_ONSCREEN_MENU){
renderOnScreenMenu(); renderOnScreenMenu();
}else if (mStage == STAGE_WELCOME){ }else if (mStage == STAGE_WELCOME){
r->FillRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT,ARGB(200,0,0,0));
welcome_menu->Render(); welcome_menu->Render();
}else{ }else{
renderOnScreenBasicInfo(); renderOnScreenBasicInfo();
+8
View File
@@ -493,6 +493,10 @@
RelativePath=".\src\DeckDataWrapper.cpp" RelativePath=".\src\DeckDataWrapper.cpp"
> >
</File> </File>
<File
RelativePath=".\src\DeckEditorMenu.cpp"
>
</File>
<File <File
RelativePath=".\src\DeckManager.cpp" RelativePath=".\src\DeckManager.cpp"
> >
@@ -1026,6 +1030,10 @@
RelativePath=".\include\DeckDataWrapper.h" RelativePath=".\include\DeckDataWrapper.h"
> >
</File> </File>
<File
RelativePath=".\include\DeckEditorMenu.h"
>
</File>
<File <File
RelativePath=".\include\DeckManager.h" RelativePath=".\include\DeckManager.h"
> >