How to create a button in Libgdx?

后端 未结 2 1711
悲&欢浪女
悲&欢浪女 2020-12-04 13:21

I want to create a button that changes when the user hovers it, or clicking it. I created the following variable

Button buttonPlay = new Button();
         


        
2条回答
  •  北荒
    北荒 (楼主)
    2020-12-04 14:09

    buttons.pack is the file generated from the libgdx texture packer, texture packer is the tool which can used to generate the texture atlas , That is multiple images you can loaded to the GUI using a single file . it also help to save some memory please refer this link`https://code.google.com/p/libgdx-texturepacker-gui/downloads/list, https://github.com/libgdx/libgdx/wiki/Texture-packer

提交回复
热议问题