All pastes #1230659 Raw Edit

Stuff

public text v1 · immutable
#1230659 ·published 2008-10-19 01:58 UTC
rendered paste body
//constructor
Button::Button(char* Song, int X, int Y, int W, int H, char *Text, SDLKey Key, char *KeyTex) {
    //construct the vars
    song = new char;
    x = new int; y = new int; w = new int; h = new int;
    text = new char;
    key = new SDLKey;
    keyTex = new char;
    //give the vars values
    song = Song;
    *x = X; *y = Y; *w = W; *h = H;
    text = Text;
    *key = Key;
    keyTex = KeyTex;
}
//destructor
Button::~Button() {
    //delete everything
    delete song;
    delete x; delete y; delete w; delete h;
    delete text;
    delete key;
    delete keyTex;
}