Skip to content

I'm on the fence with the text positioning #19031

Answered by rparrett
Guelakais asked this question in Q&A
Discussion options

You must be logged in to vote

It solves a problem. It is a fundamental mistake that may be leading you astray and wasting your time. And fixing it means that we can continue the conversation while talking about valid Bevy code.

It sounds like maybe you want these buttons contained in a bar at the top of the screen? Here's a modification of the code I shared above that does that.

Expand Code
//! 19031

use bevy::prelude::*;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_systems(Startup, setup_window)
        .run();
}

fn setup_window(mut commands: Commands) {
    commands.spawn(Camera2d);

    commands
        .spawn((
            Node {
                align_items: AlignItems::Center,

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Guelakais
Comment options

@rparrett
Comment options

rparrett May 2, 2025
Collaborator

@Guelakais
Comment options

@rparrett
Comment options

rparrett May 2, 2025
Collaborator

Answer selected by Guelakais
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants