fixed warnings with new zengine float types
This commit is contained in:
parent
1a4f57e603
commit
e01980fb2d
@ -13,7 +13,7 @@
|
|||||||
\brief Implementation of GButton.
|
\brief Implementation of GButton.
|
||||||
|
|
||||||
Implementation of GButton, a simple button class.
|
Implementation of GButton, a simple button class.
|
||||||
<br>$Id: GewiButton.cpp,v 1.3 2003/06/07 05:42:32 cozman Exp $<br>
|
<br>$Id: GewiButton.cpp,v 1.4 2003/08/10 01:40:56 cozman Exp $<br>
|
||||||
\author James Turk
|
\author James Turk
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -50,15 +50,15 @@ void GButton::Message(SDL_Event *rawEvent, GewiEvent event, Uint16 mouseX, Uint1
|
|||||||
void GButton::Show()
|
void GButton::Show()
|
||||||
{
|
{
|
||||||
float x,y;
|
float x,y;
|
||||||
unsigned int w,h;
|
float w,h;
|
||||||
x = rBoundRect.X();
|
x = rBoundRect.X();
|
||||||
y = rBoundRect.Y();
|
y = rBoundRect.Y();
|
||||||
|
|
||||||
//images must be "resized" with each draw, disadvantage to shared resources
|
//images must be "resized" with each draw, disadvantage to shared resources
|
||||||
//yet luckily the ZImage resize system is only two assignments, not actual stretching code
|
//yet luckily the ZImage resize system is only two assignments, not actual stretching code
|
||||||
//if resize is to be rewritten the shared resources system of Gewi should be reconsidered
|
//if resize is to be rewritten the shared resources system of Gewi should be reconsidered
|
||||||
w = static_cast<unsigned int>(rBoundRect.Width());
|
w = rBoundRect.Width();
|
||||||
h = static_cast<unsigned int>(rBoundRect.Height());
|
h = rBoundRect.Height();
|
||||||
rGewi->Image(rPressedImage)->Resize(w,h);
|
rGewi->Image(rPressedImage)->Resize(w,h);
|
||||||
rGewi->Image(rNormalImage)->Resize(w,h);
|
rGewi->Image(rNormalImage)->Resize(w,h);
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
\brief Implementation of GStaticText.
|
\brief Implementation of GStaticText.
|
||||||
|
|
||||||
Implementation of GStaticText, file to hold static text, labels and such.
|
Implementation of GStaticText, file to hold static text, labels and such.
|
||||||
<br>$Id: GewiStaticText.cpp,v 1.6 2003/06/12 09:32:33 cozman Exp $<br>
|
<br>$Id: GewiStaticText.cpp,v 1.7 2003/08/10 01:40:56 cozman Exp $<br>
|
||||||
\author James Turk
|
\author James Turk
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ void GStaticText::Show()
|
|||||||
//images must call Resize with each draw (see shared resources rant)
|
//images must call Resize with each draw (see shared resources rant)
|
||||||
if(rBackgroundImage != GewiEngine::InvalidID)
|
if(rBackgroundImage != GewiEngine::InvalidID)
|
||||||
{
|
{
|
||||||
rGewi->Image(rBackgroundImage)->Resize(static_cast<unsigned int>(rBoundRect.Width()),static_cast<unsigned int>(rBoundRect.Height()));
|
rGewi->Image(rBackgroundImage)->Resize(rBoundRect.Width(),rBoundRect.Height());
|
||||||
rGewi->Image(rBackgroundImage)->Draw(rBoundRect.X(),rBoundRect.Y());
|
rGewi->Image(rBackgroundImage)->Draw(rBoundRect.X(),rBoundRect.Y());
|
||||||
}
|
}
|
||||||
rTextBuf.Draw(rBoundRect.X()+rXOff,rBoundRect.Y()+rYOff); //draw text shifted by offset
|
rTextBuf.Draw(rBoundRect.X()+rXOff,rBoundRect.Y()+rYOff); //draw text shifted by offset
|
||||||
@ -62,7 +62,7 @@ void GStaticText::Show()
|
|||||||
|
|
||||||
void GStaticText::SetText(std::string text)
|
void GStaticText::SetText(std::string text)
|
||||||
{
|
{
|
||||||
int w,h;
|
float w,h;
|
||||||
|
|
||||||
rText = text;
|
rText = text;
|
||||||
rGewi->Font(rFont)->DrawText(rText,rTextBuf);
|
rGewi->Font(rFont)->DrawText(rText,rTextBuf);
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
\brief Implementation of GTextField.
|
\brief Implementation of GTextField.
|
||||||
|
|
||||||
Implementation of GTextField, text input area widget.
|
Implementation of GTextField, text input area widget.
|
||||||
<br>$Id: GewiTextField.cpp,v 1.6 2003/06/12 09:32:33 cozman Exp $<br>
|
<br>$Id: GewiTextField.cpp,v 1.7 2003/08/10 01:40:56 cozman Exp $<br>
|
||||||
\author James Turk
|
\author James Turk
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ void GTextField::Message(SDL_Event *rawEvent, GewiEvent event, Uint16 mouseX, Ui
|
|||||||
|
|
||||||
void GTextField::Show()
|
void GTextField::Show()
|
||||||
{
|
{
|
||||||
rGewi->Image(rBackground)->Resize(static_cast<unsigned int>(rBoundRect.Width()),static_cast<unsigned int>(rBoundRect.Height()));
|
rGewi->Image(rBackground)->Resize(rBoundRect.Width(),rBoundRect.Height());
|
||||||
rGewi->Image(rBackground)->Draw(rBoundRect.X(),rBoundRect.Y());
|
rGewi->Image(rBackground)->Draw(rBoundRect.X(),rBoundRect.Y());
|
||||||
if(rBuffer.IsLoaded()) //don't draw empty buffer image
|
if(rBuffer.IsLoaded()) //don't draw empty buffer image
|
||||||
rBuffer.Draw(rLeftPadding+rBoundRect.X(),rBoundRect.Y()+(rBoundRect.Height()-rBuffer.Height())/2);
|
rBuffer.Draw(rLeftPadding+rBoundRect.X(),rBoundRect.Y()+(rBoundRect.Height()-rBuffer.Height())/2);
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
\brief Implementation of GWindow.
|
\brief Implementation of GWindow.
|
||||||
|
|
||||||
Implementation of GWindow, a basic window class based on GContainer.
|
Implementation of GWindow, a basic window class based on GContainer.
|
||||||
<br>$Id: GewiWindow.cpp,v 1.4 2003/06/07 05:42:33 cozman Exp $<br>
|
<br>$Id: GewiWindow.cpp,v 1.5 2003/08/10 01:40:56 cozman Exp $<br>
|
||||||
\author James Turk
|
\author James Turk
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ void GWindow::Show()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//resize (shared resources) and draw
|
//resize (shared resources) and draw
|
||||||
rGewi->Image(rBackground)->Resize(static_cast<unsigned int>(rBoundRect.Width()),static_cast<unsigned int>(rBoundRect.Height()));
|
rGewi->Image(rBackground)->Resize(rBoundRect.Width(),rBoundRect.Height());
|
||||||
rGewi->Image(rBackground)->Draw(rBoundRect.X(),rBoundRect.Y());
|
rGewi->Image(rBackground)->Draw(rBoundRect.X(),rBoundRect.Y());
|
||||||
|
|
||||||
GContainer::Show(); //important that a window draws it's children
|
GContainer::Show(); //important that a window draws it's children
|
||||||
|
@ -52,7 +52,7 @@ void Test1()
|
|||||||
GStaticText label;
|
GStaticText label;
|
||||||
|
|
||||||
bg.Open("data/rainbow.bmp");
|
bg.Open("data/rainbow.bmp");
|
||||||
bg.Resize(ze->DisplayWidth(),ze->DisplayHeight());
|
bg.Resize(static_cast<float>(ze->DisplayWidth()),static_cast<float>(ze->DisplayHeight()));
|
||||||
|
|
||||||
//opening the images//
|
//opening the images//
|
||||||
temp[0].Open("data/b1.bmp");
|
temp[0].Open("data/b1.bmp");
|
||||||
|
Loading…
Reference in New Issue
Block a user