AppleMade

Member
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

100 Neutral

About AppleMade

  • Rank
    Newbie
  1. need help SDL EVENTS!

    code-(events function) [code] void Button::handle_events() { int x = 0, y = 0; int count=0; while( event.type == SDL_MOUSEBUTTONDOWN ) { if( event.button.button == SDL_BUTTON_LEFT ) { x = event.button.x; y = event.button.y; if( ( x > box.x ) && ( x < box.x + box.w ) && ( y > box.y ) && ( y < box.y + box.h ) ) { if(count==0){ clip = &clips[ CLIP_NUMBER1]; //shows number 1 count++; } else{ clip = &clips[ CLIP_NUMBER2]; //shows number 2 count++; } } } } [/code] ERROR-compiles fine,but when output screen shows up and i click it,nothing happens and says "not responding".. ps-i am in learning process so there might be some novice mistake,thanks for your time. [mod edit: adding code tags -- rip-off]
  2. need help SDL EVENTS!

    i read d tutorial but m not able to get anything on secnd click..i tried using a seperate counter whose value increments evrytime downbutton is clicked,,but it is not working..
  3. hey.. i wanna know how to handle sdl events..more precisely the "mousebutton" thing. for example-- wen i click frst time an image appears...i want some other image next time i click,and thrd image nxt time and so on.., pls help asap..really will be thankful plssss..