Why not create a set_texture() function, similar to set_text() to keep with consistency?

The `set_text()` function only has 1 job which is to update a given label's text with the given string parameter, similarly, a `set_texture()` function would update the texture_rect texture with a given `preload()` path. Would it not be better to add that function to keep the code consistent?
1 love
  • Nathan Lovato replied

    As mentioned in the previous lesson, it's because we'll add more code to set_text():

    # In the next lesson, we'll animate the text and need multiple lines of code to
    # do so. That's why we define a function just to change the displayed text.
    3 loves
  • Kaladin replied
    Ah I must've missed that part about expanding the function. It makes perfect sense now, thanks Nathan!
    1 love