Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8995603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:38:31+00:00 2026-06-15T23:38:31+00:00

I want to create a game menu screen in LibGDX using scene2d package with

  • 0

I want to create a game menu screen in LibGDX using scene2d package with following layout

|    label    |
| btn btn btn |
|    label    |

My code looks as follows:

Table table = getTable();
table.add(label1);
table.row();
table.add(button1);
table.add(button2);
table.add(button3);
table.row();
table.add(label2);
table.row();

But instead of what I want I get something like this:

| label       |
| btn btn btn |
| label       |

The reason is because each table.add() method call creates a new one cell. But I want to place all my 3 buttons inside one cell. How can I achieve desired result, may be in LibGDX existing something like LinearLayout or whatever else?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:38:32+00:00Added an answer on June 15, 2026 at 11:38 pm

    Call colspan(3) on the cell that is returned to you when calling add(label);

    ex.

    Cell cell = table.add(label1);
    cell.colspan(3);
    

    This, as the name implies, sets how many columns the cell will span across.
    You may need to set the alignment on the cell also by calling cell.center();

    you can string together these calls since they all return the same cell object..

    table.add(label1).colspan(3).center();
    

    The Cell class doesn’t seem documented for libgdx.. I simply went on the source code found here

    The cell class documentation can be found here for now. It does seem to be missing from the official docs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a menu and level select screen for my Android game
I'm programming an Android game using AndEngine. I want to create a circle which
I want to ask, is possible to create on-line card game, only with using
I want to create a browser based 3D game using LWJGL with the Java
I now want to create a menu for the game project am working on..
I'm developing a small j2me game and i want to create a menu for
I want to create a simple game (Adobe Air) based on 2 players using
here's my sample from the libgdx android game that I want to create. Nothing
I want to create a game that starts with 3 green dots on the
I want to create a PlayN game, but in Eclipse I get this errors:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.