Updated register_types.h and cpp to the current godot 4 style.

This commit is contained in:
Relintai 2023-01-08 15:56:00 +01:00
parent 80a3b96fc5
commit a5d8af46bb
2 changed files with 18 additions and 7 deletions

View File

@ -22,15 +22,19 @@ SOFTWARE.
#include "register_types.h"
#include "core/object/class_db.h"
#include "bs_input_event_key.h"
#include "input_map_editor.h"
#include "touch_button.h"
void register_ui_extensions_types() {
ClassDB::register_class<TouchButton>();
ClassDB::register_class<BSInputEventKey>();
ClassDB::register_class<InputMapEditor>();
void initialize_ui_extensions_module(ModuleInitializationLevel p_level) {
if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) {
GDREGISTER_CLASS(TouchButton);
GDREGISTER_CLASS(BSInputEventKey);
GDREGISTER_CLASS(InputMapEditor);
}
}
void unregister_ui_extensions_types() {
void uninitialize_ui_extensions_module(ModuleInitializationLevel p_level) {
}

View File

@ -20,5 +20,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
void register_ui_extensions_types();
void unregister_ui_extensions_types();
#ifndef UI_EXTENSIONS_REGISTER_TYPES_H
#define UI_EXTENSIONS_REGISTER_TYPES_H
#include "modules/register_module_types.h"
void initialize_ui_extensions_module(ModuleInitializationLevel p_level);
void uninitialize_ui_extensions_module(ModuleInitializationLevel p_level);
#endif