# Background(image) not working

**URL:** <https://discourse.processing.org/t/background-image-not-working/14305>\
**Category:** Coding Questions\
**Created:** [September 30, 2019, 6:32am UTC](https://discourse.processing.org/t/background-image-not-working/14305 "2019-09-30T06:32:27Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [November 5, 2019, 8:27am UTC](https://discourse.processing.org/t/background-image-not-working/14305/18 "2019-11-05T08:27:12Z")

</div>

like you say,

- 4 buttons on page 0
- 1 button on page 1

so there you need a

```auto
int state = 0

void draw() {
  background(200,0,200);
  if ( state == 0 ) draw_4_buttons();
  if ( state == 1 ) draw_back_button_and_some_text();
}

```

and the button action must change the state variable.

---

_[View the full topic](https://discourse.processing.org/t/background-image-not-working/14305)._
