Rally Rush
Loading...
Searching...
No Matches
src
menu_ui.hpp
Go to the documentation of this file.
1
#ifndef MENU_UI_HPP
2
#define MENU_UI_HPP
3
4
#include "godot_cpp/classes/control.hpp"
5
#include <godot_cpp/classes/canvas_layer.hpp>
6
#include <godot_cpp/classes/node3d.hpp>
7
#include <godot_cpp/classes/packed_scene.hpp>
8
9
namespace
godot
{
11
class
MenuUI
:
public
CanvasLayer {
12
GDCLASS
(
MenuUI
, CanvasLayer);
13
static
void
_bind_methods
();
14
public
:
16
virtual
void
_ready
()
override
;
18
void
start_game
();
20
void
toggle_controls
();
22
void
set_game_scene
(Ref<PackedScene> scene);
24
Ref<PackedScene>
get_game_scene
()
const
;
25
private
:
26
Control *
controls
{
nullptr
};
27
Ref<PackedScene>
game_scene
{};
28
};
29
}
30
31
#endif
// !MENU_UI_HPP
godot::MenuUI
The main menu UI parent.
Definition
menu_ui.hpp:11
godot::MenuUI::get_game_scene
Ref< PackedScene > get_game_scene() const
The scene to load when the start button is pressed.
Definition
menu_ui.cpp:37
godot::MenuUI::start_game
void start_game()
Load the game scene. Listener for start button "button_down" observer.
Definition
menu_ui.cpp:25
godot::MenuUI::GDCLASS
GDCLASS(MenuUI, CanvasLayer)
godot::MenuUI::toggle_controls
void toggle_controls()
Show the controls screen. Listener for controls button "button_down" observer.
Definition
menu_ui.cpp:29
godot::MenuUI::_ready
virtual void _ready() override
Register listeners with UI action observers. Get the controls panel child and hide it.
Definition
menu_ui.cpp:15
godot::MenuUI::set_game_scene
void set_game_scene(Ref< PackedScene > scene)
The scene to load when the start button is pressed.
Definition
menu_ui.cpp:33
godot::MenuUI::game_scene
Ref< PackedScene > game_scene
Definition
menu_ui.hpp:27
godot::MenuUI::_bind_methods
static void _bind_methods()
Definition
menu_ui.cpp:10
godot::MenuUI::controls
Control * controls
Definition
menu_ui.hpp:26
godot
Definition
beacon_powerup.cpp:6
Generated by
1.9.7