J :
* Add missing files.
This commit is contained in:
26
projects/mtg/src/GuiBackground.cpp
Normal file
26
projects/mtg/src/GuiBackground.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "../include/config.h"
|
||||
#include "../include/GameApp.h"
|
||||
#include "../include/GuiBackground.h"
|
||||
|
||||
GuiBackground::GuiBackground()
|
||||
{
|
||||
JTexture* texture = GameApp::CommonRes->GetTexture("graphics/back.jpg");
|
||||
if (texture)
|
||||
quad = NEW JQuad(texture, 0, 0, 480, 255);
|
||||
else
|
||||
{
|
||||
quad = NULL;
|
||||
GameApp::systemError = "Error loading background texture : " __FILE__;
|
||||
}
|
||||
}
|
||||
|
||||
GuiBackground::~GuiBackground()
|
||||
{
|
||||
delete(quad);
|
||||
}
|
||||
|
||||
void GuiBackground::Render()
|
||||
{
|
||||
JRenderer* renderer = JRenderer::GetInstance();
|
||||
renderer->RenderQuad(quad, 0, 18);
|
||||
}
|
||||
Reference in New Issue
Block a user