DEV Community

Discussion on: Making Games in Rust - Part 9 - Main Menu Screen

Collapse
 
seqq111 profile image
Pavel

May I ask the question what is the difference between NodeBundle and ButtonBundle?
Shouldn't we use ButtonBundle here?

Collapse
 
sbelzile profile image
Sébastien Belzile

Shouldn't we use ButtonBundle here?

We do use it in the button function. Or maybe you meant elsewhere?

May I ask the question what is the difference between NodeBundle and ButtonBundle?

It is analog to the difference between a div tag and a button tag in HTML (if you are familiar with web development).
Use the NodeBundle whenever you need something not much interactive.
Use the ButtonBundle whenever you need a button / clickable thing.

Collapse
 
seqq111 profile image
Pavel

Sorry, I am new to Rust and Bevy, have not noticed that we use it. Thanks for the explanation!