From 50db7ae6bd2b87d7d7d06792985ec5219a8a5969 Mon Sep 17 00:00:00 2001 From: TimePath Date: Mon, 4 May 2015 08:22:35 +1000 Subject: [PATCH] Sort menu classes --- qcsrc/menu/anim/animation.qc | 3 +- qcsrc/menu/anim/animhost.qc | 3 +- qcsrc/menu/anim/easing.qc | 3 +- qcsrc/menu/anim/keyframe.qc | 3 +- qcsrc/menu/classes.inc | 202 +++++++++--------- qcsrc/menu/item.qc | 3 +- qcsrc/menu/item/borderimage.qc | 4 +- qcsrc/menu/item/button.qc | 3 +- qcsrc/menu/item/checkbox.qc | 3 +- qcsrc/menu/item/container.qc | 3 +- qcsrc/menu/item/dialog.qc | 4 +- qcsrc/menu/item/image.qc | 3 +- qcsrc/menu/item/inputbox.qc | 3 +- qcsrc/menu/item/inputcontainer.qc | 3 +- qcsrc/menu/item/label.qc | 3 +- qcsrc/menu/item/listbox.qc | 3 +- qcsrc/menu/item/modalcontroller.qc | 3 +- qcsrc/menu/item/nexposee.qc | 11 +- qcsrc/menu/item/radiobutton.qc | 3 +- qcsrc/menu/item/slider.qc | 3 +- qcsrc/menu/item/tab.qc | 3 +- qcsrc/menu/item/textslider.qc | 3 +- qcsrc/menu/menu.qh | 3 - qcsrc/menu/oo/base.qh | 3 + qcsrc/menu/oo/{interface.qc => classes.qc} | 22 +- qcsrc/menu/oo/implementation.qc | 25 --- qcsrc/menu/progs.src | 3 +- qcsrc/menu/skin.qh | 8 +- qcsrc/menu/xonotic/bigbutton.qc | 4 +- qcsrc/menu/xonotic/bigcommandbutton.qc | 4 +- qcsrc/menu/xonotic/button.qc | 3 +- qcsrc/menu/xonotic/campaign.qc | 4 +- qcsrc/menu/xonotic/charmap.qc | 3 +- qcsrc/menu/xonotic/checkbox.qc | 3 +- qcsrc/menu/xonotic/checkbox_slider_invalid.qc | 3 +- qcsrc/menu/xonotic/checkbox_string.qc | 3 +- qcsrc/menu/xonotic/colorbutton.qc | 3 +- qcsrc/menu/xonotic/colorpicker.qc | 3 +- qcsrc/menu/xonotic/colorpicker_string.qc | 3 +- qcsrc/menu/xonotic/commandbutton.qc | 3 +- qcsrc/menu/xonotic/credits.qc | 3 +- qcsrc/menu/xonotic/crosshairbutton.qc | 3 +- qcsrc/menu/xonotic/cvarlist.qc | 3 +- qcsrc/menu/xonotic/demolist.qc | 3 +- qcsrc/menu/xonotic/dialog.qc | 3 +- qcsrc/menu/xonotic/dialog_credits.qc | 3 +- qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc | 3 +- qcsrc/menu/xonotic/dialog_hudpanel_buffs.qc | 3 +- .../xonotic/dialog_hudpanel_centerprint.qc | 3 +- qcsrc/menu/xonotic/dialog_hudpanel_chat.qc | 3 +- .../xonotic/dialog_hudpanel_engineinfo.qc | 3 +- .../xonotic/dialog_hudpanel_healtharmor.qc | 3 +- .../xonotic/dialog_hudpanel_infomessages.qc | 3 +- .../menu/xonotic/dialog_hudpanel_modicons.qc | 3 +- .../xonotic/dialog_hudpanel_notification.qc | 3 +- qcsrc/menu/xonotic/dialog_hudpanel_physics.qc | 3 +- .../menu/xonotic/dialog_hudpanel_powerups.qc | 3 +- .../xonotic/dialog_hudpanel_pressedkeys.qc | 3 +- .../menu/xonotic/dialog_hudpanel_racetimer.qc | 3 +- qcsrc/menu/xonotic/dialog_hudpanel_radar.qc | 3 +- qcsrc/menu/xonotic/dialog_hudpanel_score.qc | 3 +- qcsrc/menu/xonotic/dialog_hudpanel_timer.qc | 3 +- qcsrc/menu/xonotic/dialog_hudpanel_vote.qc | 3 +- qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc | 3 +- qcsrc/menu/xonotic/dialog_hudsetup_exit.qc | 3 +- qcsrc/menu/xonotic/dialog_monstertools.qc | 3 +- qcsrc/menu/xonotic/dialog_multiplayer.qc | 3 +- .../menu/xonotic/dialog_multiplayer_create.qc | 4 +- .../dialog_multiplayer_create_mapinfo.qc | 3 +- .../dialog_multiplayer_create_mutators.qc | 3 +- qcsrc/menu/xonotic/dialog_multiplayer_join.qc | 3 +- .../dialog_multiplayer_join_serverinfo.qc | 3 +- .../menu/xonotic/dialog_multiplayer_media.qc | 3 +- .../xonotic/dialog_multiplayer_media_demo.qc | 10 +- ...log_multiplayer_media_demo_startconfirm.qc | 3 +- ...alog_multiplayer_media_demo_timeconfirm.qc | 3 +- .../dialog_multiplayer_media_musicplayer.qc | 3 +- .../dialog_multiplayer_media_screenshot.qc | 3 +- ...log_multiplayer_media_screenshot_viewer.qc | 3 +- .../xonotic/dialog_multiplayer_profile.qc | 3 +- qcsrc/menu/xonotic/dialog_quit.qc | 3 +- qcsrc/menu/xonotic/dialog_sandboxtools.qc | 3 +- qcsrc/menu/xonotic/dialog_settings.qc | 3 +- qcsrc/menu/xonotic/dialog_settings_audio.qc | 3 +- qcsrc/menu/xonotic/dialog_settings_effects.qc | 3 +- qcsrc/menu/xonotic/dialog_settings_game.qc | 3 +- .../xonotic/dialog_settings_game_crosshair.qc | 3 +- .../menu/xonotic/dialog_settings_game_hud.qc | 3 +- .../dialog_settings_game_hudconfirm.qc | 3 +- .../xonotic/dialog_settings_game_messages.qc | 3 +- .../xonotic/dialog_settings_game_model.qc | 3 +- .../menu/xonotic/dialog_settings_game_view.qc | 3 +- .../xonotic/dialog_settings_game_weapons.qc | 3 +- qcsrc/menu/xonotic/dialog_settings_input.qc | 3 +- .../xonotic/dialog_settings_input_userbind.qc | 3 +- qcsrc/menu/xonotic/dialog_settings_misc.qc | 3 +- .../xonotic/dialog_settings_misc_cvars.qc | 3 +- .../xonotic/dialog_settings_misc_reset.qc | 3 +- qcsrc/menu/xonotic/dialog_settings_user.qc | 3 +- .../dialog_settings_user_languagewarning.qc | 3 +- qcsrc/menu/xonotic/dialog_settings_video.qc | 3 +- qcsrc/menu/xonotic/dialog_singleplayer.qc | 3 +- .../xonotic/dialog_singleplayer_winner.qc | 3 +- qcsrc/menu/xonotic/dialog_teamselect.qc | 3 +- qcsrc/menu/xonotic/gametypebutton.qc | 3 +- qcsrc/menu/xonotic/gametypelist.qc | 3 +- qcsrc/menu/xonotic/image.qc | 3 +- qcsrc/menu/xonotic/inputbox.qc | 3 +- qcsrc/menu/xonotic/keybinder.qc | 4 +- qcsrc/menu/xonotic/languagelist.qc | 3 +- qcsrc/menu/xonotic/mainwindow.qc | 3 +- qcsrc/menu/xonotic/maplist.qc | 3 +- qcsrc/menu/xonotic/nexposee.qc | 3 +- qcsrc/menu/xonotic/playermodel.qc | 3 +- qcsrc/menu/xonotic/playlist.qc | 3 +- qcsrc/menu/xonotic/radiobutton.qc | 3 +- qcsrc/menu/xonotic/screenshotimage.qc | 3 +- qcsrc/menu/xonotic/screenshotlist.qc | 3 +- qcsrc/menu/xonotic/serverlist.qc | 3 +- qcsrc/menu/xonotic/skinlist.qc | 3 +- qcsrc/menu/xonotic/slider.qc | 3 +- qcsrc/menu/xonotic/slider_decibels.qc | 3 +- qcsrc/menu/xonotic/slider_particles.qc | 4 +- qcsrc/menu/xonotic/slider_picmip.qc | 3 +- qcsrc/menu/xonotic/slider_sbfadetime.qc | 3 +- qcsrc/menu/xonotic/soundlist.qc | 3 +- qcsrc/menu/xonotic/statslist.qc | 3 +- qcsrc/menu/xonotic/tab.qc | 3 +- qcsrc/menu/xonotic/tabcontroller.qc | 3 +- qcsrc/menu/xonotic/textlabel.qc | 4 +- qcsrc/menu/xonotic/weaponarenacheckbox.qc | 3 +- qcsrc/menu/xonotic/weaponslist.qc | 3 +- 132 files changed, 388 insertions(+), 277 deletions(-) rename qcsrc/menu/oo/{interface.qc => classes.qc} (88%) delete mode 100644 qcsrc/menu/oo/implementation.qc diff --git a/qcsrc/menu/anim/animation.qc b/qcsrc/menu/anim/animation.qc index d327dded9..94df30b37 100644 --- a/qcsrc/menu/anim/animation.qc +++ b/qcsrc/menu/anim/animation.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef ANIM_ANIMATION_H +#define ANIM_ANIMATION_H void setterDummy(entity, float); CLASS(Animation, Object) METHOD(Animation, configureAnimation, void(entity, entity, void(entity, float), float, float, float, float)) diff --git a/qcsrc/menu/anim/animhost.qc b/qcsrc/menu/anim/animhost.qc index 9f450236d..fb4961d86 100644 --- a/qcsrc/menu/anim/animhost.qc +++ b/qcsrc/menu/anim/animhost.qc @@ -1,6 +1,7 @@ #include "../menu.qh" -#ifdef INTERFACE +#ifndef ANIM_ANIMHOST_H +#define ANIM_ANIMHOST_H CLASS(AnimHost, Object) METHOD(AnimHost, addAnim, void(entity, entity)) METHOD(AnimHost, removeAnim, void(entity, entity)) diff --git a/qcsrc/menu/anim/easing.qc b/qcsrc/menu/anim/easing.qc index fa643390f..f2c3d46e9 100644 --- a/qcsrc/menu/anim/easing.qc +++ b/qcsrc/menu/anim/easing.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef ANIM_EASING_H +#define ANIM_EASING_H entity makeHostedEasing(entity, void(entity, float), float(float, float, float, float), float, float, float); entity makeEasing(entity, void(entity, float), float(float, float, float, float), float, float, float, float); float easingLinear(float, float, float, float); diff --git a/qcsrc/menu/anim/keyframe.qc b/qcsrc/menu/anim/keyframe.qc index 3a7ec55a7..0e194bf6b 100644 --- a/qcsrc/menu/anim/keyframe.qc +++ b/qcsrc/menu/anim/keyframe.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef ANIM_KEYFRAME_H +#define ANIM_KEYFRAME_H CLASS(Keyframe, Animation) METHOD(Keyframe, addEasing, entity(entity, float, float, float(float, float, float, float))) METHOD(Keyframe, addAnim, void(entity, entity)) diff --git a/qcsrc/menu/classes.inc b/qcsrc/menu/classes.inc index 9b4bb4dab..68b90d586 100644 --- a/qcsrc/menu/classes.inc +++ b/qcsrc/menu/classes.inc @@ -1,130 +1,132 @@ -#include "anim/animhost.qc" #include "anim/animation.qc" +#include "anim/animhost.qc" #include "anim/easing.qc" #include "anim/keyframe.qc" + #include "item.qc" +#include "item/borderimage.qc" +#include "item/button.qc" +#include "item/checkbox.qc" #include "item/container.qc" -#include "item/inputcontainer.qc" -#include "item/nexposee.qc" -#include "item/modalcontroller.qc" +#include "item/dialog.qc" #include "item/image.qc" +#include "item/inputbox.qc" +#include "item/inputcontainer.qc" #include "item/label.qc" -#include "item/button.qc" -#include "item/checkbox.qc" +#include "item/listbox.qc" +#include "item/modalcontroller.qc" +#include "item/nexposee.qc" #include "item/radiobutton.qc" -#include "item/borderimage.qc" #include "item/slider.qc" -#include "item/dialog.qc" #include "item/tab.qc" #include "item/textslider.qc" -#include "item/listbox.qc" -#include "item/inputbox.qc" -#include "xonotic/dialog.qc" -#include "xonotic/tab.qc" -#include "xonotic/mainwindow.qc" -#include "xonotic/button.qc" + #include "xonotic/bigbutton.qc" -#include "xonotic/commandbutton.qc" #include "xonotic/bigcommandbutton.qc" -#include "xonotic/textlabel.qc" -#include "xonotic/dialog_firstrun.qc" -#include "xonotic/dialog_teamselect.qc" -#include "xonotic/dialog_sandboxtools.qc" -#include "xonotic/dialog_monstertools.qc" -#include "xonotic/dialog_settings.qc" -#include "xonotic/dialog_settings_video.qc" -#include "xonotic/dialog_settings_effects.qc" -#include "xonotic/dialog_settings_audio.qc" -#include "xonotic/dialog_settings_game.qc" -#include "xonotic/dialog_settings_user.qc" -#include "xonotic/dialog_settings_user_languagewarning.qc" -#include "xonotic/dialog_settings_misc.qc" -#include "xonotic/dialog_multiplayer.qc" -#include "xonotic/dialog_multiplayer_profile.qc" -#include "xonotic/tabcontroller.qc" -#include "xonotic/slider.qc" -#include "xonotic/slider_resolution.qc" +#include "xonotic/button.qc" +#include "xonotic/campaign.qc" +#include "xonotic/charmap.qc" #include "xonotic/checkbox.qc" +#include "xonotic/checkbox_slider_invalid.qc" #include "xonotic/checkbox_string.qc" -#include "xonotic/weaponarenacheckbox.qc" -#include "xonotic/radiobutton.qc" -#include "xonotic/nexposee.qc" -#include "xonotic/rootdialog.qc" -#include "xonotic/textslider.qc" #include "xonotic/colorbutton.qc" -#include "xonotic/dialog_multiplayer_join.qc" -#include "xonotic/dialog_multiplayer_join_serverinfo.qc" -#include "xonotic/playerlist.qc" -#include "xonotic/listbox.qc" -#include "xonotic/serverlist.qc" -#include "xonotic/inputbox.qc" -#include "xonotic/dialog_quit.qc" -#include "xonotic/dialog_multiplayer_create.qc" -#include "xonotic/dialog_multiplayer_create_mutators.qc" -#include "xonotic/dialog_multiplayer_create_mapinfo.qc" -#include "xonotic/gametypelist.qc" -#include "xonotic/maplist.qc" -#include "xonotic/skinlist.qc" -#include "xonotic/languagelist.qc" -#include "xonotic/image.qc" -#include "xonotic/crosshairbutton.qc" -#include "xonotic/playermodel.qc" -#include "xonotic/checkbox_slider_invalid.qc" -#include "xonotic/charmap.qc" -#include "xonotic/keybinder.qc" -#include "xonotic/dialog_settings_input.qc" -#include "xonotic/dialog_settings_input_userbind.qc" -#include "xonotic/slider_decibels.qc" -#include "xonotic/dialog_singleplayer.qc" -#include "xonotic/campaign.qc" -#include "xonotic/dialog_singleplayer_winner.qc" -#include "xonotic/dialog_credits.qc" -#include "xonotic/credits.qc" -#include "xonotic/dialog_settings_game_crosshair.qc" -#include "xonotic/dialog_settings_game_hud.qc" -#include "xonotic/dialog_settings_game_hudconfirm.qc" -#include "xonotic/dialog_settings_game_model.qc" -#include "xonotic/dialog_settings_game_messages.qc" -#include "xonotic/dialog_settings_game_view.qc" -#include "xonotic/dialog_settings_game_weapons.qc" -#include "xonotic/weaponslist.qc" -#include "xonotic/dialog_multiplayer_media.qc" -#include "xonotic/dialog_multiplayer_media_demo.qc" -#include "xonotic/dialog_multiplayer_media_demo_startconfirm.qc" -#include "xonotic/dialog_multiplayer_media_demo_timeconfirm.qc" -#include "xonotic/demolist.qc" -#include "xonotic/screenshotimage.qc" -#include "xonotic/dialog_multiplayer_media_screenshot.qc" -#include "xonotic/dialog_multiplayer_media_screenshot_viewer.qc" -#include "xonotic/screenshotlist.qc" -#include "xonotic/statslist.qc" -#include "xonotic/dialog_multiplayer_media_musicplayer.qc" -#include "xonotic/soundlist.qc" -#include "xonotic/playlist.qc" #include "xonotic/colorpicker.qc" #include "xonotic/colorpicker_string.qc" +#include "xonotic/commandbutton.qc" +#include "xonotic/credits.qc" +#include "xonotic/crosshairbutton.qc" #include "xonotic/cvarlist.qc" -#include "xonotic/dialog_settings_misc_cvars.qc" -#include "xonotic/dialog_hudsetup_exit.qc" -#include "xonotic/dialog_hudpanel_notification.qc" +#include "xonotic/demolist.qc" +#include "xonotic/dialog.qc" +#include "xonotic/dialog_credits.qc" +#include "xonotic/dialog_firstrun.qc" #include "xonotic/dialog_hudpanel_ammo.qc" +#include "xonotic/dialog_hudpanel_buffs.qc" +#include "xonotic/dialog_hudpanel_centerprint.qc" +#include "xonotic/dialog_hudpanel_chat.qc" +#include "xonotic/dialog_hudpanel_engineinfo.qc" #include "xonotic/dialog_hudpanel_healtharmor.qc" +#include "xonotic/dialog_hudpanel_infomessages.qc" +#include "xonotic/dialog_hudpanel_modicons.qc" +#include "xonotic/dialog_hudpanel_notification.qc" +#include "xonotic/dialog_hudpanel_physics.qc" #include "xonotic/dialog_hudpanel_powerups.qc" -#include "xonotic/dialog_hudpanel_racetimer.qc" #include "xonotic/dialog_hudpanel_pressedkeys.qc" +#include "xonotic/dialog_hudpanel_racetimer.qc" #include "xonotic/dialog_hudpanel_radar.qc" #include "xonotic/dialog_hudpanel_score.qc" #include "xonotic/dialog_hudpanel_timer.qc" #include "xonotic/dialog_hudpanel_vote.qc" -#include "xonotic/dialog_hudpanel_modicons.qc" -#include "xonotic/dialog_hudpanel_chat.qc" -#include "xonotic/dialog_hudpanel_engineinfo.qc" -#include "xonotic/dialog_hudpanel_infomessages.qc" #include "xonotic/dialog_hudpanel_weapons.qc" -#include "xonotic/dialog_hudpanel_physics.qc" -#include "xonotic/dialog_hudpanel_centerprint.qc" -#include "xonotic/dialog_hudpanel_buffs.qc" -#include "xonotic/slider_picmip.qc" +#include "xonotic/dialog_hudsetup_exit.qc" +#include "xonotic/dialog_monstertools.qc" +#include "xonotic/dialog_multiplayer.qc" +#include "xonotic/dialog_multiplayer_create.qc" +#include "xonotic/dialog_multiplayer_create_mapinfo.qc" +#include "xonotic/dialog_multiplayer_create_mutators.qc" +#include "xonotic/dialog_multiplayer_join.qc" +#include "xonotic/dialog_multiplayer_join_serverinfo.qc" +#include "xonotic/dialog_multiplayer_media.qc" +#include "xonotic/dialog_multiplayer_media_demo.qc" +#include "xonotic/dialog_multiplayer_media_demo_startconfirm.qc" +#include "xonotic/dialog_multiplayer_media_demo_timeconfirm.qc" +#include "xonotic/dialog_multiplayer_media_musicplayer.qc" +#include "xonotic/dialog_multiplayer_media_screenshot.qc" +#include "xonotic/dialog_multiplayer_media_screenshot_viewer.qc" +#include "xonotic/dialog_multiplayer_profile.qc" +#include "xonotic/dialog_quit.qc" +#include "xonotic/dialog_sandboxtools.qc" +#include "xonotic/dialog_settings.qc" +#include "xonotic/dialog_settings_audio.qc" +#include "xonotic/dialog_settings_effects.qc" +#include "xonotic/dialog_settings_game.qc" +#include "xonotic/dialog_settings_game_crosshair.qc" +#include "xonotic/dialog_settings_game_hudconfirm.qc" +#include "xonotic/dialog_settings_game_hud.qc" +#include "xonotic/dialog_settings_game_messages.qc" +#include "xonotic/dialog_settings_game_model.qc" +#include "xonotic/dialog_settings_game_view.qc" +#include "xonotic/dialog_settings_game_weapons.qc" +#include "xonotic/dialog_settings_input.qc" +#include "xonotic/dialog_settings_input_userbind.qc" +#include "xonotic/dialog_settings_misc.qc" +#include "xonotic/dialog_settings_misc_cvars.qc" +#include "xonotic/dialog_settings_misc_reset.qc" +#include "xonotic/dialog_settings_user.qc" +#include "xonotic/dialog_settings_user_languagewarning.qc" +#include "xonotic/dialog_settings_video.qc" +#include "xonotic/dialog_singleplayer.qc" +#include "xonotic/dialog_singleplayer_winner.qc" +#include "xonotic/dialog_teamselect.qc" +#include "xonotic/gametypelist.qc" +#include "xonotic/image.qc" +#include "xonotic/inputbox.qc" +#include "xonotic/keybinder.qc" +#include "xonotic/languagelist.qc" +#include "xonotic/listbox.qc" +#include "xonotic/mainwindow.qc" +#include "xonotic/maplist.qc" +#include "xonotic/nexposee.qc" +#include "xonotic/playerlist.qc" +#include "xonotic/playermodel.qc" +#include "xonotic/playlist.qc" +#include "xonotic/radiobutton.qc" +#include "xonotic/rootdialog.qc" +#include "xonotic/screenshotimage.qc" +#include "xonotic/screenshotlist.qc" +#include "xonotic/serverlist.qc" +#include "xonotic/skinlist.qc" +#include "xonotic/slider.qc" +#include "xonotic/slider_decibels.qc" #include "xonotic/slider_particles.qc" +#include "xonotic/slider_picmip.qc" +#include "xonotic/slider_resolution.qc" #include "xonotic/slider_sbfadetime.qc" -#include "xonotic/dialog_settings_misc_reset.qc" +#include "xonotic/soundlist.qc" +#include "xonotic/statslist.qc" +#include "xonotic/tabcontroller.qc" +#include "xonotic/tab.qc" +#include "xonotic/textlabel.qc" +#include "xonotic/textslider.qc" +#include "xonotic/weaponarenacheckbox.qc" +#include "xonotic/weaponslist.qc" diff --git a/qcsrc/menu/item.qc b/qcsrc/menu/item.qc index 73acad07e..62cfa1378 100644 --- a/qcsrc/menu/item.qc +++ b/qcsrc/menu/item.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef ITEM_H +#define ITEM_H CLASS(Item, Object) METHOD(Item, draw, void(entity)) METHOD(Item, keyDown, float(entity, float, float, float)) diff --git a/qcsrc/menu/item/borderimage.qc b/qcsrc/menu/item/borderimage.qc index 422390a69..6b6f4693d 100644 --- a/qcsrc/menu/item/borderimage.qc +++ b/qcsrc/menu/item/borderimage.qc @@ -1,4 +1,6 @@ -#ifdef INTERFACE +#ifndef ITEM_BORDERIMAGE_H +#define ITEM_BORDERIMAGE_H +#include "label.qc" CLASS(BorderImage, Label) METHOD(BorderImage, configureBorderImage, void(entity, string, float, vector, string, float)) METHOD(BorderImage, resizeNotify, void(entity, vector, vector, vector, vector)) diff --git a/qcsrc/menu/item/button.qc b/qcsrc/menu/item/button.qc index 44a0ada9b..8d17f98c6 100644 --- a/qcsrc/menu/item/button.qc +++ b/qcsrc/menu/item/button.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef ITEM_BUTTON_H +#define ITEM_BUTTON_H CLASS(Button, Label) METHOD(Button, configureButton, void(entity, string, float, string)) METHOD(Button, draw, void(entity)) diff --git a/qcsrc/menu/item/checkbox.qc b/qcsrc/menu/item/checkbox.qc index 56cf449bd..e220b0766 100644 --- a/qcsrc/menu/item/checkbox.qc +++ b/qcsrc/menu/item/checkbox.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef ITEM_CHECKBOX_H +#define ITEM_CHECKBOX_H void CheckBox_Click(entity me, entity other); CLASS(CheckBox, Button) METHOD(CheckBox, configureCheckBox, void(entity, string, float, string)) diff --git a/qcsrc/menu/item/container.qc b/qcsrc/menu/item/container.qc index b4c6fdc45..a5d01bf92 100644 --- a/qcsrc/menu/item/container.qc +++ b/qcsrc/menu/item/container.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef ITEM_CONTAINER_H +#define ITEM_CONTAINER_H CLASS(Container, Item) METHOD(Container, draw, void(entity)) METHOD(Container, keyUp, float(entity, float, float, float)) diff --git a/qcsrc/menu/item/dialog.qc b/qcsrc/menu/item/dialog.qc index e68a0931d..b6048ac68 100644 --- a/qcsrc/menu/item/dialog.qc +++ b/qcsrc/menu/item/dialog.qc @@ -13,7 +13,9 @@ // // a subclass may help with using this as a tab -#ifdef INTERFACE +#ifndef ITEM_DIALOG_H +#define ITEM_DIALOG_H +#include "inputcontainer.qc" CLASS(Dialog, InputContainer) METHOD(Dialog, configureDialog, void(entity)) // no runtime configuration, all parameters are given in the code! METHOD(Dialog, fill, void(entity)) // to be overridden by user to fill the dialog with controls diff --git a/qcsrc/menu/item/image.qc b/qcsrc/menu/item/image.qc index b78b6f589..83e5d427a 100644 --- a/qcsrc/menu/item/image.qc +++ b/qcsrc/menu/item/image.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef ITEM_IMAGE_H +#define ITEM_IMAGE_H CLASS(Image, Item) METHOD(Image, configureImage, void(entity, string)) METHOD(Image, draw, void(entity)) diff --git a/qcsrc/menu/item/inputbox.qc b/qcsrc/menu/item/inputbox.qc index bb02fda71..fd6eab1fa 100644 --- a/qcsrc/menu/item/inputbox.qc +++ b/qcsrc/menu/item/inputbox.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef ITEM_INPUTBOX_H +#define ITEM_INPUTBOX_H CLASS(InputBox, Label) METHOD(InputBox, configureInputBox, void(entity, string, float, float, string)) METHOD(InputBox, draw, void(entity)) diff --git a/qcsrc/menu/item/inputcontainer.qc b/qcsrc/menu/item/inputcontainer.qc index 7da569357..b06e25565 100644 --- a/qcsrc/menu/item/inputcontainer.qc +++ b/qcsrc/menu/item/inputcontainer.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef ITEM_INPUTCONTAINER_H +#define ITEM_INPUTCONTAINER_H CLASS(InputContainer, Container) METHOD(InputContainer, keyDown, float(entity, float, float, float)) METHOD(InputContainer, mouseMove, float(entity, vector)) diff --git a/qcsrc/menu/item/label.qc b/qcsrc/menu/item/label.qc index 2e91ee15b..751e5c727 100644 --- a/qcsrc/menu/item/label.qc +++ b/qcsrc/menu/item/label.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef ITEM_LABEL_H +#define ITEM_LABEL_H CLASS(Label, Item) METHOD(Label, configureLabel, void(entity, string, float, float)) METHOD(Label, draw, void(entity)) diff --git a/qcsrc/menu/item/listbox.qc b/qcsrc/menu/item/listbox.qc index 4623a5ffa..385ed502a 100644 --- a/qcsrc/menu/item/listbox.qc +++ b/qcsrc/menu/item/listbox.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef ITEM_LISTBOX_H +#define ITEM_LISTBOX_H CLASS(ListBox, Item) METHOD(ListBox, resizeNotify, void(entity, vector, vector, vector, vector)) METHOD(ListBox, configureListBox, void(entity, float, float)) diff --git a/qcsrc/menu/item/modalcontroller.qc b/qcsrc/menu/item/modalcontroller.qc index 228f7a513..c1bc021f8 100644 --- a/qcsrc/menu/item/modalcontroller.qc +++ b/qcsrc/menu/item/modalcontroller.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef ITEM_MODALCONTROLLER_H +#define ITEM_MODALCONTROLLER_H CLASS(ModalController, Container) METHOD(ModalController, resizeNotify, void(entity, vector, vector, vector, vector)) METHOD(ModalController, draw, void(entity)) diff --git a/qcsrc/menu/item/nexposee.qc b/qcsrc/menu/item/nexposee.qc index b0d30cb1b..69d54b7a0 100644 --- a/qcsrc/menu/item/nexposee.qc +++ b/qcsrc/menu/item/nexposee.qc @@ -1,4 +1,6 @@ -#ifdef INTERFACE +#ifndef ITEM_NEXPOSEE_H +#define ITEM_NEXPOSEE_H +#include "container.qc" CLASS(Nexposee, Container) METHOD(Nexposee, draw, void(entity)) METHOD(Nexposee, keyDown, float(entity, float, float, float)) @@ -23,7 +25,6 @@ CLASS(Nexposee, Container) ENDCLASS(Nexposee) void ExposeeCloseButton_Click(entity button, entity other); // un-exposees the current state -#endif // animation states: // 0 = thumbnails seen @@ -31,9 +32,6 @@ void ExposeeCloseButton_Click(entity button, entity other); // un-exposees the c // 2 = zoomed in // 3 = zooming out // animation factor: 0 = minimum theSize, 1 = maximum theSize - -#ifdef IMPLEMENTATION - .vector Nexposee_initialSize; .vector Nexposee_initialFontScale; .vector Nexposee_initialOrigin; @@ -47,6 +45,9 @@ void ExposeeCloseButton_Click(entity button, entity other); // un-exposees the c .vector Nexposee_align; .float Nexposee_animationFactor; +#endif + +#ifdef IMPLEMENTATION void Nexposee_close(entity me) { // user must override this diff --git a/qcsrc/menu/item/radiobutton.qc b/qcsrc/menu/item/radiobutton.qc index 97168fc53..d8cadea3d 100644 --- a/qcsrc/menu/item/radiobutton.qc +++ b/qcsrc/menu/item/radiobutton.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef ITEM_RADIOBUTTON_H +#define ITEM_RADIOBUTTON_H void RadioButton_Click(entity me, entity other); CLASS(RadioButton, CheckBox) METHOD(RadioButton, configureRadioButton, void(entity, string, float, string, float, float)) diff --git a/qcsrc/menu/item/slider.qc b/qcsrc/menu/item/slider.qc index b7605e489..7ee9cefa7 100644 --- a/qcsrc/menu/item/slider.qc +++ b/qcsrc/menu/item/slider.qc @@ -1,6 +1,7 @@ // Note: // to use this, you FIRST call configureSliderVisuals, then configureSliderValues -#ifdef INTERFACE +#ifndef ITEM_SLIDER_H +#define ITEM_SLIDER_H CLASS(Slider, Label) METHOD(Slider, resizeNotify, void(entity, vector, vector, vector, vector)) METHOD(Slider, configureSliderVisuals, void(entity, float, float, float, string)) diff --git a/qcsrc/menu/item/tab.qc b/qcsrc/menu/item/tab.qc index d5796c190..3fdcccc68 100644 --- a/qcsrc/menu/item/tab.qc +++ b/qcsrc/menu/item/tab.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef ITEM_TAB_H +#define ITEM_TAB_H CLASS(Tab, Dialog) ATTRIB(Tab, isTabRoot, float, 0) ATTRIB(Tab, closable, float, 0) diff --git a/qcsrc/menu/item/textslider.qc b/qcsrc/menu/item/textslider.qc index db8b55260..663f33a8f 100644 --- a/qcsrc/menu/item/textslider.qc +++ b/qcsrc/menu/item/textslider.qc @@ -1,6 +1,7 @@ // Note: // to use this, you FIRST call configureSliderVisuals, then multiple times addValue, then configureTextSlider -#ifdef INTERFACE +#ifndef ITEM_TEXTSLIDER_H +#define ITEM_TEXTSLIDER_H CLASS(TextSlider, Slider) METHOD(TextSlider, valueToText, string(entity, float)) METHOD(TextSlider, valueToIdentifier, string(entity, float)) diff --git a/qcsrc/menu/menu.qh b/qcsrc/menu/menu.qh index 00f6017aa..33d467c2a 100644 --- a/qcsrc/menu/menu.qh +++ b/qcsrc/menu/menu.qh @@ -14,9 +14,6 @@ #define localcmd cmd -#define NULL (null_entity) -#define world NULL - // constants const int GAME_ISSERVER = 1; diff --git a/qcsrc/menu/oo/base.qh b/qcsrc/menu/oo/base.qh index a8337501b..60b2f8b31 100644 --- a/qcsrc/menu/oo/base.qh +++ b/qcsrc/menu/oo/base.qh @@ -1,6 +1,9 @@ #ifndef BASE_H #define BASE_H +#define NULL (null_entity) +#define world NULL + .string classname; .string vtblname; .entity vtblbase; diff --git a/qcsrc/menu/oo/interface.qc b/qcsrc/menu/oo/classes.qc similarity index 88% rename from qcsrc/menu/oo/interface.qc rename to qcsrc/menu/oo/classes.qc index d78a6a556..e6182ca33 100644 --- a/qcsrc/menu/oo/interface.qc +++ b/qcsrc/menu/oo/classes.qc @@ -1,10 +1,4 @@ -#ifndef INTERFACE -#define INTERFACE -#endif - -#ifdef IMPLEMENTATION -#undef IMPLEMENTATION -#endif +#include "base.qh" #ifdef CLASS #undef CLASS @@ -39,13 +33,23 @@ prototype cname##_##name; \ #define ENDCLASS(cname) \ .bool instanceOf##cname; \ entity cname##_vtbl; \ -[[accumulate]] entity spawn##cname(entity this, entity basevtbl) { \ +[[last]] entity spawn##cname(entity this, entity basevtbl) { \ this.instanceOf##cname = true; \ this.classname = #cname; \ if (!cname##_vtbl) cname##_vtbl = spawnVtbl(this, basevtbl); \ return this; \ } -#define SUPER(cname) +#define SUPER(cname) (cname##_vtbl.vtblbase) + +#ifdef IMPLEMENTATION +#undef IMPLEMENTATION +#endif + +#include "../classes.inc" + +#ifndef IMPLEMENTATION +#define IMPLEMENTATION +#endif #include "../classes.inc" diff --git a/qcsrc/menu/oo/implementation.qc b/qcsrc/menu/oo/implementation.qc deleted file mode 100644 index 3850db445..000000000 --- a/qcsrc/menu/oo/implementation.qc +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef INTERFACE -#define INTERFACE -#endif - -#ifndef IMPLEMENTATION -#define IMPLEMENTATION -#endif - -#ifdef CLASS -#undef CLASS -#undef METHOD -#undef ATTRIB -#undef ATTRIBARRAY -#undef ENDCLASS -#undef SUPER -#endif - -#define CLASS(cname, base) -#define METHOD(cname, name, prototype) -#define ATTRIB(cname, name, type, val) -#define ATTRIBARRAY(cname, name, type, cnt) -#define ENDCLASS(cname) -#define SUPER(cname) (cname##_vtbl.vtblbase) - -#include "../classes.inc" diff --git a/qcsrc/menu/progs.src b/qcsrc/menu/progs.src index 631b91f55..abfb303db 100644 --- a/qcsrc/menu/progs.src +++ b/qcsrc/menu/progs.src @@ -4,8 +4,7 @@ ../dpdefs/menudefs.qh ../dpdefs/keycodes.qh -oo/interface.qc -oo/implementation.qc +oo/classes.qc draw.qc menu.qc diff --git a/qcsrc/menu/skin.qh b/qcsrc/menu/skin.qh index 84f9029c0..10c81e7ef 100644 --- a/qcsrc/menu/skin.qh +++ b/qcsrc/menu/skin.qh @@ -14,11 +14,11 @@ #undef SKINFLOAT #undef SKINVECTOR -#define SKINBEGIN void Skin_ApplySetting(string key, string value) { switch(key) { -#define SKINVECTOR(name,def) case #name: SKIN##name = stov(value); break -#define SKINFLOAT(name,def) case #name: SKIN##name = stof(value); break +#define SKINBEGIN void Skin_ApplySetting(string key, string _value) { switch(key) { +#define SKINVECTOR(name,def) case #name: SKIN##name = stov(_value); break +#define SKINFLOAT(name,def) case #name: SKIN##name = stof(_value); break //#define SKINSTRING(name,def) case #name: break -#define SKINSTRING(name,def) case #name: SKIN##name = strzone(value); break +#define SKINSTRING(name,def) case #name: SKIN##name = strzone(_value); break // I know this leaks memory when skin is read multiple times. Screw it. #define SKINEND case "": break; case "//": break; default: dprint("Invalid key in skin file: ", key, "\n"); } } #include "skin-customizables.inc" diff --git a/qcsrc/menu/xonotic/bigbutton.qc b/qcsrc/menu/xonotic/bigbutton.qc index 897d05d8d..07b6a074c 100644 --- a/qcsrc/menu/xonotic/bigbutton.qc +++ b/qcsrc/menu/xonotic/bigbutton.qc @@ -1,4 +1,6 @@ -#ifdef INTERFACE +#ifndef BIGBUTTON_H +#define BIGBUTTON_H +#include "button.qc" CLASS(XonoticBigButton, XonoticButton) METHOD(XonoticBigButton, configureXonoticBigButton, void(entity, string, vector)) ATTRIB(XonoticBigButton, image, string, SKINGFX_BUTTON_BIG) diff --git a/qcsrc/menu/xonotic/bigcommandbutton.qc b/qcsrc/menu/xonotic/bigcommandbutton.qc index d7d203160..6798d9b01 100644 --- a/qcsrc/menu/xonotic/bigcommandbutton.qc +++ b/qcsrc/menu/xonotic/bigcommandbutton.qc @@ -1,4 +1,6 @@ -#ifdef INTERFACE +#ifndef BIGCOMMANDBUTTON_H +#define BIGCOMMANDBUTTON_H +#include "commandbutton.qc" CLASS(XonoticBigCommandButton, XonoticCommandButton) METHOD(XonoticBigCommandButton, configureXonoticBigCommandButton, void(entity, string, vector, string, float)) ATTRIB(XonoticBigCommandButton, image, string, SKINGFX_BUTTON_BIG) diff --git a/qcsrc/menu/xonotic/button.qc b/qcsrc/menu/xonotic/button.qc index 99018cb2d..8811e952c 100644 --- a/qcsrc/menu/xonotic/button.qc +++ b/qcsrc/menu/xonotic/button.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef BUTTON_H +#define BUTTON_H CLASS(XonoticButton, Button) METHOD(XonoticButton, configureXonoticButton, void(entity, string, vector)) ATTRIB(XonoticButton, fontSize, float, SKINFONTSIZE_NORMAL) diff --git a/qcsrc/menu/xonotic/campaign.qc b/qcsrc/menu/xonotic/campaign.qc index 3ce8fa29e..826a0b4f2 100644 --- a/qcsrc/menu/xonotic/campaign.qc +++ b/qcsrc/menu/xonotic/campaign.qc @@ -1,6 +1,8 @@ #include "../../common/campaign_common.qh" -#ifdef INTERFACE +#ifndef CAMPAIGN_H +#define CAMPAIGN_H +#include "listbox.qc" CLASS(XonoticCampaignList, XonoticListBox) METHOD(XonoticCampaignList, configureXonoticCampaignList, void(entity)) ATTRIB(XonoticCampaignList, rowsPerItem, float, 10) diff --git a/qcsrc/menu/xonotic/charmap.qc b/qcsrc/menu/xonotic/charmap.qc index 06e4926db..3ebf48927 100644 --- a/qcsrc/menu/xonotic/charmap.qc +++ b/qcsrc/menu/xonotic/charmap.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef CHARMAP_H +#define CHARMAP_H CLASS(XonoticCharmap, Item) METHOD(XonoticCharmap, configureXonoticCharmap, void(entity, entity)) METHOD(XonoticCharmap, mousePress, float(entity, vector)) diff --git a/qcsrc/menu/xonotic/checkbox.qc b/qcsrc/menu/xonotic/checkbox.qc index 321bf7ebf..289824f70 100644 --- a/qcsrc/menu/xonotic/checkbox.qc +++ b/qcsrc/menu/xonotic/checkbox.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef CHECKBOX_H +#define CHECKBOX_H CLASS(XonoticCheckBox, CheckBox) METHOD(XonoticCheckBox, configureXonoticCheckBox, void(entity, float, float, string, string)) METHOD(XonoticCheckBox, setChecked, void(entity, float)) diff --git a/qcsrc/menu/xonotic/checkbox_slider_invalid.qc b/qcsrc/menu/xonotic/checkbox_slider_invalid.qc index 22cdf8b0b..989869c6b 100644 --- a/qcsrc/menu/xonotic/checkbox_slider_invalid.qc +++ b/qcsrc/menu/xonotic/checkbox_slider_invalid.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef CHECKBOX_SLIDER_INVALID_H +#define CHECKBOX_SLIDER_INVALID_H CLASS(XonoticSliderCheckBox, CheckBox) METHOD(XonoticSliderCheckBox, configureXonoticSliderCheckBox, void(entity, float, float, entity, string)) METHOD(XonoticSliderCheckBox, setChecked, void(entity, float)) diff --git a/qcsrc/menu/xonotic/checkbox_string.qc b/qcsrc/menu/xonotic/checkbox_string.qc index c36b710bf..eefed8e6e 100644 --- a/qcsrc/menu/xonotic/checkbox_string.qc +++ b/qcsrc/menu/xonotic/checkbox_string.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef CHECKBOX_STRING_H +#define CHECKBOX_STRING_H CLASS(XonoticCheckBoxString, CheckBox) METHOD(XonoticCheckBoxString, configureXonoticCheckBoxString, void(entity, string, string, string, string)) METHOD(XonoticCheckBoxString, setChecked, void(entity, float)) diff --git a/qcsrc/menu/xonotic/colorbutton.qc b/qcsrc/menu/xonotic/colorbutton.qc index 527c0512e..952ccb70a 100644 --- a/qcsrc/menu/xonotic/colorbutton.qc +++ b/qcsrc/menu/xonotic/colorbutton.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef COLORBUTTON_H +#define COLORBUTTON_H CLASS(XonoticColorButton, RadioButton) METHOD(XonoticColorButton, configureXonoticColorButton, void(entity, float, float, float)) METHOD(XonoticColorButton, setChecked, void(entity, float)) diff --git a/qcsrc/menu/xonotic/colorpicker.qc b/qcsrc/menu/xonotic/colorpicker.qc index 86da883a9..c74fcf9f4 100644 --- a/qcsrc/menu/xonotic/colorpicker.qc +++ b/qcsrc/menu/xonotic/colorpicker.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef COLORPICKER_H +#define COLORPICKER_H CLASS(XonoticColorpicker, Image) METHOD(XonoticColorpicker, configureXonoticColorpicker, void(entity, entity)) METHOD(XonoticColorpicker, mousePress, float(entity, vector)) diff --git a/qcsrc/menu/xonotic/colorpicker_string.qc b/qcsrc/menu/xonotic/colorpicker_string.qc index 4a5db88df..bf5e1654b 100644 --- a/qcsrc/menu/xonotic/colorpicker_string.qc +++ b/qcsrc/menu/xonotic/colorpicker_string.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef COLORPICKER_STRING_H +#define COLORPICKER_STRING_H CLASS(XonoticColorpickerString, Image) METHOD(XonoticColorpickerString, configureXonoticColorpickerString, void(entity, string, string)) METHOD(XonoticColorpickerString, mousePress, float(entity, vector)) diff --git a/qcsrc/menu/xonotic/commandbutton.qc b/qcsrc/menu/xonotic/commandbutton.qc index e0c17d55c..8c1272e48 100644 --- a/qcsrc/menu/xonotic/commandbutton.qc +++ b/qcsrc/menu/xonotic/commandbutton.qc @@ -4,7 +4,8 @@ //# define COMMANDBUTTON_REVERT 4 #endif -#ifdef INTERFACE +#ifndef COMMANDBUTTON_H +#define COMMANDBUTTON_H CLASS(XonoticCommandButton, XonoticButton) METHOD(XonoticCommandButton, configureXonoticCommandButton, void(entity, string, vector, string, float)) ATTRIB(XonoticCommandButton, onClickCommand, string, string_null) diff --git a/qcsrc/menu/xonotic/credits.qc b/qcsrc/menu/xonotic/credits.qc index c6f320bc9..0d04daf58 100644 --- a/qcsrc/menu/xonotic/credits.qc +++ b/qcsrc/menu/xonotic/credits.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef CREDITS_H +#define CREDITS_H CLASS(XonoticCreditsList, XonoticListBox) METHOD(XonoticCreditsList, configureXonoticCreditsList, void(entity)) ATTRIB(XonoticCreditsList, rowsPerItem, float, 1) diff --git a/qcsrc/menu/xonotic/crosshairbutton.qc b/qcsrc/menu/xonotic/crosshairbutton.qc index 4ed6352f9..ec0d1690d 100644 --- a/qcsrc/menu/xonotic/crosshairbutton.qc +++ b/qcsrc/menu/xonotic/crosshairbutton.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef CROSSHAIRBUTTON_H +#define CROSSHAIRBUTTON_H CLASS(XonoticCrosshairButton, RadioButton) METHOD(XonoticCrosshairButton, configureXonoticCrosshairButton, void(entity, float, float)) METHOD(XonoticCrosshairButton, setChecked, void(entity, float)) diff --git a/qcsrc/menu/xonotic/cvarlist.qc b/qcsrc/menu/xonotic/cvarlist.qc index a965f2cf9..87f862589 100644 --- a/qcsrc/menu/xonotic/cvarlist.qc +++ b/qcsrc/menu/xonotic/cvarlist.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef CVARLIST_H +#define CVARLIST_H CLASS(XonoticCvarList, XonoticListBox) METHOD(XonoticCvarList, configureXonoticCvarList, void(entity)) ATTRIB(XonoticCvarList, rowsPerItem, float, 1) diff --git a/qcsrc/menu/xonotic/demolist.qc b/qcsrc/menu/xonotic/demolist.qc index 170a4bba6..fa9d60e79 100644 --- a/qcsrc/menu/xonotic/demolist.qc +++ b/qcsrc/menu/xonotic/demolist.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DEMOLIST_H +#define DEMOLIST_H CLASS(XonoticDemoList, XonoticListBox) METHOD(XonoticDemoList, configureXonoticDemoList, void(entity)) ATTRIB(XonoticDemoList, rowsPerItem, float, 1) diff --git a/qcsrc/menu/xonotic/dialog.qc b/qcsrc/menu/xonotic/dialog.qc index 3f6f30fc9..4901fc6a9 100644 --- a/qcsrc/menu/xonotic/dialog.qc +++ b/qcsrc/menu/xonotic/dialog.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_H +#define DIALOG_H CLASS(XonoticDialog, Dialog) // still to be customized by user /* diff --git a/qcsrc/menu/xonotic/dialog_credits.qc b/qcsrc/menu/xonotic/dialog_credits.qc index ba8ddbba3..b87da091b 100644 --- a/qcsrc/menu/xonotic/dialog_credits.qc +++ b/qcsrc/menu/xonotic/dialog_credits.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_CREDITS_H +#define DIALOG_CREDITS_H CLASS(XonoticCreditsDialog, XonoticDialog) METHOD(XonoticCreditsDialog, fill, void(entity)) METHOD(XonoticCreditsDialog, focusEnter, void(entity)) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc b/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc index 87db1efd8..3cf01fac7 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_ammo.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_AMMO_H +#define DIALOG_HUDPANEL_AMMO_H CLASS(XonoticHUDAmmoDialog, XonoticRootDialog) METHOD(XonoticHUDAmmoDialog, fill, void(entity)) ATTRIB(XonoticHUDAmmoDialog, title, string, _("Ammo Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_buffs.qc b/qcsrc/menu/xonotic/dialog_hudpanel_buffs.qc index 14193b5ef..adceff3a6 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_buffs.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_buffs.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_BUFFS_H +#define DIALOG_HUDPANEL_BUFFS_H CLASS(XonoticHUDBuffsDialog, XonoticRootDialog) METHOD(XonoticHUDBuffsDialog, fill, void(entity)) ATTRIB(XonoticHUDBuffsDialog, title, string, _("Buffs Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc b/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc index 285754d86..29b2a951b 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_CENTERPRINT_H +#define DIALOG_HUDPANEL_CENTERPRINT_H CLASS(XonoticHUDCenterprintDialog, XonoticRootDialog) METHOD(XonoticHUDCenterprintDialog, fill, void(entity)) ATTRIB(XonoticHUDCenterprintDialog, title, string, _("Centerprint Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_chat.qc b/qcsrc/menu/xonotic/dialog_hudpanel_chat.qc index dd7701632..f27c3c8c7 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_chat.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_chat.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_CHAT_H +#define DIALOG_HUDPANEL_CHAT_H CLASS(XonoticHUDChatDialog, XonoticRootDialog) METHOD(XonoticHUDChatDialog, fill, void(entity)) ATTRIB(XonoticHUDChatDialog, title, string, _("Chat Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc b/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc index ef314a4ff..34e9d4d61 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_ENGINEINFO_H +#define DIALOG_HUDPANEL_ENGINEINFO_H CLASS(XonoticHUDEngineInfoDialog, XonoticRootDialog) METHOD(XonoticHUDEngineInfoDialog, fill, void(entity)) ATTRIB(XonoticHUDEngineInfoDialog, title, string, _("Engine Info Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc b/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc index f5656fa48..cc99b73fc 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_HEALTHARMOR_H +#define DIALOG_HUDPANEL_HEALTHARMOR_H CLASS(XonoticHUDHealthArmorDialog, XonoticRootDialog) METHOD(XonoticHUDHealthArmorDialog, fill, void(entity)) ATTRIB(XonoticHUDHealthArmorDialog, title, string, _("Health/Armor Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qc b/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qc index e25ce9a42..0ed8f7afb 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_infomessages.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_INFOMESSAGES_H +#define DIALOG_HUDPANEL_INFOMESSAGES_H CLASS(XonoticHUDInfoMessagesDialog, XonoticRootDialog) METHOD(XonoticHUDInfoMessagesDialog, fill, void(entity)) ATTRIB(XonoticHUDInfoMessagesDialog, title, string, _("Info Messages Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qc b/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qc index 05e06054e..6c654e740 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_modicons.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_MODICONS_H +#define DIALOG_HUDPANEL_MODICONS_H CLASS(XonoticHUDModIconsDialog, XonoticRootDialog) METHOD(XonoticHUDModIconsDialog, fill, void(entity)) ATTRIB(XonoticHUDModIconsDialog, title, string, _("Mod Icons Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_notification.qc b/qcsrc/menu/xonotic/dialog_hudpanel_notification.qc index f5518508c..17394ffd5 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_notification.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_notification.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_NOTIFICATION_H +#define DIALOG_HUDPANEL_NOTIFICATION_H CLASS(XonoticHUDNotificationDialog, XonoticRootDialog) METHOD(XonoticHUDNotificationDialog, fill, void(entity)) ATTRIB(XonoticHUDNotificationDialog, title, string, _("Notification Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_physics.qc b/qcsrc/menu/xonotic/dialog_hudpanel_physics.qc index f6120dac3..bab993a3a 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_physics.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_physics.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_PHYSICS_H +#define DIALOG_HUDPANEL_PHYSICS_H CLASS(XonoticHUDPhysicsDialog, XonoticRootDialog) METHOD(XonoticHUDPhysicsDialog, fill, void(entity)) ATTRIB(XonoticHUDPhysicsDialog, title, string, _("Physics Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc b/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc index d97277142..d3ed373e4 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_powerups.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_POWERUPS_H +#define DIALOG_HUDPANEL_POWERUPS_H CLASS(XonoticHUDPowerupsDialog, XonoticRootDialog) METHOD(XonoticHUDPowerupsDialog, fill, void(entity)) ATTRIB(XonoticHUDPowerupsDialog, title, string, _("Powerups Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc b/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc index 0d025c969..b71bd0828 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_PRESSEDKEYS_H +#define DIALOG_HUDPANEL_PRESSEDKEYS_H CLASS(XonoticHUDPressedKeysDialog, XonoticRootDialog) METHOD(XonoticHUDPressedKeysDialog, fill, void(entity)) ATTRIB(XonoticHUDPressedKeysDialog, title, string, _("Pressed Keys Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qc b/qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qc index 1515a3365..70fea9961 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_racetimer.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_RACETIMER_H +#define DIALOG_HUDPANEL_RACETIMER_H CLASS(XonoticHUDRaceTimerDialog, XonoticRootDialog) METHOD(XonoticHUDRaceTimerDialog, fill, void(entity)) ATTRIB(XonoticHUDRaceTimerDialog, title, string, _("Race Timer Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_radar.qc b/qcsrc/menu/xonotic/dialog_hudpanel_radar.qc index 9e3eac3cf..4f1fc4cbd 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_radar.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_radar.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_RADAR_H +#define DIALOG_HUDPANEL_RADAR_H CLASS(XonoticHUDRadarDialog, XonoticRootDialog) METHOD(XonoticHUDRadarDialog, fill, void(entity)) ATTRIB(XonoticHUDRadarDialog, title, string, _("Radar Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_score.qc b/qcsrc/menu/xonotic/dialog_hudpanel_score.qc index 95a53daa5..581c3b908 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_score.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_score.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_SCORE_H +#define DIALOG_HUDPANEL_SCORE_H CLASS(XonoticHUDScoreDialog, XonoticRootDialog) METHOD(XonoticHUDScoreDialog, fill, void(entity)) ATTRIB(XonoticHUDScoreDialog, title, string, _("Score Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc b/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc index 7b7d60b0f..280985a5a 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_timer.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_TIMER_H +#define DIALOG_HUDPANEL_TIMER_H CLASS(XonoticHUDTimerDialog, XonoticRootDialog) METHOD(XonoticHUDTimerDialog, fill, void(entity)) ATTRIB(XonoticHUDTimerDialog, title, string, _("Timer Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_vote.qc b/qcsrc/menu/xonotic/dialog_hudpanel_vote.qc index 31ba3b550..2cb64c151 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_vote.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_vote.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_VOTE_H +#define DIALOG_HUDPANEL_VOTE_H CLASS(XonoticHUDVoteDialog, XonoticRootDialog) METHOD(XonoticHUDVoteDialog, fill, void(entity)) ATTRIB(XonoticHUDVoteDialog, title, string, _("Vote Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc b/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc index 4164005c5..cbbeca78b 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_weapons.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDPANEL_WEAPONS_H +#define DIALOG_HUDPANEL_WEAPONS_H CLASS(XonoticHUDWeaponsDialog, XonoticRootDialog) METHOD(XonoticHUDWeaponsDialog, fill, void(entity)) ATTRIB(XonoticHUDWeaponsDialog, title, string, _("Weapons Panel")) diff --git a/qcsrc/menu/xonotic/dialog_hudsetup_exit.qc b/qcsrc/menu/xonotic/dialog_hudsetup_exit.qc index 249855cad..2d2dad3bb 100644 --- a/qcsrc/menu/xonotic/dialog_hudsetup_exit.qc +++ b/qcsrc/menu/xonotic/dialog_hudsetup_exit.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_HUDSETUP_EXIT_H +#define DIALOG_HUDSETUP_EXIT_H CLASS(XonoticHUDExitDialog, XonoticRootDialog) METHOD(XonoticHUDExitDialog, fill, void(entity)) ATTRIB(XonoticHUDExitDialog, title, string, _("Panel HUD Setup")) diff --git a/qcsrc/menu/xonotic/dialog_monstertools.qc b/qcsrc/menu/xonotic/dialog_monstertools.qc index c288585a5..ea9339ba5 100644 --- a/qcsrc/menu/xonotic/dialog_monstertools.qc +++ b/qcsrc/menu/xonotic/dialog_monstertools.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_MONSTERTOOLS_H +#define DIALOG_MONSTERTOOLS_H CLASS(XonoticMonsterToolsDialog, XonoticRootDialog) METHOD(XonoticMonsterToolsDialog, fill, void(entity)) // to be overridden by user to fill the dialog with controls ATTRIB(XonoticMonsterToolsDialog, title, string, _("Monster Tools")) diff --git a/qcsrc/menu/xonotic/dialog_multiplayer.qc b/qcsrc/menu/xonotic/dialog_multiplayer.qc index d284041c5..dda708ad9 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_MULTIPLAYER_H +#define DIALOG_MULTIPLAYER_H CLASS(XonoticMultiplayerDialog, XonoticDialog) METHOD(XonoticMultiplayerDialog, fill, void(entity)) ATTRIB(XonoticMultiplayerDialog, title, string, _("Multiplayer")) diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create.qc b/qcsrc/menu/xonotic/dialog_multiplayer_create.qc index 84ce8a1ab..13a8e3184 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create.qc @@ -1,4 +1,6 @@ -#ifdef INTERFACE +#ifndef DIALOG_MULTIPLAYER_CREATE_H +#define DIALOG_MULTIPLAYER_CREATE_H +#include "tab.qc" CLASS(XonoticServerCreateTab, XonoticTab) METHOD(XonoticServerCreateTab, fill, void(entity)) METHOD(XonoticServerCreateTab, gameTypeChangeNotify, void(entity)) diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.qc b/qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.qc index ab6f42834..b082ae69a 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_MULTIPLAYER_CREATE_MAPINFO_H +#define DIALOG_MULTIPLAYER_CREATE_MAPINFO_H CLASS(XonoticMapInfoDialog, XonoticDialog) METHOD(XonoticMapInfoDialog, fill, void(entity)) METHOD(XonoticMapInfoDialog, loadMapInfo, void(entity, float, entity)) diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc index 9ac61ec28..9cdbd2c4d 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc @@ -1,6 +1,7 @@ #include "../../common/weapons/weapons.qh" -#ifdef INTERFACE +#ifndef DIALOG_MULTIPLAYER_CREATE_MUTATORS_H +#define DIALOG_MULTIPLAYER_CREATE_MUTATORS_H CLASS(XonoticMutatorsDialog, XonoticDialog) METHOD(XonoticMutatorsDialog, toString, string(entity)) METHOD(XonoticMutatorsDialog, fill, void(entity)) diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join.qc b/qcsrc/menu/xonotic/dialog_multiplayer_join.qc index 76b1e064a..d58fdc733 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_join.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_join.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_MULTIPLAYER_JOIN_H +#define DIALOG_MULTIPLAYER_JOIN_H CLASS(XonoticServerListTab, XonoticTab) METHOD(XonoticServerListTab, fill, void(entity)) ATTRIB(XonoticServerListTab, title, string, _("Join")) diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.qc b/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.qc index 74b8df6a6..10e112840 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.qc @@ -1,6 +1,7 @@ #include "../../common/mapinfo.qh" -#ifdef INTERFACE +#ifndef DIALOG_MULTIPLAYER_JOIN_SERVERINFO_H +#define DIALOG_MULTIPLAYER_JOIN_SERVERINFO_H CLASS(XonoticServerInfoDialog, XonoticDialog) METHOD(XonoticServerInfoDialog, fill, void(entity)) METHOD(XonoticServerInfoDialog, loadServerInfo, void(entity, float)) diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_media.qc b/qcsrc/menu/xonotic/dialog_multiplayer_media.qc index c17fdd75d..a4e0bbc98 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_media.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_media.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_MULTIPLAYER_MEDIA_H +#define DIALOG_MULTIPLAYER_MEDIA_H CLASS(XonoticMediaTab, XonoticTab) METHOD(XonoticMediaTab, fill, void(entity)) ATTRIB(XonoticMediaTab, title, string, _("Media")) diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_media_demo.qc b/qcsrc/menu/xonotic/dialog_multiplayer_media_demo.qc index e79885e64..68367fc0a 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_media_demo.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_media_demo.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_MULTIPLAYER_MEDIA_DEMO_H +#define DIALOG_MULTIPLAYER_MEDIA_DEMO_H CLASS(XonoticDemoBrowserTab, XonoticTab) METHOD(XonoticDemoBrowserTab, fill, void(entity)) ATTRIB(XonoticDemoBrowserTab, title, string, _("Demo")) @@ -9,14 +10,11 @@ CLASS(XonoticDemoBrowserTab, XonoticTab) ATTRIB(XonoticDemoBrowserTab, democlicktype, float, 0) ENDCLASS(XonoticDemoBrowserTab) entity makeXonoticDemoBrowserTab(); -#ifdef IMPLEMENTATION -// private: -const float DMO_PLAY = 1; -const float DMO_TIME = 2; -#endif #endif #ifdef IMPLEMENTATION +const float DMO_PLAY = 1; +const float DMO_TIME = 2; void DemoConfirm_Check_Gamestatus(entity btn, entity me) { if(!(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))) // we're not in a match, lets watch the demo diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_media_demo_startconfirm.qc b/qcsrc/menu/xonotic/dialog_multiplayer_media_demo_startconfirm.qc index 7fa2072de..a00e70e00 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_media_demo_startconfirm.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_media_demo_startconfirm.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_MULTIPLAYER_MEDIA_DEMO_STARTCONFIRM_H +#define DIALOG_MULTIPLAYER_MEDIA_DEMO_STARTCONFIRM_H CLASS(XonoticDemoStartConfirmDialog, XonoticDialog) METHOD(XonoticDemoStartConfirmDialog, fill, void(entity)) ATTRIB(XonoticDemoStartConfirmDialog, title, string, _("Disconnect")) diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_media_demo_timeconfirm.qc b/qcsrc/menu/xonotic/dialog_multiplayer_media_demo_timeconfirm.qc index d71ad6f2e..62c72b17d 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_media_demo_timeconfirm.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_media_demo_timeconfirm.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_MULTIPLAYER_MEDIA_DEMO_TIMECONFIRM_H +#define DIALOG_MULTIPLAYER_MEDIA_DEMO_TIMECONFIRM_H CLASS(XonoticDemoTimeConfirmDialog, XonoticDialog) METHOD(XonoticDemoTimeConfirmDialog, fill, void(entity)) ATTRIB(XonoticDemoTimeConfirmDialog, title, string, _("Disconnect")) diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_media_musicplayer.qc b/qcsrc/menu/xonotic/dialog_multiplayer_media_musicplayer.qc index ddb83e0a3..efb96cdf8 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_media_musicplayer.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_media_musicplayer.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_MULTIPLAYER_MEDIA_MUSICPLAYER_H +#define DIALOG_MULTIPLAYER_MEDIA_MUSICPLAYER_H CLASS(XonoticMusicPlayerTab, XonoticTab) METHOD(XonoticMusicPlayerTab, fill, void(entity)) ATTRIB(XonoticMusicPlayerTab, title, string, _("Music")) diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot.qc b/qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot.qc index f072645a9..797ed8116 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_MULTIPLAYER_MEDIA_SCREENSHOT_H +#define DIALOG_MULTIPLAYER_MEDIA_SCREENSHOT_H CLASS(XonoticScreenshotBrowserTab, XonoticTab) METHOD(XonoticScreenshotBrowserTab, fill, void(entity)) ATTRIB(XonoticScreenshotBrowserTab, title, string, "Screenshot") diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot_viewer.qc b/qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot_viewer.qc index dd47da811..4016e0f2a 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot_viewer.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_media_screenshot_viewer.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_MULTIPLAYER_MEDIA_SCREENSHOT_VIEWER_H +#define DIALOG_MULTIPLAYER_MEDIA_SCREENSHOT_VIEWER_H CLASS(XonoticScreenshotViewerDialog, XonoticDialog) METHOD(XonoticScreenshotViewerDialog, fill, void(entity)) METHOD(XonoticScreenshotViewerDialog, keyDown, float(entity, float, float, float)) diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc b/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc index 8c6fc8025..4b4c94859 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_MULTIPLAYER_PROFILE_H +#define DIALOG_MULTIPLAYER_PROFILE_H CLASS(XonoticProfileTab, XonoticTab) METHOD(XonoticProfileTab, fill, void(entity)) METHOD(XonoticProfileTab, draw, void(entity)) diff --git a/qcsrc/menu/xonotic/dialog_quit.qc b/qcsrc/menu/xonotic/dialog_quit.qc index 3c4013d95..128e614be 100644 --- a/qcsrc/menu/xonotic/dialog_quit.qc +++ b/qcsrc/menu/xonotic/dialog_quit.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_QUIT_H +#define DIALOG_QUIT_H CLASS(XonoticQuitDialog, XonoticDialog) METHOD(XonoticQuitDialog, fill, void(entity)) ATTRIB(XonoticQuitDialog, title, string, _("Quit")) diff --git a/qcsrc/menu/xonotic/dialog_sandboxtools.qc b/qcsrc/menu/xonotic/dialog_sandboxtools.qc index 30a353704..2932bcd46 100644 --- a/qcsrc/menu/xonotic/dialog_sandboxtools.qc +++ b/qcsrc/menu/xonotic/dialog_sandboxtools.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SANDBOXTOOLS_H +#define DIALOG_SANDBOXTOOLS_H CLASS(XonoticSandboxToolsDialog, XonoticRootDialog) METHOD(XonoticSandboxToolsDialog, fill, void(entity)) // to be overridden by user to fill the dialog with controls ATTRIB(XonoticSandboxToolsDialog, title, string, _("Sandbox Tools")) // ;) diff --git a/qcsrc/menu/xonotic/dialog_settings.qc b/qcsrc/menu/xonotic/dialog_settings.qc index 16e00f7eb..2962cc947 100644 --- a/qcsrc/menu/xonotic/dialog_settings.qc +++ b/qcsrc/menu/xonotic/dialog_settings.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_H +#define DIALOG_SETTINGS_H CLASS(XonoticSettingsDialog, XonoticDialog) METHOD(XonoticSettingsDialog, fill, void(entity)) ATTRIB(XonoticSettingsDialog, title, string, _("Settings")) diff --git a/qcsrc/menu/xonotic/dialog_settings_audio.qc b/qcsrc/menu/xonotic/dialog_settings_audio.qc index 2245edbd4..88de16ff9 100644 --- a/qcsrc/menu/xonotic/dialog_settings_audio.qc +++ b/qcsrc/menu/xonotic/dialog_settings_audio.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_AUDIO_H +#define DIALOG_SETTINGS_AUDIO_H CLASS(XonoticAudioSettingsTab, XonoticTab) METHOD(XonoticAudioSettingsTab, fill, void(entity)) ATTRIB(XonoticAudioSettingsTab, title, string, _("Audio")) diff --git a/qcsrc/menu/xonotic/dialog_settings_effects.qc b/qcsrc/menu/xonotic/dialog_settings_effects.qc index 109dd2763..34dbe37b9 100644 --- a/qcsrc/menu/xonotic/dialog_settings_effects.qc +++ b/qcsrc/menu/xonotic/dialog_settings_effects.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_EFFECTS_H +#define DIALOG_SETTINGS_EFFECTS_H CLASS(XonoticEffectsSettingsTab, XonoticTab) METHOD(XonoticEffectsSettingsTab, fill, void(entity)) ATTRIB(XonoticEffectsSettingsTab, title, string, _("Effects")) diff --git a/qcsrc/menu/xonotic/dialog_settings_game.qc b/qcsrc/menu/xonotic/dialog_settings_game.qc index d2db0ab06..972616201 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_GAME_H +#define DIALOG_SETTINGS_GAME_H CLASS(XonoticGameSettingsTab, XonoticTab) METHOD(XonoticGameSettingsTab, fill, void(entity)) ATTRIB(XonoticGameSettingsTab, title, string, _("Game")) diff --git a/qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc b/qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc index b51f61b9a..a5ee7fe2d 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_GAME_CROSSHAIR_H +#define DIALOG_SETTINGS_GAME_CROSSHAIR_H CLASS(XonoticGameCrosshairSettingsTab, XonoticTab) //METHOD(XonoticGameCrosshairSettingsTab, toString, string(entity)) METHOD(XonoticGameCrosshairSettingsTab, fill, void(entity)) diff --git a/qcsrc/menu/xonotic/dialog_settings_game_hud.qc b/qcsrc/menu/xonotic/dialog_settings_game_hud.qc index 7489207a1..b8b1f93e5 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_hud.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_hud.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_GAME_HUD_H +#define DIALOG_SETTINGS_GAME_HUD_H CLASS(XonoticGameHUDSettingsTab, XonoticTab) //METHOD(XonoticGameHUDSettingsTab, toString, string(entity)) METHOD(XonoticGameHUDSettingsTab, fill, void(entity)) diff --git a/qcsrc/menu/xonotic/dialog_settings_game_hudconfirm.qc b/qcsrc/menu/xonotic/dialog_settings_game_hudconfirm.qc index 9bf5130ab..dcc003771 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_hudconfirm.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_hudconfirm.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_GAME_HUDCONFIRM_H +#define DIALOG_SETTINGS_GAME_HUDCONFIRM_H CLASS(XonoticHUDConfirmDialog, XonoticDialog) METHOD(XonoticHUDConfirmDialog, fill, void(entity)) ATTRIB(XonoticHUDConfirmDialog, title, string, _("Enter HUD editor")) diff --git a/qcsrc/menu/xonotic/dialog_settings_game_messages.qc b/qcsrc/menu/xonotic/dialog_settings_game_messages.qc index 1c2ee73f5..ac2bf76e2 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_messages.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_messages.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_GAME_MESSAGES_H +#define DIALOG_SETTINGS_GAME_MESSAGES_H CLASS(XonoticGameMessageSettingsTab, XonoticTab) //METHOD(XonoticGameWeaponsSettingsTab, toString, string(entity)) METHOD(XonoticGameMessageSettingsTab, fill, void(entity)) diff --git a/qcsrc/menu/xonotic/dialog_settings_game_model.qc b/qcsrc/menu/xonotic/dialog_settings_game_model.qc index 404215e30..6bdac49d3 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_model.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_model.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_GAME_MODEL_H +#define DIALOG_SETTINGS_GAME_MODEL_H CLASS(XonoticGameModelSettingsTab, XonoticTab) //METHOD(XonoticGameModelSettingsTab, toString, string(entity)) METHOD(XonoticGameModelSettingsTab, fill, void(entity)) diff --git a/qcsrc/menu/xonotic/dialog_settings_game_view.qc b/qcsrc/menu/xonotic/dialog_settings_game_view.qc index b09380092..6d5e82db9 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_view.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_view.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_GAME_VIEW_H +#define DIALOG_SETTINGS_GAME_VIEW_H CLASS(XonoticGameViewSettingsTab, XonoticTab) //METHOD(XonoticGameCrosshairSettingsTab, toString, string(entity)) METHOD(XonoticGameViewSettingsTab, fill, void(entity)) diff --git a/qcsrc/menu/xonotic/dialog_settings_game_weapons.qc b/qcsrc/menu/xonotic/dialog_settings_game_weapons.qc index 739c186b1..148775b13 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_weapons.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_weapons.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_GAME_WEAPONS_H +#define DIALOG_SETTINGS_GAME_WEAPONS_H CLASS(XonoticGameWeaponsSettingsTab, XonoticTab) //METHOD(XonoticGameWeaponsSettingsTab, toString, string(entity)) METHOD(XonoticGameWeaponsSettingsTab, fill, void(entity)) diff --git a/qcsrc/menu/xonotic/dialog_settings_input.qc b/qcsrc/menu/xonotic/dialog_settings_input.qc index 90cc13484..0f2262540 100644 --- a/qcsrc/menu/xonotic/dialog_settings_input.qc +++ b/qcsrc/menu/xonotic/dialog_settings_input.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_INPUT_H +#define DIALOG_SETTINGS_INPUT_H CLASS(XonoticInputSettingsTab, XonoticTab) METHOD(XonoticInputSettingsTab, fill, void(entity)) ATTRIB(XonoticInputSettingsTab, title, string, _("Input")) diff --git a/qcsrc/menu/xonotic/dialog_settings_input_userbind.qc b/qcsrc/menu/xonotic/dialog_settings_input_userbind.qc index 4bc26b2e4..6a0ae52bc 100644 --- a/qcsrc/menu/xonotic/dialog_settings_input_userbind.qc +++ b/qcsrc/menu/xonotic/dialog_settings_input_userbind.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_INPUT_USERBIND_H +#define DIALOG_SETTINGS_INPUT_USERBIND_H CLASS(XonoticUserbindEditDialog, XonoticDialog) METHOD(XonoticUserbindEditDialog, loadUserBind, void(entity, string, string, string)) METHOD(XonoticUserbindEditDialog, fill, void(entity)) diff --git a/qcsrc/menu/xonotic/dialog_settings_misc.qc b/qcsrc/menu/xonotic/dialog_settings_misc.qc index 2372e3208..5a4343796 100644 --- a/qcsrc/menu/xonotic/dialog_settings_misc.qc +++ b/qcsrc/menu/xonotic/dialog_settings_misc.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_MISC_H +#define DIALOG_SETTINGS_MISC_H CLASS(XonoticMiscSettingsTab, XonoticTab) METHOD(XonoticMiscSettingsTab, fill, void(entity)) ATTRIB(XonoticMiscSettingsTab, title, string, _("Misc")) diff --git a/qcsrc/menu/xonotic/dialog_settings_misc_cvars.qc b/qcsrc/menu/xonotic/dialog_settings_misc_cvars.qc index 2993fa30e..e1b7ba807 100644 --- a/qcsrc/menu/xonotic/dialog_settings_misc_cvars.qc +++ b/qcsrc/menu/xonotic/dialog_settings_misc_cvars.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_MISC_CVARS_H +#define DIALOG_SETTINGS_MISC_CVARS_H CLASS(XonoticCvarsDialog, XonoticDialog) METHOD(XonoticCvarsDialog, fill, void(entity)) METHOD(XonoticCvarsDialog, showNotify, void(entity)) diff --git a/qcsrc/menu/xonotic/dialog_settings_misc_reset.qc b/qcsrc/menu/xonotic/dialog_settings_misc_reset.qc index 19a874354..20ad7fe48 100644 --- a/qcsrc/menu/xonotic/dialog_settings_misc_reset.qc +++ b/qcsrc/menu/xonotic/dialog_settings_misc_reset.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_MISC_RESET_H +#define DIALOG_SETTINGS_MISC_RESET_H CLASS(XonoticResetDialog, XonoticDialog) METHOD(XonoticResetDialog, fill, void(entity)) ATTRIB(XonoticResetDialog, title, string, _("Factory reset")) diff --git a/qcsrc/menu/xonotic/dialog_settings_user.qc b/qcsrc/menu/xonotic/dialog_settings_user.qc index 9e2b0d034..0e9c1585e 100644 --- a/qcsrc/menu/xonotic/dialog_settings_user.qc +++ b/qcsrc/menu/xonotic/dialog_settings_user.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_USER_H +#define DIALOG_SETTINGS_USER_H CLASS(XonoticUserSettingsTab, XonoticTab) METHOD(XonoticUserSettingsTab, fill, void(entity)) ATTRIB(XonoticUserSettingsTab, title, string, _("User")) diff --git a/qcsrc/menu/xonotic/dialog_settings_user_languagewarning.qc b/qcsrc/menu/xonotic/dialog_settings_user_languagewarning.qc index 24644c0ac..3d4025ae7 100644 --- a/qcsrc/menu/xonotic/dialog_settings_user_languagewarning.qc +++ b/qcsrc/menu/xonotic/dialog_settings_user_languagewarning.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_USER_LANGUAGEWARNING_H +#define DIALOG_SETTINGS_USER_LANGUAGEWARNING_H CLASS(XonoticLanguageWarningDialog, XonoticDialog) METHOD(XonoticLanguageWarningDialog, fill, void(entity)) // to be overridden by user to fill the dialog with controls ATTRIB(XonoticLanguageWarningDialog, title, string, _("Warning")) diff --git a/qcsrc/menu/xonotic/dialog_settings_video.qc b/qcsrc/menu/xonotic/dialog_settings_video.qc index 7a22cf4a8..8dae62f51 100644 --- a/qcsrc/menu/xonotic/dialog_settings_video.qc +++ b/qcsrc/menu/xonotic/dialog_settings_video.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SETTINGS_VIDEO_H +#define DIALOG_SETTINGS_VIDEO_H CLASS(XonoticVideoSettingsTab, XonoticTab) METHOD(XonoticVideoSettingsTab, fill, void(entity)) ATTRIB(XonoticVideoSettingsTab, title, string, _("Video")) diff --git a/qcsrc/menu/xonotic/dialog_singleplayer.qc b/qcsrc/menu/xonotic/dialog_singleplayer.qc index 978e3adc3..0112f9a5b 100644 --- a/qcsrc/menu/xonotic/dialog_singleplayer.qc +++ b/qcsrc/menu/xonotic/dialog_singleplayer.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SINGLEPLAYER_H +#define DIALOG_SINGLEPLAYER_H CLASS(XonoticSingleplayerDialog, XonoticDialog) METHOD(XonoticSingleplayerDialog, fill, void(entity)) ATTRIB(XonoticSingleplayerDialog, title, string, _("Singleplayer")) diff --git a/qcsrc/menu/xonotic/dialog_singleplayer_winner.qc b/qcsrc/menu/xonotic/dialog_singleplayer_winner.qc index 275cc0433..b01731bde 100644 --- a/qcsrc/menu/xonotic/dialog_singleplayer_winner.qc +++ b/qcsrc/menu/xonotic/dialog_singleplayer_winner.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_SINGLEPLAYER_WINNER_H +#define DIALOG_SINGLEPLAYER_WINNER_H CLASS(XonoticWinnerDialog, XonoticDialog) METHOD(XonoticWinnerDialog, fill, void(entity)) METHOD(XonoticWinnerDialog, focusEnter, void(entity)) diff --git a/qcsrc/menu/xonotic/dialog_teamselect.qc b/qcsrc/menu/xonotic/dialog_teamselect.qc index cab938185..8486bf7a0 100644 --- a/qcsrc/menu/xonotic/dialog_teamselect.qc +++ b/qcsrc/menu/xonotic/dialog_teamselect.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef DIALOG_TEAMSELECT_H +#define DIALOG_TEAMSELECT_H CLASS(XonoticTeamSelectDialog, XonoticRootDialog) METHOD(XonoticTeamSelectDialog, fill, void(entity)) // to be overridden by user to fill the dialog with controls METHOD(XonoticTeamSelectDialog, showNotify, void(entity)) diff --git a/qcsrc/menu/xonotic/gametypebutton.qc b/qcsrc/menu/xonotic/gametypebutton.qc index aaa46eaf7..408d62a32 100644 --- a/qcsrc/menu/xonotic/gametypebutton.qc +++ b/qcsrc/menu/xonotic/gametypebutton.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef GAMETYPEBUTTON_H +#define GAMETYPEBUTTON_H CLASS(XonoticGametypeButton, RadioButton) METHOD(XonoticGametypeButton, configureXonoticGametypeButton, void(entity, float, string, string)) METHOD(XonoticGametypeButton, setChecked, void(entity, float)) diff --git a/qcsrc/menu/xonotic/gametypelist.qc b/qcsrc/menu/xonotic/gametypelist.qc index faaa177ca..fde605898 100644 --- a/qcsrc/menu/xonotic/gametypelist.qc +++ b/qcsrc/menu/xonotic/gametypelist.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef GAMETYPELIST_H +#define GAMETYPELIST_H CLASS(XonoticGametypeList, XonoticListBox) METHOD(XonoticGametypeList, configureXonoticGametypeList, void(entity)) ATTRIB(XonoticGametypeList, rowsPerItem, float, 2) diff --git a/qcsrc/menu/xonotic/image.qc b/qcsrc/menu/xonotic/image.qc index 2e51d8997..40ddc3384 100644 --- a/qcsrc/menu/xonotic/image.qc +++ b/qcsrc/menu/xonotic/image.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef IMAGE_H +#define IMAGE_H CLASS(XonoticImage, Image) METHOD(XonoticImage, configureXonoticImage, void(entity, string, float)) ENDCLASS(XonoticImage) diff --git a/qcsrc/menu/xonotic/inputbox.qc b/qcsrc/menu/xonotic/inputbox.qc index b15e475a1..eb07f5d18 100644 --- a/qcsrc/menu/xonotic/inputbox.qc +++ b/qcsrc/menu/xonotic/inputbox.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef INPUTBOX_H +#define INPUTBOX_H CLASS(XonoticInputBox, InputBox) METHOD(XonoticInputBox, configureXonoticInputBox, void(entity, float, string)) METHOD(XonoticInputBox, focusLeave, void(entity)) diff --git a/qcsrc/menu/xonotic/keybinder.qc b/qcsrc/menu/xonotic/keybinder.qc index e06969610..07d4d6a1b 100644 --- a/qcsrc/menu/xonotic/keybinder.qc +++ b/qcsrc/menu/xonotic/keybinder.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef KEYBINDER_H +#define KEYBINDER_H CLASS(XonoticKeyBinder, XonoticListBox) METHOD(XonoticKeyBinder, configureXonoticKeyBinder, void(entity)) ATTRIB(XonoticKeyBinder, rowsPerItem, int, 1) @@ -28,6 +29,7 @@ entity makeXonoticKeyBinder(); void KeyBinder_Bind_Change(entity btn, entity me); void KeyBinder_Bind_Clear(entity btn, entity me); void KeyBinder_Bind_Edit(entity btn, entity me); +void KeyBinder_Bind_Reset_All(entity btn, entity me); #endif #ifdef IMPLEMENTATION diff --git a/qcsrc/menu/xonotic/languagelist.qc b/qcsrc/menu/xonotic/languagelist.qc index 85461e63e..caa83a8d3 100644 --- a/qcsrc/menu/xonotic/languagelist.qc +++ b/qcsrc/menu/xonotic/languagelist.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef LANGUAGELIST_H +#define LANGUAGELIST_H CLASS(XonoticLanguageList, XonoticListBox) METHOD(XonoticLanguageList, configureXonoticLanguageList, void(entity)) ATTRIB(XonoticLanguageList, rowsPerItem, float, 1) diff --git a/qcsrc/menu/xonotic/mainwindow.qc b/qcsrc/menu/xonotic/mainwindow.qc index ea126beb5..4dc6f8610 100644 --- a/qcsrc/menu/xonotic/mainwindow.qc +++ b/qcsrc/menu/xonotic/mainwindow.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef MAINWINDOW_H +#define MAINWINDOW_H CLASS(MainWindow, ModalController) METHOD(MainWindow, configureMainWindow, void(entity)) METHOD(MainWindow, draw, void(entity)) diff --git a/qcsrc/menu/xonotic/maplist.qc b/qcsrc/menu/xonotic/maplist.qc index 9bcc1afc4..796ffbc37 100644 --- a/qcsrc/menu/xonotic/maplist.qc +++ b/qcsrc/menu/xonotic/maplist.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef MAPLIST_H +#define MAPLIST_H CLASS(XonoticMapList, XonoticListBox) METHOD(XonoticMapList, configureXonoticMapList, void(entity)) ATTRIB(XonoticMapList, rowsPerItem, float, 4) diff --git a/qcsrc/menu/xonotic/nexposee.qc b/qcsrc/menu/xonotic/nexposee.qc index 2bbd8db0a..00f99aea1 100644 --- a/qcsrc/menu/xonotic/nexposee.qc +++ b/qcsrc/menu/xonotic/nexposee.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef NEXPOSEE_H +#define NEXPOSEE_H CLASS(XonoticNexposee, Nexposee) METHOD(XonoticNexposee, configureXonoticNexposee, void(entity)) METHOD(XonoticNexposee, close, void(entity)) diff --git a/qcsrc/menu/xonotic/playermodel.qc b/qcsrc/menu/xonotic/playermodel.qc index 73d6dd28c..8e0e9ecd2 100644 --- a/qcsrc/menu/xonotic/playermodel.qc +++ b/qcsrc/menu/xonotic/playermodel.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef PLAYERMODEL_H +#define PLAYERMODEL_H CLASS(XonoticPlayerModelSelector, XonoticImage) METHOD(XonoticPlayerModelSelector, configureXonoticPlayerModelSelector, void(entity)) METHOD(XonoticPlayerModelSelector, loadCvars, void(entity)) diff --git a/qcsrc/menu/xonotic/playlist.qc b/qcsrc/menu/xonotic/playlist.qc index 5d71755d0..8d3b880cc 100644 --- a/qcsrc/menu/xonotic/playlist.qc +++ b/qcsrc/menu/xonotic/playlist.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef PLAYLIST_H +#define PLAYLIST_H CLASS(XonoticPlayList, XonoticListBox) METHOD(XonoticPlayList, configureXonoticPlayList, void(entity)) ATTRIB(XonoticPlayList, rowsPerItem, float, 1) diff --git a/qcsrc/menu/xonotic/radiobutton.qc b/qcsrc/menu/xonotic/radiobutton.qc index 000da90e3..702b1310d 100644 --- a/qcsrc/menu/xonotic/radiobutton.qc +++ b/qcsrc/menu/xonotic/radiobutton.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef RADIOBUTTON_H +#define RADIOBUTTON_H CLASS(XonoticRadioButton, RadioButton) METHOD(XonoticRadioButton, configureXonoticRadioButton, void(entity, float, string, string, string)) METHOD(XonoticRadioButton, draw, void(entity)) diff --git a/qcsrc/menu/xonotic/screenshotimage.qc b/qcsrc/menu/xonotic/screenshotimage.qc index 756c1a449..4ab74aead 100644 --- a/qcsrc/menu/xonotic/screenshotimage.qc +++ b/qcsrc/menu/xonotic/screenshotimage.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef SCREENSHOTIMAGE_H +#define SCREENSHOTIMAGE_H CLASS(XonoticScreenshotImage, XonoticImage) METHOD(XonoticScreenshotImage, configureXonoticScreenshotImage, void(entity)) METHOD(XonoticScreenshotImage, load, void(entity, string)) diff --git a/qcsrc/menu/xonotic/screenshotlist.qc b/qcsrc/menu/xonotic/screenshotlist.qc index 8730fa8dd..41576bb04 100644 --- a/qcsrc/menu/xonotic/screenshotlist.qc +++ b/qcsrc/menu/xonotic/screenshotlist.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef SCREENSHOTLIST_H +#define SCREENSHOTLIST_H CLASS(XonoticScreenshotList, XonoticListBox) METHOD(XonoticScreenshotList, configureXonoticScreenshotList, void(entity)) ATTRIB(XonoticScreenshotList, rowsPerItem, float, 1) diff --git a/qcsrc/menu/xonotic/serverlist.qc b/qcsrc/menu/xonotic/serverlist.qc index 7837693b4..2c25f4a76 100644 --- a/qcsrc/menu/xonotic/serverlist.qc +++ b/qcsrc/menu/xonotic/serverlist.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef SERVERLIST_H +#define SERVERLIST_H CLASS(XonoticServerList, XonoticListBox) METHOD(XonoticServerList, configureXonoticServerList, void(entity)) ATTRIB(XonoticServerList, rowsPerItem, float, 1) diff --git a/qcsrc/menu/xonotic/skinlist.qc b/qcsrc/menu/xonotic/skinlist.qc index f667a8847..34733386a 100644 --- a/qcsrc/menu/xonotic/skinlist.qc +++ b/qcsrc/menu/xonotic/skinlist.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef SKINLIST_H +#define SKINLIST_H CLASS(XonoticSkinList, XonoticListBox) METHOD(XonoticSkinList, configureXonoticSkinList, void(entity)) ATTRIB(XonoticSkinList, rowsPerItem, float, 4) diff --git a/qcsrc/menu/xonotic/slider.qc b/qcsrc/menu/xonotic/slider.qc index 8130534eb..129193b12 100644 --- a/qcsrc/menu/xonotic/slider.qc +++ b/qcsrc/menu/xonotic/slider.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef SLIDER_H +#define SLIDER_H CLASS(XonoticSlider, Slider) METHOD(XonoticSlider, configureXonoticSlider, void(entity, float, float, float, string)) METHOD(XonoticSlider, setValue, void(entity, float)) diff --git a/qcsrc/menu/xonotic/slider_decibels.qc b/qcsrc/menu/xonotic/slider_decibels.qc index e3e77c319..75ea83454 100644 --- a/qcsrc/menu/xonotic/slider_decibels.qc +++ b/qcsrc/menu/xonotic/slider_decibels.qc @@ -1,6 +1,7 @@ #include "../../warpzonelib/mathlib.qh" -#ifdef INTERFACE +#ifndef SLIDER_DECIBELS_H +#define SLIDER_DECIBELS_H CLASS(XonoticDecibelsSlider, XonoticSlider) METHOD(XonoticDecibelsSlider, loadCvars, void(entity)) METHOD(XonoticDecibelsSlider, saveCvars, void(entity)) diff --git a/qcsrc/menu/xonotic/slider_particles.qc b/qcsrc/menu/xonotic/slider_particles.qc index 0bfe05c5d..9a098165e 100644 --- a/qcsrc/menu/xonotic/slider_particles.qc +++ b/qcsrc/menu/xonotic/slider_particles.qc @@ -1,4 +1,6 @@ -#ifdef INTERFACE +#ifndef SLIDER_PARTICLES_H +#define SLIDER_PARTICLES_H +#include "textslider.qc" CLASS(XonoticParticlesSlider, XonoticTextSlider) METHOD(XonoticParticlesSlider, configureXonoticParticlesSlider, void(entity)) METHOD(XonoticParticlesSlider, loadCvars, void(entity)) diff --git a/qcsrc/menu/xonotic/slider_picmip.qc b/qcsrc/menu/xonotic/slider_picmip.qc index 201da72d5..14f5c61f7 100644 --- a/qcsrc/menu/xonotic/slider_picmip.qc +++ b/qcsrc/menu/xonotic/slider_picmip.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef SLIDER_PICMIP_H +#define SLIDER_PICMIP_H CLASS(XonoticPicmipSlider, XonoticTextSlider) METHOD(XonoticPicmipSlider, configureXonoticPicmipSlider, void(entity)) METHOD(XonoticPicmipSlider, draw, void(entity)) diff --git a/qcsrc/menu/xonotic/slider_sbfadetime.qc b/qcsrc/menu/xonotic/slider_sbfadetime.qc index 03d3e3402..ad273ca04 100644 --- a/qcsrc/menu/xonotic/slider_sbfadetime.qc +++ b/qcsrc/menu/xonotic/slider_sbfadetime.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef SLIDER_SBFADETIME_H +#define SLIDER_SBFADETIME_H CLASS(XonoticScoreboardFadeTimeSlider, XonoticTextSlider) METHOD(XonoticScoreboardFadeTimeSlider, configureXonoticScoreboardFadeTimeSlider, void(entity)) METHOD(XonoticScoreboardFadeTimeSlider, loadCvars, void(entity)) diff --git a/qcsrc/menu/xonotic/soundlist.qc b/qcsrc/menu/xonotic/soundlist.qc index ae859779e..ec80643b9 100644 --- a/qcsrc/menu/xonotic/soundlist.qc +++ b/qcsrc/menu/xonotic/soundlist.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef SOUNDLIST_H +#define SOUNDLIST_H CLASS(XonoticSoundList, XonoticListBox) METHOD(XonoticSoundList, configureXonoticSoundList, void(entity)) ATTRIB(XonoticSoundList, rowsPerItem, float, 1) diff --git a/qcsrc/menu/xonotic/statslist.qc b/qcsrc/menu/xonotic/statslist.qc index ab22ff0c7..3c5e17fe6 100644 --- a/qcsrc/menu/xonotic/statslist.qc +++ b/qcsrc/menu/xonotic/statslist.qc @@ -1,7 +1,8 @@ #include "../../common/counting.qh" #include "../../common/playerstats.qh" -#ifdef INTERFACE +#ifndef STATSLIST_H +#define STATSLIST_H CLASS(XonoticStatsList, XonoticListBox) METHOD(XonoticStatsList, configureXonoticStatsList, void(entity)) ATTRIB(XonoticStatsList, rowsPerItem, float, 1.4) diff --git a/qcsrc/menu/xonotic/tab.qc b/qcsrc/menu/xonotic/tab.qc index fd4b50cc3..a5cdf2b8f 100644 --- a/qcsrc/menu/xonotic/tab.qc +++ b/qcsrc/menu/xonotic/tab.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef TAB_H +#define TAB_H CLASS(XonoticTab, Tab) // still to be customized by user /* diff --git a/qcsrc/menu/xonotic/tabcontroller.qc b/qcsrc/menu/xonotic/tabcontroller.qc index d3aba3331..0640171a2 100644 --- a/qcsrc/menu/xonotic/tabcontroller.qc +++ b/qcsrc/menu/xonotic/tabcontroller.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef TABCONTROLLER_H +#define TABCONTROLLER_H CLASS(XonoticTabController, ModalController) METHOD(XonoticTabController, configureXonoticTabController, void(entity, float)) METHOD(XonoticTabController, makeTabButton, entity(entity, string, entity)) diff --git a/qcsrc/menu/xonotic/textlabel.qc b/qcsrc/menu/xonotic/textlabel.qc index 7bab8c406..ef180885c 100644 --- a/qcsrc/menu/xonotic/textlabel.qc +++ b/qcsrc/menu/xonotic/textlabel.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef TEXTLABEL_H +#define TEXTLABEL_H CLASS(XonoticTextLabel, Label) METHOD(XonoticTextLabel, configureXonoticTextLabel, void(entity, float, string)) METHOD(XonoticTextLabel, draw, void(entity)) @@ -7,6 +8,7 @@ CLASS(XonoticTextLabel, Label) ATTRIB(XonoticTextLabel, disabledAlpha, float, SKINALPHA_DISABLED) ENDCLASS(XonoticTextLabel) entity makeXonoticTextLabel(float theAlign, string theText); +entity makeXonoticHeaderLabel(string theText); #endif #ifdef IMPLEMENTATION diff --git a/qcsrc/menu/xonotic/weaponarenacheckbox.qc b/qcsrc/menu/xonotic/weaponarenacheckbox.qc index 21aa1f4e2..d86252e13 100644 --- a/qcsrc/menu/xonotic/weaponarenacheckbox.qc +++ b/qcsrc/menu/xonotic/weaponarenacheckbox.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef WEAPONARENACHECKBOX_H +#define WEAPONARENACHECKBOX_H CLASS(XonoticWeaponarenaCheckBox, CheckBox) METHOD(XonoticWeaponarenaCheckBox, configureXonoticWeaponarenaCheckBox, void(entity, string, string)) METHOD(XonoticWeaponarenaCheckBox, setChecked, void(entity, float)) diff --git a/qcsrc/menu/xonotic/weaponslist.qc b/qcsrc/menu/xonotic/weaponslist.qc index a82f2525e..d6eae6ec9 100644 --- a/qcsrc/menu/xonotic/weaponslist.qc +++ b/qcsrc/menu/xonotic/weaponslist.qc @@ -1,4 +1,5 @@ -#ifdef INTERFACE +#ifndef WEAPONSLIST_H +#define WEAPONSLIST_H CLASS(XonoticWeaponsList, XonoticListBox) METHOD(XonoticWeaponsList, configureXonoticWeaponsList, void(entity)) METHOD(XonoticWeaponsList, toString, string(entity)) -- 2.39.2