From 08ef9dbde8b5b1162a64cc4a1d34a8cb583bc411 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 17 Jun 2010 09:12:14 +0200 Subject: [PATCH] make method names more standard: now Classname_method --- qcsrc/menu/anim/animation.c | 26 ++++++------ qcsrc/menu/anim/animhost.c | 22 +++++----- qcsrc/menu/anim/easing.c | 4 +- qcsrc/menu/anim/keyframe.c | 6 +-- qcsrc/menu/auto-super.pl | 9 ++++- qcsrc/menu/item.c | 30 +++++++------- qcsrc/menu/item/borderimage.c | 6 +-- qcsrc/menu/item/button.c | 16 ++++---- qcsrc/menu/item/checkbox.c | 8 ++-- qcsrc/menu/item/container.c | 40 +++++++++---------- qcsrc/menu/item/dialog.c | 22 +++++----- qcsrc/menu/item/gecko.c | 32 +++++++-------- qcsrc/menu/item/image.c | 10 ++--- qcsrc/menu/item/inputbox.c | 22 +++++----- qcsrc/menu/item/inputcontainer.c | 16 ++++---- qcsrc/menu/item/label.c | 10 ++--- qcsrc/menu/item/listbox.c | 22 +++++----- qcsrc/menu/item/modalcontroller.c | 18 ++++----- qcsrc/menu/item/nexposee.c | 30 +++++++------- qcsrc/menu/item/radiobutton.c | 2 +- qcsrc/menu/item/slider.c | 28 ++++++------- qcsrc/menu/item/textslider.c | 12 +++--- qcsrc/menu/menu.qc | 2 +- qcsrc/menu/oo/classdefs.h | 2 +- qcsrc/menu/oo/constructors.h | 2 +- qcsrc/menu/xonotic/bigbutton.c | 2 +- qcsrc/menu/xonotic/bigcommandbutton.c | 2 +- qcsrc/menu/xonotic/button.c | 2 +- qcsrc/menu/xonotic/campaign.c | 22 +++++----- qcsrc/menu/xonotic/charmap.c | 16 ++++---- qcsrc/menu/xonotic/checkbox.c | 8 ++-- qcsrc/menu/xonotic/checkbox_slider_invalid.c | 6 +-- qcsrc/menu/xonotic/colorbutton.c | 10 ++--- qcsrc/menu/xonotic/colorpicker.c | 14 +++---- qcsrc/menu/xonotic/commandbutton.c | 2 +- qcsrc/menu/xonotic/credits.c | 12 +++--- qcsrc/menu/xonotic/crosshairbutton.c | 10 ++--- qcsrc/menu/xonotic/cvarlist.c | 12 +++--- qcsrc/menu/xonotic/demolist.c | 20 +++++----- qcsrc/menu/xonotic/dialog.c | 2 +- qcsrc/menu/xonotic/dialog_credits.c | 4 +- qcsrc/menu/xonotic/dialog_multiplayer.c | 2 +- .../menu/xonotic/dialog_multiplayer_create.c | 4 +- .../dialog_multiplayer_create_advanced.c | 6 +-- .../dialog_multiplayer_create_mapinfo.c | 4 +- .../dialog_multiplayer_create_mutators.c | 8 ++-- qcsrc/menu/xonotic/dialog_multiplayer_demo.c | 2 +- qcsrc/menu/xonotic/dialog_multiplayer_join.c | 2 +- .../dialog_multiplayer_join_serverinfo.c | 4 +- .../xonotic/dialog_multiplayer_playersetup.c | 4 +- .../dialog_multiplayer_playersetup_radar.c | 6 +-- .../dialog_multiplayer_playersetup_weapons.c | 6 +-- qcsrc/menu/xonotic/dialog_news.c | 2 +- qcsrc/menu/xonotic/dialog_quit.c | 2 +- qcsrc/menu/xonotic/dialog_settings.c | 2 +- qcsrc/menu/xonotic/dialog_settings_audio.c | 2 +- qcsrc/menu/xonotic/dialog_settings_effects.c | 2 +- qcsrc/menu/xonotic/dialog_settings_input.c | 2 +- .../xonotic/dialog_settings_input_userbind.c | 4 +- qcsrc/menu/xonotic/dialog_settings_misc.c | 2 +- .../menu/xonotic/dialog_settings_misc_cvars.c | 6 +-- qcsrc/menu/xonotic/dialog_settings_network.c | 2 +- qcsrc/menu/xonotic/dialog_settings_video.c | 2 +- qcsrc/menu/xonotic/dialog_singleplayer.c | 2 +- .../menu/xonotic/dialog_singleplayer_winner.c | 2 +- qcsrc/menu/xonotic/dialog_teamselect.c | 4 +- qcsrc/menu/xonotic/gametypebutton.c | 8 ++-- qcsrc/menu/xonotic/image.c | 2 +- qcsrc/menu/xonotic/inputbox.c | 12 +++--- qcsrc/menu/xonotic/keybinder.c | 16 ++++---- qcsrc/menu/xonotic/listbox.c | 4 +- qcsrc/menu/xonotic/mainwindow.c | 2 +- qcsrc/menu/xonotic/maplist.c | 24 +++++------ qcsrc/menu/xonotic/nexposee.c | 4 +- qcsrc/menu/xonotic/playerlist.c | 8 ++-- qcsrc/menu/xonotic/playermodel.c | 14 +++---- qcsrc/menu/xonotic/radiobutton.c | 10 ++--- qcsrc/menu/xonotic/rootdialog.c | 2 +- qcsrc/menu/xonotic/serverlist.c | 22 +++++----- qcsrc/menu/xonotic/skinlist.c | 22 +++++----- qcsrc/menu/xonotic/slider.c | 8 ++-- qcsrc/menu/xonotic/slider_decibels.c | 12 +++--- qcsrc/menu/xonotic/slider_resolution.c | 8 ++-- qcsrc/menu/xonotic/tab.c | 2 +- qcsrc/menu/xonotic/tabcontroller.c | 4 +- qcsrc/menu/xonotic/textlabel.c | 4 +- qcsrc/menu/xonotic/textslider.c | 10 ++--- qcsrc/menu/xonotic/weaponslist.c | 14 +++---- 88 files changed, 422 insertions(+), 415 deletions(-) diff --git a/qcsrc/menu/anim/animation.c b/qcsrc/menu/anim/animation.c index d6fb114c2c..99ccc78968 100644 --- a/qcsrc/menu/anim/animation.c +++ b/qcsrc/menu/anim/animation.c @@ -27,44 +27,44 @@ void setterDummy(entity, float); #endif #ifdef IMPLEMENTATION -void configureAnimationAnimation(entity me, entity obj, void(entity, float) objSetter, float animStartTime, float animDuration, float animStartValue, float animEndValue) +void Animation_configureAnimation(entity me, entity obj, void(entity, float) objSetter, float animStartTime, float animDuration, float animStartValue, float animEndValue) { me.setObjectSetter(me, obj, objSetter); me.setTimeStartDuration(me, animStartTime, animDuration); me.setValueStartEnd(me, animStartValue, animEndValue); } -void setTimeStartEndAnimation(entity me, float s, float e) +void Animation_setTimeStartEnd(entity me, float s, float e) { me.startTime = s; me.duration = e - s; } -void setTimeStartDurationAnimation(entity me, float s, float d) +void Animation_setTimeStartDuration(entity me, float s, float d) { me.startTime = s; me.duration = d; } -void setValueStartEndAnimation(entity me, float s, float e) +void Animation_setValueStartEnd(entity me, float s, float e) { me.startValue = s; me.delta = e - s; } -void setValueStartDeltaAnimation(entity me, float s, float d) +void Animation_setValueStartDelta(entity me, float s, float d) { me.startValue = s; me.delta = d; } -void setObjectSetterAnimation(entity me, entity o, void(entity, float) s) +void Animation_setObjectSetter(entity me, entity o, void(entity, float) s) { me.object = o; me.setter = s; } -void tickAnimation(entity me, float tickTime) +void Animation_tick(entity me, float tickTime) { if (me.isStopped(me) || me.isFinished(me) || (tickTime < me.startTime)) return; @@ -77,32 +77,32 @@ void tickAnimation(entity me, float tickTime) me.setter(me.object, me.value); } -float calcValueAnimation(entity me, float tickTime, float animDuration, float animStartValue, float animDelta) +float Animation_calcValue(entity me, float tickTime, float animDuration, float animStartValue, float animDelta) { return animStartValue; } -float isStoppedAnimation(entity me) +float Animation_isStopped(entity me) { return me.stopped; } -void stopAnimAnimation(entity me) +void Animation_stopAnim(entity me) { me.stopped = TRUE; } -void resumeAnimAnimation(entity me) +void Animation_resumeAnim(entity me) { me.stopped = FALSE; } -float isFinishedAnimation(entity me) +float Animation_isFinished(entity me) { return me.finished; } -void finishAnimAnimation(entity me) +void Animation_finishAnim(entity me) { me.value = me.delta + me.startValue; me.finished = TRUE; diff --git a/qcsrc/menu/anim/animhost.c b/qcsrc/menu/anim/animhost.c index 41a26d5e0d..fc345e4458 100644 --- a/qcsrc/menu/anim/animhost.c +++ b/qcsrc/menu/anim/animhost.c @@ -19,7 +19,7 @@ ENDCLASS(AnimHost) #endif #ifdef IMPLEMENTATION -void addAnimAnimHost(entity me, entity other) +void AnimHost_addAnim(entity me, entity other) { if(other.parent) error("Can't add already added anim!"); @@ -43,7 +43,7 @@ void addAnimAnimHost(entity me, entity other) me.lastChild = other; } -void removeAnimAnimHost(entity me, entity other) +void AnimHost_removeAnim(entity me, entity other) { if(other.parent != me) error("Can't remove from wrong AnimHost!"); @@ -67,7 +67,7 @@ void removeAnimAnimHost(entity me, entity other) me.lastChild = p; } -void removeAllAnimAnimHost(entity me) +void AnimHost_removeAllAnim(entity me) { entity e, tmp; for(e = me.firstChild; e; e = e.nextSibling) @@ -78,7 +78,7 @@ void removeAllAnimAnimHost(entity me) } } -void removeObjAnimAnimHost(entity me, entity obj) +void AnimHost_removeObjAnim(entity me, entity obj) { entity e, tmp; for(e = me.firstChild; e; e = e.nextSibling) @@ -92,7 +92,7 @@ void removeObjAnimAnimHost(entity me, entity obj) } } -void stopAllAnimAnimHost(entity me) +void AnimHost_stopAllAnim(entity me) { entity e; for(e = me.firstChild; e; e = e.nextSibling) @@ -101,7 +101,7 @@ void stopAllAnimAnimHost(entity me) } } -void stopObjAnimAnimHost(entity me, entity obj) +void AnimHost_stopObjAnim(entity me, entity obj) { entity e; for(e = me.firstChild; e; e = e.nextSibling) @@ -113,7 +113,7 @@ void stopObjAnimAnimHost(entity me, entity obj) } } -void resumeAllAnimAnimHost(entity me) +void AnimHost_resumeAllAnim(entity me) { entity e; for(e = me.firstChild; e; e = e.nextSibling) @@ -122,7 +122,7 @@ void resumeAllAnimAnimHost(entity me) } } -void resumeObjAnimAnimHost(entity me, entity obj) +void AnimHost_resumeObjAnim(entity me, entity obj) { entity e; for(e = me.firstChild; e; e = e.nextSibling) @@ -134,7 +134,7 @@ void resumeObjAnimAnimHost(entity me, entity obj) } } -void finishAllAnimAnimHost(entity me) +void AnimHost_finishAllAnim(entity me) { entity e, tmp; for(e = me.firstChild; e; e = e.nextSibling) @@ -146,7 +146,7 @@ void finishAllAnimAnimHost(entity me) } } -void finishObjAnimAnimHost(entity me, entity obj) +void AnimHost_finishObjAnim(entity me, entity obj) { entity e, tmp; for(e = me.firstChild; e; e = e.nextSibling) @@ -161,7 +161,7 @@ void finishObjAnimAnimHost(entity me, entity obj) } } -void tickAllAnimHost(entity me) +void AnimHost_tickAll(entity me) { entity e, tmp; for(e = me.firstChild; e; e = e.nextSibling) diff --git a/qcsrc/menu/anim/easing.c b/qcsrc/menu/anim/easing.c index f14a4be0a6..94ea9cf087 100644 --- a/qcsrc/menu/anim/easing.c +++ b/qcsrc/menu/anim/easing.c @@ -30,12 +30,12 @@ entity makeEasing(entity obj, void(entity, float) objSetter, float(float, float, return me; } -float calcValueEasing(entity me, float tickTime, float animDuration, float animStart, float animDelta) +float Easing_calcValue(entity me, float tickTime, float animDuration, float animStart, float animDelta) { return me.math(tickTime, animDuration, animStart, animDelta); } -void setMathEasing(entity me, float(float, float, float, float) func) +void Easing_setMath(entity me, float(float, float, float, float) func) { me.math = func; } diff --git a/qcsrc/menu/anim/keyframe.c b/qcsrc/menu/anim/keyframe.c index e5f27a9477..de5d54ae10 100644 --- a/qcsrc/menu/anim/keyframe.c +++ b/qcsrc/menu/anim/keyframe.c @@ -31,7 +31,7 @@ entity makeKeyframe(entity obj, void(entity, float) objSetter, float animDuratio return me; } -entity addEasingKeyframe(entity me, float animDurationTime, float animEnd, float(float, float, float, float) func) +entity Keyframe_addEasing(entity me, float animDurationTime, float animEnd, float(float, float, float, float) func) { entity other; other = makeEasing(me.object, me.setter, func, getNewChildStart(me), getNewChildDuration(me, animDurationTime), getNewChildValue(me), animEnd); @@ -65,7 +65,7 @@ float getNewChildValue(entity me) return me.startValue; } -void addAnimKeyframe(entity me, entity other) +void Keyframe_addAnim(entity me, entity other) { if(other.parent) error("Can't add already added anim!"); @@ -92,7 +92,7 @@ void addAnimKeyframe(entity me, entity other) me.lastChild = other; } -float calcValueKeyframe(entity me, float tickTime, float animDuration, float animStartValue, float animDelta) +float Keyframe_calcValue(entity me, float tickTime, float animDuration, float animStartValue, float animDelta) { if (me.currentChild) if (me.currentChild.isFinished(me.currentChild)) diff --git a/qcsrc/menu/auto-super.pl b/qcsrc/menu/auto-super.pl index 1685f5357c..9ea4bdaf25 100644 --- a/qcsrc/menu/auto-super.pl +++ b/qcsrc/menu/auto-super.pl @@ -4,6 +4,7 @@ my %baseclass = (); my %methods = (); my %attrs = (); my %methodnames = (); +my %old2new = (); print STDERR "Scanning...\n"; for my $f(@ARGV) @@ -19,7 +20,8 @@ for my $f(@ARGV) if(/^\s*METHOD\(([^),]*),\s*([^),]*)/) { $methods{$1}{$2} = $1; - $methodnames{"$2$1"} = $f; + $methodnames{"$1"."_"."$2"} = $f; + $old2new{"$2$1"} = "$1"."_"."$2"; } if(/^\s*ATTRIB(?:ARRAY)?\(([^),]*),\s*([^),]*)/) { @@ -67,6 +69,11 @@ for my $f(@ARGV) my $base = $classes{$class}; next if not defined $base; + for(keys %old2new) + { + $s =~ s/\b$_\b/$old2new{$_}/g; + } + my @methods_super = map { [ $_ . $methods{$base}{$_}, "SUPER($class).$_" ]; } keys %{$methods{$base}}; for(@methods_super) { diff --git a/qcsrc/menu/item.c b/qcsrc/menu/item.c index b249ce9eb7..497d1cf661 100644 --- a/qcsrc/menu/item.c +++ b/qcsrc/menu/item.c @@ -26,76 +26,76 @@ ENDCLASS(Item) #endif #ifdef IMPLEMENTATION -void destroyItem(entity me) +void Item_destroy(entity me) { // free memory associated with me } -void relinquishFocusItem(entity me) +void Item_relinquishFocus(entity me) { if(me.parent) if(me.parent.instanceOfContainer) me.parent.setFocus(me.parent, NULL); } -void resizeNotifyItem(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void Item_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { me.origin = absOrigin; me.size = absSize; // me.tooltip = "The quick brown fox jumped over the lazy sleeping dog's back then sat on a tack. Franz jagt im komplett verwahrlosten Taxi quer durch Bayern."; } -void drawItem(entity me) +void Item_draw(entity me) { } -void showNotifyItem(entity me) +void Item_showNotify(entity me) { } -void hideNotifyItem(entity me) +void Item_hideNotify(entity me) { } -float keyDownItem(entity me, float scan, float ascii, float shift) +float Item_keyDown(entity me, float scan, float ascii, float shift) { return 0; // unhandled } -float keyUpItem(entity me, float scan, float ascii, float shift) +float Item_keyUp(entity me, float scan, float ascii, float shift) { return 0; // unhandled } -float mouseMoveItem(entity me, vector pos) +float Item_mouseMove(entity me, vector pos) { return 0; // unhandled } -float mousePressItem(entity me, vector pos) +float Item_mousePress(entity me, vector pos) { return 0; // unhandled } -float mouseDragItem(entity me, vector pos) +float Item_mouseDrag(entity me, vector pos) { return 0; // unhandled } -float mouseReleaseItem(entity me, vector pos) +float Item_mouseRelease(entity me, vector pos) { return 0; // unhandled } -void focusEnterItem(entity me) +void Item_focusEnter(entity me) { } -void focusLeaveItem(entity me) +void Item_focusLeave(entity me) { } -string toStringItem(entity me) +string Item_toString(entity me) { return string_null; } diff --git a/qcsrc/menu/item/borderimage.c b/qcsrc/menu/item/borderimage.c index 7083f65278..0229b53a55 100644 --- a/qcsrc/menu/item/borderimage.c +++ b/qcsrc/menu/item/borderimage.c @@ -18,7 +18,7 @@ ENDCLASS(BorderImage) #endif #ifdef IMPLEMENTATION -void resizeNotifyBorderImage(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void BorderImage_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { me.isNexposeeTitleBar = 0; if(me.zoomedOutTitleBar) @@ -48,14 +48,14 @@ void resizeNotifyBorderImage(entity me, vector relOrigin, vector relSize, vector me.closeButton.colorF = me.color; } } -void configureBorderImageBorderImage(entity me, string theTitle, float sz, vector theColor, string path, float theBorderHeight) +void BorderImage_configureBorderImage(entity me, string theTitle, float sz, vector theColor, string path, float theBorderHeight) { me.configureLabel(me, theTitle, sz, 0.5); me.src = path; me.color = theColor; me.borderHeight = theBorderHeight; } -void drawBorderImage(entity me) +void BorderImage_draw(entity me) { //print(vtos(me.borderVec), "\n"); diff --git a/qcsrc/menu/item/button.c b/qcsrc/menu/item/button.c index b63928fd46..728413135a 100644 --- a/qcsrc/menu/item/button.c +++ b/qcsrc/menu/item/button.c @@ -35,7 +35,7 @@ ENDCLASS(Button) #endif #ifdef IMPLEMENTATION -void resizeNotifyButton(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void Button_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { if(me.srcMulti) me.keepspaceLeft = 0; @@ -43,12 +43,12 @@ void resizeNotifyButton(entity me, vector relOrigin, vector relSize, vector absO me.keepspaceLeft = min(0.8, absSize_y / absSize_x); SUPER(Button).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); } -void configureButtonButton(entity me, string txt, float sz, string gfx) +void Button_configureButton(entity me, string txt, float sz, string gfx) { SUPER(Button).configureLabel(me, txt, sz, me.srcMulti ? 0.5 : 0); me.src = gfx; } -float keyDownButton(entity me, float key, float ascii, float shift) +float Button_keyDown(entity me, float key, float ascii, float shift) { if(key == K_ENTER || key == K_SPACE) { @@ -57,7 +57,7 @@ float keyDownButton(entity me, float key, float ascii, float shift) } return 0; } -float mouseDragButton(entity me, vector pos) +float Button_mouseDrag(entity me, vector pos) { me.pressed = 1; if(pos_x < 0) me.pressed = 0; @@ -66,14 +66,14 @@ float mouseDragButton(entity me, vector pos) if(pos_y >= 1) me.pressed = 0; return 1; } -float mousePressButton(entity me, vector pos) +float Button_mousePress(entity me, vector pos) { me.mouseDrag(me, pos); // verify coordinates if(cvar("menu_sounds")) localsound("sound/misc/menu2.wav"); return 1; } -float mouseReleaseButton(entity me, vector pos) +float Button_mouseRelease(entity me, vector pos) { me.mouseDrag(me, pos); // verify coordinates if(me.pressed) @@ -84,12 +84,12 @@ float mouseReleaseButton(entity me, vector pos) } return 1; } -void showNotifyButton(entity me) +void Button_showNotify(entity me) { me.focusable = !me.disabled; } .float playedfocus; -void drawButton(entity me) +void Button_draw(entity me) { vector bOrigin, bSize; float save; diff --git a/qcsrc/menu/item/checkbox.c b/qcsrc/menu/item/checkbox.c index adbedf95a5..5ae92d6122 100644 --- a/qcsrc/menu/item/checkbox.c +++ b/qcsrc/menu/item/checkbox.c @@ -14,7 +14,7 @@ ENDCLASS(CheckBox) #endif #ifdef IMPLEMENTATION -void setCheckedCheckBox(entity me, float val) +void CheckBox_setChecked(entity me, float val) { me.checked = val; } @@ -22,16 +22,16 @@ void CheckBox_Click(entity me, entity other) { me.setChecked(me, !me.checked); } -string toStringCheckBox(entity me) +string CheckBox_toString(entity me) { return strcat(SUPER(CheckBox).toString(me), ", ", me.checked ? "checked" : "unchecked"); } -void configureCheckBoxCheckBox(entity me, string txt, float sz, string gfx) +void CheckBox_configureCheckBox(entity me, string txt, float sz, string gfx) { me.configureButton(me, txt, sz, gfx); me.align = 0; } -void drawCheckBox(entity me) +void CheckBox_draw(entity me) { float s; s = me.pressed; diff --git a/qcsrc/menu/item/container.c b/qcsrc/menu/item/container.c index 0984b3718d..b29eea0b80 100644 --- a/qcsrc/menu/item/container.c +++ b/qcsrc/menu/item/container.c @@ -36,7 +36,7 @@ ENDCLASS(Container) #endif #ifdef IMPLEMENTATION -void showNotifyContainer(entity me) +void Container_showNotify(entity me) { entity e; if(me.shown) @@ -47,7 +47,7 @@ void showNotifyContainer(entity me) e.showNotify(e); } -void hideNotifyContainer(entity me) +void Container_hideNotify(entity me) { entity e; if not(me.shown) @@ -58,7 +58,7 @@ void hideNotifyContainer(entity me) e.hideNotify(e); } -void setAlphaOfContainer(entity me, entity other, float theAlpha) +void Container_setAlphaOf(entity me, entity other, float theAlpha) { if(theAlpha <= 0) { @@ -73,7 +73,7 @@ void setAlphaOfContainer(entity me, entity other, float theAlpha) other.Container_alpha = theAlpha; } -void resizeNotifyLieContainer(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize, .vector originField, .vector sizeField) +void Container_resizeNotifyLie(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize, .vector originField, .vector sizeField) { entity e; vector o, s; @@ -101,12 +101,12 @@ void resizeNotifyLieContainer(entity me, vector relOrigin, vector relSize, vecto SUPER(Container).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); } -void resizeNotifyContainer(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void Container_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { me.resizeNotifyLie(me, relOrigin, relSize, absOrigin, absSize, Container_origin, Container_size); } -entity itemFromPointContainer(entity me, vector pos) +entity Container_itemFromPoint(entity me, vector pos) { entity e; vector o, s; @@ -123,7 +123,7 @@ entity itemFromPointContainer(entity me, vector pos) return NULL; } -void drawContainer(entity me) +void Container_draw(entity me) { vector oldshift; vector oldscale; @@ -155,12 +155,12 @@ void drawContainer(entity me) } }; -void focusLeaveContainer(entity me) +void Container_focusLeave(entity me) { me.setFocus(me, NULL); } -float keyUpContainer(entity me, float scan, float ascii, float shift) +float Container_keyUp(entity me, float scan, float ascii, float shift) { entity f; f = me.focusedChild; @@ -169,7 +169,7 @@ float keyUpContainer(entity me, float scan, float ascii, float shift) return 0; } -float keyDownContainer(entity me, float scan, float ascii, float shift) +float Container_keyDown(entity me, float scan, float ascii, float shift) { entity f; f = me.focusedChild; @@ -178,7 +178,7 @@ float keyDownContainer(entity me, float scan, float ascii, float shift) return 0; } -float mouseMoveContainer(entity me, vector pos) +float Container_mouseMove(entity me, vector pos) { entity f; f = me.focusedChild; @@ -186,7 +186,7 @@ float mouseMoveContainer(entity me, vector pos) return f.mouseMove(f, globalToBox(pos, f.Container_origin, f.Container_size)); return 0; } -float mousePressContainer(entity me, vector pos) +float Container_mousePress(entity me, vector pos) { entity f; f = me.focusedChild; @@ -194,7 +194,7 @@ float mousePressContainer(entity me, vector pos) return f.mousePress(f, globalToBox(pos, f.Container_origin, f.Container_size)); return 0; } -float mouseDragContainer(entity me, vector pos) +float Container_mouseDrag(entity me, vector pos) { entity f; f = me.focusedChild; @@ -202,7 +202,7 @@ float mouseDragContainer(entity me, vector pos) return f.mouseDrag(f, globalToBox(pos, f.Container_origin, f.Container_size)); return 0; } -float mouseReleaseContainer(entity me, vector pos) +float Container_mouseRelease(entity me, vector pos) { entity f; f = me.focusedChild; @@ -211,12 +211,12 @@ float mouseReleaseContainer(entity me, vector pos) return 0; } -void addItemCenteredContainer(entity me, entity other, vector theSize, float theAlpha) +void Container_addItemCentered(entity me, entity other, vector theSize, float theAlpha) { me.addItem(me, other, '0.5 0.5 0' - 0.5 * theSize, theSize, theAlpha); } -void addItemContainer(entity me, entity other, vector theOrigin, vector theSize, float theAlpha) +void Container_addItem(entity me, entity other, vector theOrigin, vector theSize, float theAlpha) { if(other.parent) error("Can't add already added item!"); @@ -258,7 +258,7 @@ void addItemContainer(entity me, entity other, vector theOrigin, vector theSize, draw_NeedResizeNotify = 1; } -void removeItemContainer(entity me, entity other) +void Container_removeItem(entity me, entity other) { if(other.parent != me) error("Can't remove from wrong container!"); @@ -285,7 +285,7 @@ void removeItemContainer(entity me, entity other) me.lastChild = p; } -void setFocusContainer(entity me, entity other) +void Container_setFocus(entity me, entity other) { if(other) if not(me.focused) @@ -306,7 +306,7 @@ void setFocusContainer(entity me, entity other) me.focusedChild = other; } -void moveItemAfterContainer(entity me, entity other, entity dest) +void Container_moveItemAfter(entity me, entity other, entity dest) { // first: remove other from the chain entity n, p, f, l; @@ -347,7 +347,7 @@ void moveItemAfterContainer(entity me, entity other, entity dest) me.lastChild = other; } -entity preferredFocusedGrandChildContainer(entity me) +entity Container_preferredFocusedGrandChild(entity me) { entity e, e2; entity best; diff --git a/qcsrc/menu/item/dialog.c b/qcsrc/menu/item/dialog.c index 20651f87fc..8202fbbb67 100644 --- a/qcsrc/menu/item/dialog.c +++ b/qcsrc/menu/item/dialog.c @@ -71,11 +71,11 @@ void Dialog_Close(entity button, entity me) me.close(me); } -void fillDialog(entity me) +void Dialog_fill(entity me) { } -void addItemSimpleDialog(entity me, float row, float col, float rowspan, float colspan, entity e, vector v) +void Dialog_addItemSimple(entity me, float row, float col, float rowspan, float colspan, entity e, vector v) { //print(vtos(me.itemSpacing), " ", vtos(me.itemSize), "\n"); vector o, s; @@ -88,41 +88,41 @@ void addItemSimpleDialog(entity me, float row, float col, float rowspan, float c me.addItem(me, e, o, s, 1); } -void gotoRCDialog(entity me, float row, float col) +void Dialog_gotoRC(entity me, float row, float col) { me.currentRow = row; me.currentColumn = col; } -void TRDialog(entity me) +void Dialog_TR(entity me) { me.currentRow += 1; me.currentColumn = me.firstColumn; } -void TDDialog(entity me, float rowspan, float colspan, entity e) +void Dialog_TD(entity me, float rowspan, float colspan, entity e) { me.addItemSimple(me, me.currentRow, me.currentColumn, rowspan, colspan, e, '0 0 0'); me.currentColumn += colspan; } -void TDNoMarginDialog(entity me, float rowspan, float colspan, entity e, vector v) +void Dialog_TDNoMargin(entity me, float rowspan, float colspan, entity e, vector v) { me.addItemSimple(me, me.currentRow, me.currentColumn, rowspan, colspan, e, v); me.currentColumn += colspan; } -void setFirstColumnDialog(entity me, float col) +void Dialog_setFirstColumn(entity me, float col) { me.firstColumn = col; } -void TDemptyDialog(entity me, float colspan) +void Dialog_TDempty(entity me, float colspan) { me.currentColumn += colspan; } -void configureDialogDialog(entity me) +void Dialog_configureDialog(entity me) { entity closebutton; float absWidth, absHeight; @@ -164,7 +164,7 @@ void configureDialogDialog(entity me) me.frame.closeButton = closebutton; } -void closeDialog(entity me) +void Dialog_close(entity me) { if(me.parent.instanceOfNexposee) { @@ -176,7 +176,7 @@ void closeDialog(entity me) } } -float keyDownDialog(entity me, float key, float ascii, float shift) +float Dialog_keyDown(entity me, float key, float ascii, float shift) { if(me.closable) { diff --git a/qcsrc/menu/item/gecko.c b/qcsrc/menu/item/gecko.c index 5f30912636..139e87e1a0 100644 --- a/qcsrc/menu/item/gecko.c +++ b/qcsrc/menu/item/gecko.c @@ -1,15 +1,15 @@ // Andreas Kirsch Gecko item (to test it) #ifdef INTERFACE CLASS(Gecko) EXTENDS(Item) - METHOD( Gecko, configureBrowser, void( entity, string ) ) - METHOD( Gecko, draw, void(entity)) - METHOD( Gecko, keyDown, float(entity, float, float, float)) - METHOD( Gecko, keyUp, float(entity, float, float, float)) - METHOD( Gecko, mouseMove, float(entity, vector)) - METHOD( Gecko, mouseDrag, float(entity, vector)) - METHOD( Gecko, resizeNotify, void(entity, vector, vector, vector, vector)) - ATTRIB( Gecko, texturePath, string, string_null ) - ATTRIB( Gecko, textureExtent, vector, '0 0 0') + METHOD(Gecko, configureBrowser, void( entity, string ) ) + METHOD(Gecko, draw, void(entity)) + METHOD(Gecko, keyDown, float(entity, float, float, float)) + METHOD(Gecko, keyUp, float(entity, float, float, float)) + METHOD(Gecko, mouseMove, float(entity, vector)) + METHOD(Gecko, mouseDrag, float(entity, vector)) + METHOD(Gecko, resizeNotify, void(entity, vector, vector, vector, vector)) + ATTRIB(Gecko, texturePath, string, string_null ) + ATTRIB(Gecko, textureExtent, vector, '0 0 0') ENDCLASS(Gecko) #endif @@ -17,7 +17,7 @@ ENDCLASS(Gecko) // define static members float _gecko_instanceNumber; -void configureBrowserGecko( entity me, string URI ) { +void Gecko_configureBrowser( entity me, string URI ) { me.focusable = 1; //create a new gecko object if needed @@ -30,7 +30,7 @@ void configureBrowserGecko( entity me, string URI ) { gecko_navigate( me.texturePath, URI ); } -void drawGecko(entity me) +void Gecko_draw(entity me) { vector drawSize; @@ -50,7 +50,7 @@ void drawGecko(entity me) } } -float keyDownGecko(entity me, float scan, float ascii, float shift) +float Gecko_keyDown(entity me, float scan, float ascii, float shift) { if( scan == K_ESCAPE ) { return 0; @@ -61,7 +61,7 @@ float keyDownGecko(entity me, float scan, float ascii, float shift) return gecko_keyevent( me.texturePath, scan, GECKO_BUTTON_DOWN ); } -float keyUpGecko(entity me, float scan, float ascii, float shift) +float Gecko_keyUp(entity me, float scan, float ascii, float shift) { if (ascii >= 32) return gecko_keyevent( me.texturePath, ascii, GECKO_BUTTON_UP ); @@ -69,19 +69,19 @@ float keyUpGecko(entity me, float scan, float ascii, float shift) return gecko_keyevent( me.texturePath, scan, GECKO_BUTTON_UP ); } -float mouseMoveGecko(entity me, vector pos) +float Gecko_mouseMove(entity me, vector pos) { gecko_mousemove( me.texturePath, pos_x, pos_y ); return 1; } -float mouseDragGecko(entity me, vector pos) +float Gecko_mouseDrag(entity me, vector pos) { gecko_mousemove( me.texturePath, pos_x, pos_y ); return 1; } -void resizeNotifyGecko(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void Gecko_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { SUPER(Gecko).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); gecko_resize( me.texturePath, absSize_x, absSize_y ); diff --git a/qcsrc/menu/item/image.c b/qcsrc/menu/item/image.c index e44f39efbb..c64561b39b 100644 --- a/qcsrc/menu/item/image.c +++ b/qcsrc/menu/item/image.c @@ -14,19 +14,19 @@ ENDCLASS(Image) #endif #ifdef IMPLEMENTATION -string toStringImage(entity me) +string Image_toString(entity me) { return me.src; } -void configureImageImage(entity me, string path) +void Image_configureImage(entity me, string path) { me.src = path; } -void drawImage(entity me) +void Image_draw(entity me) { draw_Picture(me.imgOrigin, me.src, me.imgSize, me.color, 1); } -void updateAspectImage(entity me) +void Image_updateAspect(entity me) { float asp; if(me.size_x <= 0 || me.size_y <= 0) @@ -59,7 +59,7 @@ void updateAspectImage(entity me) me.imgOrigin = '0.5 0.5 0' - 0.5 * me.imgSize; } } -void resizeNotifyImage(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void Image_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { SUPER(Image).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); me.updateAspect(me); diff --git a/qcsrc/menu/item/inputbox.c b/qcsrc/menu/item/inputbox.c index e34e5ff529..cb1b32e8b1 100644 --- a/qcsrc/menu/item/inputbox.c +++ b/qcsrc/menu/item/inputbox.c @@ -31,14 +31,14 @@ void InputBox_Clear_Click(entity btn, entity me); #endif #ifdef IMPLEMENTATION -void configureInputBoxInputBox(entity me, string theText, float theCursorPos, float theFontSize, string gfx) +void InputBox_configureInputBox(entity me, string theText, float theCursorPos, float theFontSize, string gfx) { SUPER(InputBox).configureLabel(me, theText, theFontSize, 0.0); me.src = gfx; me.cursorPos = theCursorPos; } -void setTextInputBox(entity me, string txt) +void InputBox_setText(entity me, string txt) { if(me.text) strunzone(me.text); @@ -50,7 +50,7 @@ void InputBox_Clear_Click(entity btn, entity me) me.setText(me, ""); } -float mouseDragInputBox(entity me, vector pos) +float InputBox_mouseDrag(entity me, vector pos) { float p; me.dragScrollPos = pos; @@ -60,20 +60,20 @@ float mouseDragInputBox(entity me, vector pos) return 1; } -float mousePressInputBox(entity me, vector pos) +float InputBox_mousePress(entity me, vector pos) { me.dragScrollTimer = time; me.pressed = 1; - return mouseDragInputBox(me, pos); + return InputBox_mouseDrag(me, pos); } -float mouseReleaseInputBox(entity me, vector pos) +float InputBox_mouseRelease(entity me, vector pos) { me.pressed = 0; - return mouseDragInputBox(me, pos); + return InputBox_mouseDrag(me, pos); } -void enterTextInputBox(entity me, string ch) +void InputBox_enterText(entity me, string ch) { float i; for(i = 0; i < strlen(ch); ++i) @@ -85,7 +85,7 @@ void enterTextInputBox(entity me, string ch) me.cursorPos += strlen(ch); } -float keyDownInputBox(entity me, float key, float ascii, float shift) +float InputBox_keyDown(entity me, float key, float ascii, float shift) { me.lastChangeTime = time; me.dragScrollTimer = time; @@ -125,7 +125,7 @@ float keyDownInputBox(entity me, float key, float ascii, float shift) return 0; } -void drawInputBox(entity me) +void InputBox_draw(entity me) { #define CURSOR "_" float cursorPosInWidths, totalSizeInWidths; @@ -310,7 +310,7 @@ void drawInputBox(entity me) draw_ClearClip(); } -void showNotifyInputBox(entity me) +void InputBox_showNotify(entity me) { me.focusable = !me.disabled; } diff --git a/qcsrc/menu/item/inputcontainer.c b/qcsrc/menu/item/inputcontainer.c index 8582202a7d..e1b14d3b16 100644 --- a/qcsrc/menu/item/inputcontainer.c +++ b/qcsrc/menu/item/inputcontainer.c @@ -15,7 +15,7 @@ ENDCLASS(InputContainer) #endif #ifdef IMPLEMENTATION -void resizeNotifyInputContainer(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void InputContainer_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { SUPER(InputContainer).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); /* @@ -26,13 +26,13 @@ void resizeNotifyInputContainer(entity me, vector relOrigin, vector relSize, vec */ } -void focusLeaveInputContainer(entity me) +void InputContainer_focusLeave(entity me) { SUPER(InputContainer).focusLeave(me); me.mouseFocusedChild = NULL; } -float keyDownInputContainer(entity me, float scan, float ascii, float shift) +float InputContainer_keyDown(entity me, float scan, float ascii, float shift) { entity f, ff; if(SUPER(InputContainer).keyDown(me, scan, ascii, shift)) @@ -102,7 +102,7 @@ float keyDownInputContainer(entity me, float scan, float ascii, float shift) return 0; } -float _changeFocusXYInputContainer(entity me, vector pos) +float InputContainer__changeFocusXY(entity me, vector pos) { entity e, ne; e = me.mouseFocusedChild; @@ -124,7 +124,7 @@ float _changeFocusXYInputContainer(entity me, vector pos) return (ne != NULL); } -float mouseDragInputContainer(entity me, vector pos) +float InputContainer_mouseDrag(entity me, vector pos) { if(SUPER(InputContainer).mouseDrag(me, pos)) return 1; @@ -132,7 +132,7 @@ float mouseDragInputContainer(entity me, vector pos) return 1; return 0; } -float mouseMoveInputContainer(entity me, vector pos) +float InputContainer_mouseMove(entity me, vector pos) { if(me._changeFocusXY(me, pos)) if(SUPER(InputContainer).mouseMove(me, pos)) @@ -141,7 +141,7 @@ float mouseMoveInputContainer(entity me, vector pos) return 1; return 0; } -float mousePressInputContainer(entity me, vector pos) +float InputContainer_mousePress(entity me, vector pos) { me.mouseFocusedChild = NULL; // force focusing if(me._changeFocusXY(me, pos)) @@ -151,7 +151,7 @@ float mousePressInputContainer(entity me, vector pos) return 1; return 0; } -float mouseReleaseInputContainer(entity me, vector pos) +float InputContainer_mouseRelease(entity me, vector pos) { float r; r = SUPER(InputContainer).mouseRelease(me, pos); diff --git a/qcsrc/menu/item/label.c b/qcsrc/menu/item/label.c index 279b92ac57..5a6bb1c697 100644 --- a/qcsrc/menu/item/label.c +++ b/qcsrc/menu/item/label.c @@ -26,16 +26,16 @@ ENDCLASS(Label) #endif #ifdef IMPLEMENTATION -string toStringLabel(entity me) +string Label_toString(entity me) { return me.text; } -void setTextLabel(entity me, string txt) +void Label_setText(entity me, string txt) { me.text = txt; me.realOrigin_x = me.align * (1 - me.keepspaceLeft - me.keepspaceRight - min(draw_TextWidth(me.text, me.allowColors, me.realFontSize), (1 - me.keepspaceLeft - me.keepspaceRight))) + me.keepspaceLeft; } -void resizeNotifyLabel(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void Label_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { SUPER(Label).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); // absSize_y is height of label @@ -48,13 +48,13 @@ void resizeNotifyLabel(entity me, vector relOrigin, vector relSize, vector absOr me.realOrigin_x = me.align * (1 - me.keepspaceLeft - me.keepspaceRight - min(draw_TextWidth(me.text, me.allowColors, me.realFontSize), (1 - me.keepspaceLeft - me.keepspaceRight))) + me.keepspaceLeft; me.realOrigin_y = 0.5 * (1 - me.realFontSize_y); } -void configureLabelLabel(entity me, string txt, float sz, float algn) +void Label_configureLabel(entity me, string txt, float sz, float algn) { me.fontSize = sz; me.align = algn; me.setText(me, txt); } -void drawLabel(entity me) +void Label_draw(entity me) { string t; vector o; diff --git a/qcsrc/menu/item/listbox.c b/qcsrc/menu/item/listbox.c index 8b572fc0a2..3dd873c33a 100644 --- a/qcsrc/menu/item/listbox.c +++ b/qcsrc/menu/item/listbox.c @@ -41,21 +41,21 @@ ENDCLASS(ListBox) #endif #ifdef IMPLEMENTATION -void setSelectedListBox(entity me, float i) +void ListBox_setSelected(entity me, float i) { me.selectedItem = floor(0.5 + bound(0, i, me.nItems - 1)); } -void resizeNotifyListBox(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void ListBox_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { SUPER(ListBox).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); me.controlWidth = me.scrollbarWidth / absSize_x; } -void configureListBoxListBox(entity me, float theScrollbarWidth, float theItemHeight) +void ListBox_configureListBox(entity me, float theScrollbarWidth, float theItemHeight) { me.scrollbarWidth = theScrollbarWidth; me.itemHeight = theItemHeight; } -float keyDownListBox(entity me, float key, float ascii, float shift) +float ListBox_keyDown(entity me, float key, float ascii, float shift) { me.dragScrollTimer = time; if(key == K_MWHEELUP) @@ -90,7 +90,7 @@ float keyDownListBox(entity me, float key, float ascii, float shift) return 0; return 1; } -float mouseDragListBox(entity me, vector pos) +float ListBox_mouseDrag(entity me, vector pos) { float hit; float i; @@ -124,7 +124,7 @@ float mouseDragListBox(entity me, vector pos) } return 1; } -float mousePressListBox(entity me, vector pos) +float ListBox_mousePress(entity me, vector pos) { if(pos_x < 0) return 0; if(pos_y < 0) return 0; @@ -164,7 +164,7 @@ float mousePressListBox(entity me, vector pos) } return 1; } -float mouseReleaseListBox(entity me, vector pos) +float ListBox_mouseRelease(entity me, vector pos) { vector absSize; if(me.pressed == 1) @@ -188,7 +188,7 @@ float mouseReleaseListBox(entity me, vector pos) me.pressed = 0; return 1; } -void updateControlTopBottomListBox(entity me) +void ListBox_updateControlTopBottom(entity me) { float f; // scrollPos is in 0..1 and indicates where the "page" currently shown starts. @@ -238,7 +238,7 @@ void updateControlTopBottomListBox(entity me) } } } -void drawListBox(entity me) +void ListBox_draw(entity me) { float i; vector absSize, fillSize; @@ -282,12 +282,12 @@ void drawListBox(entity me) draw_ClearClip(); } -void clickListBoxItemListBox(entity me, float i, vector where) +void ListBox_clickListBoxItem(entity me, float i, vector where) { // itemclick, itemclick, does whatever itemclick does } -void drawListBoxItemListBox(entity me, float i, vector absSize, float selected) +void ListBox_drawListBoxItem(entity me, float i, vector absSize, float selected) { draw_Text('0 0 0', strcat("Item ", ftos(i)), eX * (8 / absSize_x) + eY * (8 / absSize_y), (selected ? '0 1 0' : '1 1 1'), 1, 0); } diff --git a/qcsrc/menu/item/modalcontroller.c b/qcsrc/menu/item/modalcontroller.c index d47c2dcef7..4bc2fb9bde 100644 --- a/qcsrc/menu/item/modalcontroller.c +++ b/qcsrc/menu/item/modalcontroller.c @@ -59,7 +59,7 @@ void DialogCloseButton_Click(entity button, entity tab); // assumes a button has .float ModalController_factor; .entity ModalController_controllingButton; -void initializeDialogModalController(entity me, entity root) +void ModalController_initializeDialog(entity me, entity root) { me.hideAll(me, 1); me.showChild(me, root, '0 0 0', '0 0 0', 1); // someone else animates for us @@ -95,12 +95,12 @@ void DialogCloseButton_Click(entity button, entity tab) tab.parent.hideChild(tab.parent, tab, 0); } -void resizeNotifyModalController(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void ModalController_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { me.resizeNotifyLie(me, relOrigin, relSize, absOrigin, absSize, ModalController_initialOrigin, ModalController_initialSize); } -void switchStateModalController(entity me, entity other, float state, float skipAnimation) +void ModalController_switchState(entity me, entity other, float state, float skipAnimation) { float previousState; previousState = other.ModalController_state; @@ -131,7 +131,7 @@ void switchStateModalController(entity me, entity other, float state, float skip other.ModalController_factor = 1; } -void drawModalController(entity me) +void ModalController_draw(entity me) { entity e; entity front; @@ -225,7 +225,7 @@ void drawModalController(entity me) SUPER(ModalController).draw(me); }; -void addTabModalController(entity me, entity other, entity tabButton) +void ModalController_addTab(entity me, entity other, entity tabButton) { me.addItem(me, other, '0 0 0', '1 1 1', 1); tabButton.onClick = TabButton_Click; @@ -239,7 +239,7 @@ void addTabModalController(entity me, entity other, entity tabButton) } } -void addItemModalController(entity me, entity other, vector theOrigin, vector theSize, float theAlpha) +void ModalController_addItem(entity me, entity other, vector theOrigin, vector theSize, float theAlpha) { SUPER(ModalController).addItem(me, other, theOrigin, theSize, (other == me.firstChild) ? theAlpha : 0); other.ModalController_initialSize = other.Container_size; @@ -247,7 +247,7 @@ void addItemModalController(entity me, entity other, vector theOrigin, vector th other.ModalController_initialAlpha = theAlpha; // hope Container never modifies this } -void showChildModalController(entity me, entity other, vector theOrigin, vector theSize, float skipAnimation) +void ModalController_showChild(entity me, entity other, vector theOrigin, vector theSize, float skipAnimation) { if(other.ModalController_state == 0 || skipAnimation) { @@ -261,14 +261,14 @@ void showChildModalController(entity me, entity other, vector theOrigin, vector } // zoom in from button (factor increases) } -void hideAllModalController(entity me, float skipAnimation) +void ModalController_hideAll(entity me, float skipAnimation) { entity e; for(e = me.firstChild; e; e = e.nextSibling) me.hideChild(me, e, skipAnimation); } -void hideChildModalController(entity me, entity other, float skipAnimation) +void ModalController_hideChild(entity me, entity other, float skipAnimation) { if(other.ModalController_state || skipAnimation) { diff --git a/qcsrc/menu/item/nexposee.c b/qcsrc/menu/item/nexposee.c index 3c8efb0dae..c9232b192d 100644 --- a/qcsrc/menu/item/nexposee.c +++ b/qcsrc/menu/item/nexposee.c @@ -46,7 +46,7 @@ void ExposeeCloseButton_Click(entity button, entity other); // un-exposees the c .vector Nexposee_align; .float Nexposee_animationFactor; -void closeNexposee(entity me) +void Nexposee_close(entity me) { // user must override this } @@ -58,7 +58,7 @@ void ExposeeCloseButton_Click(entity button, entity other) other.animationState = 3; } -void resizeNotifyNexposee(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void Nexposee_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { me.calc(me); me.resizeNotifyLie(me, relOrigin, relSize, absOrigin, absSize, Nexposee_initialOrigin, Nexposee_initialSize); @@ -82,7 +82,7 @@ void Nexposee_Calc_Scale(entity me, float scale) } } -void calcNexposee(entity me) +void Nexposee_calc(entity me) { /* * patented by Apple @@ -127,7 +127,7 @@ void calcNexposee(entity me) Nexposee_Calc_Scale(me, scale); } -void setNexposeeNexposee(entity me, entity other, vector scalecenter, float a0, float a1) +void Nexposee_setNexposee(entity me, entity other, vector scalecenter, float a0, float a1) { other.Nexposee_scaleCenter = scalecenter; other.Nexposee_smallAlpha = a0; @@ -135,7 +135,7 @@ void setNexposeeNexposee(entity me, entity other, vector scalecenter, float a0, other.Nexposee_mediumAlpha = a1; } -void drawNexposee(entity me) +void Nexposee_draw(entity me) { float a; float a0; @@ -209,12 +209,12 @@ void drawNexposee(entity me) SUPER(Nexposee).draw(me); }; -float mousePressNexposee(entity me, vector pos) +float Nexposee_mousePress(entity me, vector pos) { if(me.animationState == 0) { me.mouseFocusedChild = NULL; - mouseMoveNexposee(me, pos); + Nexposee_mouseMove(me, pos); if(me.mouseFocusedChild) { me.animationState = 1; @@ -236,21 +236,21 @@ float mousePressNexposee(entity me, vector pos) return 0; } -float mouseReleaseNexposee(entity me, vector pos) +float Nexposee_mouseRelease(entity me, vector pos) { if(me.animationState == 2) return SUPER(Nexposee).mouseRelease(me, pos); return 0; } -float mouseDragNexposee(entity me, vector pos) +float Nexposee_mouseDrag(entity me, vector pos) { if(me.animationState == 2) return SUPER(Nexposee).mouseDrag(me, pos); return 0; } -float mouseMoveNexposee(entity me, vector pos) +float Nexposee_mouseMove(entity me, vector pos) { entity e; me.mousePosition = pos; @@ -268,14 +268,14 @@ float mouseMoveNexposee(entity me, vector pos) return 0; } -float keyUpNexposee(entity me, float scan, float ascii, float shift) +float Nexposee_keyUp(entity me, float scan, float ascii, float shift) { if(me.animationState == 2) return SUPER(Nexposee).keyUp(me, scan, ascii, shift); return 0; } -float keyDownNexposee(entity me, float scan, float ascii, float shift) +float Nexposee_keyDown(entity me, float scan, float ascii, float shift) { float nexposeeKey; if(me.animationState == 2) @@ -335,7 +335,7 @@ float keyDownNexposee(entity me, float scan, float ascii, float shift) return 0; } -void addItemNexposee(entity me, entity other, vector theOrigin, vector theSize, float theAlpha) +void Nexposee_addItem(entity me, entity other, vector theOrigin, vector theSize, float theAlpha) { SUPER(Nexposee).addItem(me, other, theOrigin, theSize, theAlpha); other.Nexposee_initialSize = other.Container_size; @@ -343,13 +343,13 @@ void addItemNexposee(entity me, entity other, vector theOrigin, vector theSize, other.Nexposee_initialAlpha = other.Container_alpha; } -void focusEnterNexposee(entity me) +void Nexposee_focusEnter(entity me) { if(me.animationState == 2) SUPER(Nexposee).setFocus(me, me.selectedChild); } -void pullNexposeeNexposee(entity me, entity other, vector theAlign) +void Nexposee_pullNexposee(entity me, entity other, vector theAlign) { other.Nexposee_align = theAlign; } diff --git a/qcsrc/menu/item/radiobutton.c b/qcsrc/menu/item/radiobutton.c index 34ef101a70..80fd5329b4 100644 --- a/qcsrc/menu/item/radiobutton.c +++ b/qcsrc/menu/item/radiobutton.c @@ -10,7 +10,7 @@ ENDCLASS(RadioButton) #endif #ifdef IMPLEMENTATION -void configureRadioButtonRadioButton(entity me, string txt, float sz, string gfx, float theGroup, float doAllowDeselect) +void RadioButton_configureRadioButton(entity me, string txt, float sz, string gfx, float theGroup, float doAllowDeselect) { me.configureCheckBox(me, txt, sz, gfx); me.align = 0; diff --git a/qcsrc/menu/item/slider.c b/qcsrc/menu/item/slider.c index 26c240f9f4..92f3b55fe1 100644 --- a/qcsrc/menu/item/slider.c +++ b/qcsrc/menu/item/slider.c @@ -44,44 +44,44 @@ ENDCLASS(Slider) #endif #ifdef IMPLEMENTATION -void setValueSlider(entity me, float val) +void Slider_setValue(entity me, float val) { if (me.animated) { anim.stopObjAnim(anim, me); anim.removeObjAnim(anim, me); - makeHostedEasing(me, setSliderValueSlider, easingQuadInOut, 1, me.sliderValue, val); + makeHostedEasing(me, Slider_setSliderValue, easingQuadInOut, 1, me.sliderValue, val); } else { me.setSliderValue(me, val); } me.value = val; } -void setSliderValueSlider(entity me, float val) +void Slider_setSliderValue(entity me, float val) { me.sliderValue = val; } -string toStringSlider(entity me) +string Slider_toString(entity me) { return strcat(ftos(me.value), " (", me.valueToText(me, me.value), ")"); } -void resizeNotifySlider(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void Slider_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { SUPER(Slider).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); me.controlWidth = absSize_y / absSize_x; } -string valueToTextSlider(entity me, float val) +string Slider_valueToText(entity me, float val) { if(almost_in_bounds(me.valueMin, val, me.valueMax)) return ftos_decimals(val * me.valueDisplayMultiplier, me.valueDigits); return ""; } -void configureSliderVisualsSlider(entity me, float sz, float theAlign, float theTextSpace, string gfx) +void Slider_configureSliderVisuals(entity me, float sz, float theAlign, float theTextSpace, string gfx) { SUPER(Slider).configureLabel(me, string_null, sz, theAlign); me.textSpace = theTextSpace; me.keepspaceLeft = (theTextSpace == 0) ? 0 : (1 - theTextSpace); me.src = gfx; } -void configureSliderValuesSlider(entity me, float theValueMin, float theValue, float theValueMax, float theValueStep, float theValueKeyStep, float theValuePageStep) +void Slider_configureSliderValues(entity me, float theValueMin, float theValue, float theValueMax, float theValueStep, float theValueKeyStep, float theValuePageStep) { me.value = theValue; me.sliderValue = theValue; @@ -98,7 +98,7 @@ void configureSliderValuesSlider(entity me, float theValueMin, float theValue, f if(fabs(floor(me.valueStep * 1 + 0.5) - (me.valueStep * 1)) < 0.01) // about a whole number me.valueDigits = 0; } -float keyDownSlider(entity me, float key, float ascii, float shift) +float Slider_keyDown(entity me, float key, float ascii, float shift) { float inRange; if(me.disabled) @@ -149,7 +149,7 @@ float keyDownSlider(entity me, float key, float ascii, float shift) // TODO more keys return 0; } -float mouseDragSlider(entity me, vector pos) +float Slider_mouseDrag(entity me, vector pos) { float hit; float v, animed; @@ -182,7 +182,7 @@ float mouseDragSlider(entity me, vector pos) return 1; } -float mousePressSlider(entity me, vector pos) +float Slider_mousePress(entity me, vector pos) { float controlCenter; if(me.disabled) @@ -239,18 +239,18 @@ float mousePressSlider(entity me, vector pos) localsound("sound/misc/menu2.wav"); return 1; } -float mouseReleaseSlider(entity me, vector pos) +float Slider_mouseRelease(entity me, vector pos) { me.pressed = 0; if(me.disabled) return 0; return 1; } -void showNotifySlider(entity me) +void Slider_showNotify(entity me) { me.focusable = !me.disabled; } -void drawSlider(entity me) +void Slider_draw(entity me) { float controlLeft; float save; diff --git a/qcsrc/menu/item/textslider.c b/qcsrc/menu/item/textslider.c index d0899fb4a0..c4a7af7a89 100644 --- a/qcsrc/menu/item/textslider.c +++ b/qcsrc/menu/item/textslider.c @@ -15,7 +15,7 @@ ENDCLASS(TextSlider) #endif #ifdef IMPLEMENTATION -string valueToIdentifierTextSlider(entity me, float val) +string TextSlider_valueToIdentifier(entity me, float val) { if(val >= me.nValues) return "custom"; @@ -23,7 +23,7 @@ string valueToIdentifierTextSlider(entity me, float val) return "custom"; return me.(valueIdentifiers[val]); } -string valueToTextTextSlider(entity me, float val) +string TextSlider_valueToText(entity me, float val) { if(val >= me.nValues) return "custom"; @@ -31,7 +31,7 @@ string valueToTextTextSlider(entity me, float val) return "custom"; return me.(valueStrings[val]); } -void setValueFromIdentifierTextSlider(entity me, string id) +void TextSlider_setValueFromIdentifier(entity me, string id) { float i; for(i = 0; i < me.nValues; ++i) @@ -42,17 +42,17 @@ void setValueFromIdentifierTextSlider(entity me, string id) } SUPER(TextSlider).setValue( me, -1 ); } -string getIdentifierTextSlider(entity me) +string TextSlider_getIdentifier(entity me) { return me.valueToIdentifier(me, me.value); } -void addValueTextSlider(entity me, string theString, string theIdentifier) +void TextSlider_addValue(entity me, string theString, string theIdentifier) { me.(valueStrings[me.nValues]) = theString; me.(valueIdentifiers[me.nValues]) = theIdentifier; me.nValues += 1; } -void configureTextSliderValuesTextSlider(entity me, string theDefault) +void TextSlider_configureTextSliderValues(entity me, string theDefault) { me.configureSliderValues(me, 0, 0, me.nValues - 1, 1, 1, 1); me.setValueFromIdentifier(me, theDefault); diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index b8fee02a13..ea0f68e884 100644 --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@ -792,7 +792,7 @@ void m_activate_window(entity wnd) // nexposee (sorry for violating abstraction here) par.selectedChild = wnd; par.animationState = 1; - setFocusContainer(par, NULL); + Container_setFocus(par, NULL); } else if(par.instanceOfContainer) { diff --git a/qcsrc/menu/oo/classdefs.h b/qcsrc/menu/oo/classdefs.h index e4ac44e2c8..f84d133116 100644 --- a/qcsrc/menu/oo/classdefs.h +++ b/qcsrc/menu/oo/classdefs.h @@ -18,7 +18,7 @@ #define CLASS(cname) entity spawn##cname(); entity vtbl##cname; #define EXTENDS(base) -#define METHOD(cname,name,prototype) prototype name##cname; .prototype name; +#define METHOD(cname,name,prototype) prototype cname##_##name; .prototype name; #define ATTRIB(cname,name,type,val) .type name; #define ATTRIBARRAY(cname,name,type,cnt) .type name[cnt]; #define ENDCLASS(cname) .float instanceOf##cname; diff --git a/qcsrc/menu/oo/constructors.h b/qcsrc/menu/oo/constructors.h index 5f2132469f..5533c8ce89 100644 --- a/qcsrc/menu/oo/constructors.h +++ b/qcsrc/menu/oo/constructors.h @@ -18,7 +18,7 @@ #define CLASS(cname) entity spawn##cname() { entity me; #define EXTENDS(base) me = spawn##base (); entity basevtbl; basevtbl = vtbl##base; -#define METHOD(cname,name,prototype) me.name = name##cname; +#define METHOD(cname,name,prototype) me.name = cname##_##name; #define ATTRIB(cname,name,type,val) me.name = val; #define ATTRIBARRAY(cname,name,type,cnt) me.name = me.name; #define ENDCLASS(cname) me.instanceOf##cname = 1; me.classname = #cname; if(!vtbl##cname) vtbl##cname = spawnVtbl(me, basevtbl); return me; } diff --git a/qcsrc/menu/xonotic/bigbutton.c b/qcsrc/menu/xonotic/bigbutton.c index c5243e06c4..a63189b63a 100644 --- a/qcsrc/menu/xonotic/bigbutton.c +++ b/qcsrc/menu/xonotic/bigbutton.c @@ -16,7 +16,7 @@ entity makeXonoticBigButton(string theText, vector theColor) return me; } -void configureXonoticBigButtonXonoticBigButton(entity me, string theText, vector theColor) +void XonoticBigButton_configureXonoticBigButton(entity me, string theText, vector theColor) { me.configureXonoticButton(me, theText, theColor); } diff --git a/qcsrc/menu/xonotic/bigcommandbutton.c b/qcsrc/menu/xonotic/bigcommandbutton.c index d7aa504e24..c96dd57a16 100644 --- a/qcsrc/menu/xonotic/bigcommandbutton.c +++ b/qcsrc/menu/xonotic/bigcommandbutton.c @@ -16,7 +16,7 @@ entity makeXonoticBigCommandButton(string theText, vector theColor, string theCo return me; } -void configureXonoticBigCommandButtonXonoticBigCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags) +void XonoticBigCommandButton_configureXonoticBigCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags) { me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags); } diff --git a/qcsrc/menu/xonotic/button.c b/qcsrc/menu/xonotic/button.c index 2112c2c500..5522905bc2 100644 --- a/qcsrc/menu/xonotic/button.c +++ b/qcsrc/menu/xonotic/button.c @@ -23,7 +23,7 @@ entity makeXonoticButton(string theText, vector theColor) return me; } -void configureXonoticButtonXonoticButton(entity me, string theText, vector theColor) +void XonoticButton_configureXonoticButton(entity me, string theText, vector theColor) { if(theColor == '0 0 0') { diff --git a/qcsrc/menu/xonotic/campaign.c b/qcsrc/menu/xonotic/campaign.c index a3b5927f28..bd31f435e2 100644 --- a/qcsrc/menu/xonotic/campaign.c +++ b/qcsrc/menu/xonotic/campaign.c @@ -96,7 +96,7 @@ entity makeXonoticCampaignList() me.configureXonoticCampaignList(me); return me; } -void configureXonoticCampaignListXonoticCampaignList(entity me) +void XonoticCampaignList_configureXonoticCampaignList(entity me) { me.configureXonoticListBox(me); me.campaignGlob = search_begin("maps/campaign*.txt", TRUE, TRUE); @@ -104,13 +104,13 @@ void configureXonoticCampaignListXonoticCampaignList(entity me) me.campaignGo(me, 0); // takes care of enabling/disabling buttons too } -void destroyXonoticCampaignList(entity me) +void XonoticCampaignList_destroy(entity me) { if(me.campaignGlob >= 0) search_end(me.campaignGlob); } -void loadCvarsXonoticCampaignList(entity me) +void XonoticCampaignList_loadCvars(entity me) { // read campaign cvars if(campaign_name) @@ -133,7 +133,7 @@ void loadCvarsXonoticCampaignList(entity me) me.labelTitle.setText(me.labelTitle, campaign_title); } -void saveCvarsXonoticCampaignList(entity me) +void XonoticCampaignList_saveCvars(entity me) { // write campaign cvars // no reason to do this! @@ -141,7 +141,7 @@ void saveCvarsXonoticCampaignList(entity me) // cvar_set(me.cvarName, ftos(me.campaignIndex)); // NOTE: only server QC does that! } -void campaignGoXonoticCampaignList(entity me, float step) +void XonoticCampaignList_campaignGo(entity me, float step) { float canNext, canPrev; string s; @@ -203,14 +203,14 @@ void MultiCampaign_Prev(entity btn, entity me) me.campaignGo(me, -1); } -void drawXonoticCampaignList(entity me) +void XonoticCampaignList_draw(entity me) { if(cvar(me.cvarName) != me.campaignIndex || cvar_string("g_campaign_name") != campaign_name) me.loadCvars(me); SUPER(XonoticCampaignList).draw(me); } -void resizeNotifyXonoticCampaignList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void XonoticCampaignList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { me.itemAbsSize = '0 0 0'; SUPER(XonoticCampaignList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); @@ -233,7 +233,7 @@ void resizeNotifyXonoticCampaignList(entity me, vector relOrigin, vector relSize rewrapCampaign(me.columnNameSize, me.rowsPerItem - 3, me.emptyLineHeight, me.realFontSize); } -void clickListBoxItemXonoticCampaignList(entity me, float i, vector where) +void XonoticCampaignList_clickListBoxItem(entity me, float i, vector where) { if(i == me.lastClickedMap) if(time < me.lastClickedTime + 0.3) @@ -246,7 +246,7 @@ void clickListBoxItemXonoticCampaignList(entity me, float i, vector where) me.lastClickedMap = i; me.lastClickedTime = time; } -void drawListBoxItemXonoticCampaignList(entity me, float i, vector absSize, float isSelected) +void XonoticCampaignList_drawListBoxItem(entity me, float i, vector absSize, float isSelected) { string s; float p; @@ -307,13 +307,13 @@ void CampaignList_LoadMap(entity btn, entity me) CampaignSetup(me.selectedItem); } -void setSelectedXonoticCampaignList(entity me, float i) +void XonoticCampaignList_setSelected(entity me, float i) { // prevent too late items from being played SUPER(XonoticCampaignList).setSelected(me, min(i, me.campaignIndex)); } -float keyDownXonoticCampaignList(entity me, float scan, float ascii, float shift) +float XonoticCampaignList_keyDown(entity me, float scan, float ascii, float shift) { if(scan == K_ENTER || scan == K_SPACE) CampaignList_LoadMap(me, me); diff --git a/qcsrc/menu/xonotic/charmap.c b/qcsrc/menu/xonotic/charmap.c index 3f3f8e4e1d..21a4aad6f3 100644 --- a/qcsrc/menu/xonotic/charmap.c +++ b/qcsrc/menu/xonotic/charmap.c @@ -47,13 +47,13 @@ string CharMap_CellToChar(float c) } } -void configureXonoticCharmapXonoticCharmap(entity me, entity theTextbox) +void XonoticCharmap_configureXonoticCharmap(entity me, entity theTextbox) { me.controlledTextbox = theTextbox; me.configureImage(me, me.image); } -float mouseMoveXonoticCharmap(entity me, vector coords) +float XonoticCharmap_mouseMove(entity me, vector coords) { float x, y, c; x = floor(coords_x * 16); @@ -68,11 +68,11 @@ float mouseMoveXonoticCharmap(entity me, vector coords) me.mouseSelectedCharacterCell = me.selectedCharacterCell = c; return 1; } -float mouseDragXonoticCharmap(entity me, vector coords) +float XonoticCharmap_mouseDrag(entity me, vector coords) { return me.mouseMove(me, coords); } -float mousePressXonoticCharmap(entity me, vector coords) +float XonoticCharmap_mousePress(entity me, vector coords) { me.mouseMove(me, coords); if(me.mouseSelectedCharacterCell >= 0) @@ -82,7 +82,7 @@ float mousePressXonoticCharmap(entity me, vector coords) } return 1; } -float mouseReleaseXonoticCharmap(entity me, vector coords) +float XonoticCharmap_mouseRelease(entity me, vector coords) { if(!me.pressed) return 0; @@ -92,7 +92,7 @@ float mouseReleaseXonoticCharmap(entity me, vector coords) me.pressed = 0; return 1; } -float keyDownXonoticCharmap(entity me, float key, float ascii, float shift) +float XonoticCharmap_keyDown(entity me, float key, float ascii, float shift) { switch(key) { @@ -123,11 +123,11 @@ float keyDownXonoticCharmap(entity me, float key, float ascii, float shift) return me.controlledTextbox.keyDown(me.controlledTextbox, key, ascii, shift); } } -void focusLeaveXonoticCharmap(entity me) +void XonoticCharmap_focusLeave(entity me) { me.controlledTextbox.saveCvars(me.controlledTextbox); } -void drawXonoticCharmap(entity me) +void XonoticCharmap_draw(entity me) { if(me.focused) { diff --git a/qcsrc/menu/xonotic/checkbox.c b/qcsrc/menu/xonotic/checkbox.c index ad8216a9fe..c28edcc070 100644 --- a/qcsrc/menu/xonotic/checkbox.c +++ b/qcsrc/menu/xonotic/checkbox.c @@ -56,7 +56,7 @@ entity makeXonoticCheckBoxEx(float theYesValue, float theNoValue, string theCvar me.configureXonoticCheckBox(me, theYesValue, theNoValue, theCvar, theText); return me; } -void configureXonoticCheckBoxXonoticCheckBox(entity me, float theYesValue, float theNoValue, string theCvar, string theText) +void XonoticCheckBox_configureXonoticCheckBox(entity me, float theYesValue, float theNoValue, string theCvar, string theText) { me.yesValue = theYesValue; me.noValue = theNoValue; @@ -69,7 +69,7 @@ void configureXonoticCheckBoxXonoticCheckBox(entity me, float theYesValue, float } me.configureCheckBox(me, theText, me.fontSize, me.image); } -void setCheckedXonoticCheckBox(entity me, float val) +void XonoticCheckBox_setChecked(entity me, float val) { if(val != me.checked) { @@ -77,7 +77,7 @@ void setCheckedXonoticCheckBox(entity me, float val) me.saveCvars(me); } } -void loadCvarsXonoticCheckBox(entity me) +void XonoticCheckBox_loadCvars(entity me) { float m, d; @@ -88,7 +88,7 @@ void loadCvarsXonoticCheckBox(entity me) d = (cvar(me.cvarName) - m) / (me.yesValue - m); me.checked = (d > 0); } -void saveCvarsXonoticCheckBox(entity me) +void XonoticCheckBox_saveCvars(entity me) { if not(me.cvarName) return; diff --git a/qcsrc/menu/xonotic/checkbox_slider_invalid.c b/qcsrc/menu/xonotic/checkbox_slider_invalid.c index 62d31fcc8c..a9d2becc3d 100644 --- a/qcsrc/menu/xonotic/checkbox_slider_invalid.c +++ b/qcsrc/menu/xonotic/checkbox_slider_invalid.c @@ -30,7 +30,7 @@ entity makeXonoticSliderCheckBox(float theOffValue, float isInverted, entity the me.configureXonoticSliderCheckBox(me, theOffValue, isInverted, theControlledSlider, theText); return me; } -void configureXonoticSliderCheckBoxXonoticSliderCheckBox(entity me, float theOffValue, float isInverted, entity theControlledSlider, string theText) +void XonoticSliderCheckBox_configureXonoticSliderCheckBox(entity me, float theOffValue, float isInverted, entity theControlledSlider, string theText) { me.offValue = theOffValue; me.inverted = isInverted; @@ -43,14 +43,14 @@ void configureXonoticSliderCheckBoxXonoticSliderCheckBox(entity me, float theOff me.configureCheckBox(me, theText, me.fontSize, me.image); me.tooltip = theControlledSlider.tooltip; } -void drawXonoticSliderCheckBox(entity me) +void XonoticSliderCheckBox_draw(entity me) { me.checked = ((me.controlledSlider.value == me.offValue) != me.inverted); if(me.controlledSlider.value == median(me.controlledSlider.valueMin, me.controlledSlider.value, me.controlledSlider.valueMax)) me.savedValue = me.controlledSlider.value; SUPER(XonoticSliderCheckBox).draw(me); } -void setCheckedXonoticSliderCheckBox(entity me, float val) +void XonoticSliderCheckBox_setChecked(entity me, float val) { if(me.checked == val) return; diff --git a/qcsrc/menu/xonotic/colorbutton.c b/qcsrc/menu/xonotic/colorbutton.c index 2c30d88a1e..2ca8c86c40 100644 --- a/qcsrc/menu/xonotic/colorbutton.c +++ b/qcsrc/menu/xonotic/colorbutton.c @@ -26,7 +26,7 @@ entity makeXonoticColorButton(float theGroup, float theColor, float theValue) me.configureXonoticColorButton(me, theGroup, theColor, theValue); return me; } -void configureXonoticColorButtonXonoticColorButton(entity me, float theGroup, float theColor, float theValue) +void XonoticColorButton_configureXonoticColorButton(entity me, float theGroup, float theColor, float theValue) { me.cvarName = "_cl_color"; me.cvarValueFloat = theValue; @@ -36,7 +36,7 @@ void configureXonoticColorButtonXonoticColorButton(entity me, float theGroup, fl me.srcMulti = 1; me.src2 = me.image2; } -void setCheckedXonoticColorButton(entity me, float val) +void XonoticColorButton_setChecked(entity me, float val) { if(val != me.checked) { @@ -44,7 +44,7 @@ void setCheckedXonoticColorButton(entity me, float val) me.saveCvars(me); } } -void loadCvarsXonoticColorButton(entity me) +void XonoticColorButton_loadCvars(entity me) { if not(me.cvarName) return; @@ -54,7 +54,7 @@ void loadCvarsXonoticColorButton(entity me) else me.checked = (cvar(me.cvarName) & 15) == me.cvarValueFloat; } -void saveCvarsXonoticColorButton(entity me) +void XonoticColorButton_saveCvars(entity me) { if not(me.cvarName) return; @@ -68,7 +68,7 @@ void saveCvarsXonoticColorButton(entity me) } // TODO on an apply button, read _cl_color and execute the color command for it } -void drawXonoticColorButton(entity me) +void XonoticColorButton_draw(entity me) { me.color2 = colormapPaletteColor(me.cvarValueFloat, me.cvarPart); SUPER(XonoticColorButton).draw(me); diff --git a/qcsrc/menu/xonotic/colorpicker.c b/qcsrc/menu/xonotic/colorpicker.c index 95fcf7fcee..b888358c37 100644 --- a/qcsrc/menu/xonotic/colorpicker.c +++ b/qcsrc/menu/xonotic/colorpicker.c @@ -24,13 +24,13 @@ entity makeXonoticColorpicker(entity theTextbox) return me; } -void configureXonoticColorpickerXonoticColorpicker(entity me, entity theTextbox) +void XonoticColorpicker_configureXonoticColorpicker(entity me, entity theTextbox) { me.controlledTextbox = theTextbox; me.configureImage(me, me.image); } -float mousePressXonoticColorpicker(entity me, vector coords) +float XonoticColorpicker_mousePress(entity me, vector coords) { me.mouseDrag(me, coords); return 1; @@ -51,7 +51,7 @@ vector hslimage_color(vector v, vector margin) return hsl_to_rgb(v_x * 6 * eX + eY + v_y / 0.875 * eZ); } -float mouseDragXonoticColorpicker(entity me, vector coords) +float XonoticColorpicker_mouseDrag(entity me, vector coords) { float i; for(;;) @@ -97,21 +97,21 @@ float mouseDragXonoticColorpicker(entity me, vector coords) return 1; } -float mouseReleaseXonoticColorpicker(entity me, vector coords) +float XonoticColorpicker_mouseRelease(entity me, vector coords) { me.mouseDrag(me, coords); return 1; } -void focusLeaveXonoticColorpicker(entity me) +void XonoticColorpicker_focusLeave(entity me) { me.controlledTextbox.saveCvars(me.controlledTextbox); } -float keyDownXonoticColorpicker(entity me, float key, float ascii, float shift) +float XonoticColorpicker_keyDown(entity me, float key, float ascii, float shift) { return me.controlledTextbox.keyDown(me.controlledTextbox, key, ascii, shift); } -void drawXonoticColorpicker(entity me) +void XonoticColorpicker_draw(entity me) { SUPER(XonoticColorpicker).draw(me); diff --git a/qcsrc/menu/xonotic/commandbutton.c b/qcsrc/menu/xonotic/commandbutton.c index b54805c738..8ee4e7de3a 100644 --- a/qcsrc/menu/xonotic/commandbutton.c +++ b/qcsrc/menu/xonotic/commandbutton.c @@ -33,7 +33,7 @@ void XonoticCommandButton_Click(entity me, entity other) m_goto(string_null); } -void configureXonoticCommandButtonXonoticCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags) +void XonoticCommandButton_configureXonoticCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags) { me.configureXonoticButton(me, theText, theColor); me.onClickCommand = theCommand; diff --git a/qcsrc/menu/xonotic/credits.c b/qcsrc/menu/xonotic/credits.c index 816ba1c488..5c2f1585c4 100644 --- a/qcsrc/menu/xonotic/credits.c +++ b/qcsrc/menu/xonotic/credits.c @@ -26,18 +26,18 @@ entity makeXonoticCreditsList() me.configureXonoticCreditsList(me); return me; } -void configureXonoticCreditsListXonoticCreditsList(entity me) +void XonoticCreditsList_configureXonoticCreditsList(entity me) { me.configureXonoticListBox(me); // load the file me.bufferIndex = buf_load("xonotic-credits.txt"); me.nItems = buf_getsize(me.bufferIndex); } -void destroyXonoticCreditsList(entity me) +void XonoticCreditsList_destroy(entity me) { buf_del(me.bufferIndex); } -void drawXonoticCreditsList(entity me) +void XonoticCreditsList_draw(entity me) { float i; if(me.scrolling) @@ -49,7 +49,7 @@ void drawXonoticCreditsList(entity me) } SUPER(XonoticCreditsList).draw(me); } -void resizeNotifyXonoticCreditsList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void XonoticCreditsList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { SUPER(XonoticCreditsList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); @@ -57,7 +57,7 @@ void resizeNotifyXonoticCreditsList(entity me, vector relOrigin, vector relSize, me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth)); me.realUpperMargin = 0.5 * (1 - me.realFontSize_y); } -void drawListBoxItemXonoticCreditsList(entity me, float i, vector absSize, float isSelected) +void XonoticCreditsList_drawListBoxItem(entity me, float i, vector absSize, float isSelected) { // layout: Ping, Credits name, Map name, NP, TP, MP string s; @@ -87,7 +87,7 @@ void drawListBoxItemXonoticCreditsList(entity me, float i, vector absSize, float draw_CenterText(me.realUpperMargin * eY + 0.5 * eX, s, me.realFontSize, theColor, theAlpha, 0); } -float keyDownXonoticCreditsList(entity me, float scan, float ascii, float shift) +float XonoticCreditsList_keyDown(entity me, float scan, float ascii, float shift) { float i; me.dragScrollTimer = time; diff --git a/qcsrc/menu/xonotic/crosshairbutton.c b/qcsrc/menu/xonotic/crosshairbutton.c index a36a5a28fc..b290f3d218 100644 --- a/qcsrc/menu/xonotic/crosshairbutton.c +++ b/qcsrc/menu/xonotic/crosshairbutton.c @@ -25,7 +25,7 @@ entity makeXonoticCrosshairButton(float theGroup, float theCrosshair) me.configureXonoticCrosshairButton(me, theGroup, theCrosshair); return me; } -void configureXonoticCrosshairButtonXonoticCrosshairButton(entity me, float theGroup, float theCrosshair) +void XonoticCrosshairButton_configureXonoticCrosshairButton(entity me, float theGroup, float theCrosshair) { me.cvarName = "crosshair"; me.cvarValueFloat = theCrosshair; @@ -34,7 +34,7 @@ void configureXonoticCrosshairButtonXonoticCrosshairButton(entity me, float theG me.srcMulti = 1; me.src3 = strzone(strcat("/gfx/crosshair", ftos(me.cvarValueFloat))); } -void setCheckedXonoticCrosshairButton(entity me, float val) +void XonoticCrosshairButton_setChecked(entity me, float val) { if(val != me.checked) { @@ -42,14 +42,14 @@ void setCheckedXonoticCrosshairButton(entity me, float val) me.saveCvars(me); } } -void loadCvarsXonoticCrosshairButton(entity me) +void XonoticCrosshairButton_loadCvars(entity me) { if not(me.cvarName) return; me.checked = (cvar(me.cvarName) == me.cvarValueFloat); } -void saveCvarsXonoticCrosshairButton(entity me) +void XonoticCrosshairButton_saveCvars(entity me) { if not(me.cvarName) return; @@ -58,7 +58,7 @@ void saveCvarsXonoticCrosshairButton(entity me) cvar_set(me.cvarName, ftos(me.cvarValueFloat)); // TODO on an apply button, read _cl_color and execute the color command for it } -void drawXonoticCrosshairButton(entity me) +void XonoticCrosshairButton_draw(entity me) { vector sz, rgb; float a; diff --git a/qcsrc/menu/xonotic/cvarlist.c b/qcsrc/menu/xonotic/cvarlist.c index ca6b1b2b42..387396bbaf 100644 --- a/qcsrc/menu/xonotic/cvarlist.c +++ b/qcsrc/menu/xonotic/cvarlist.c @@ -43,7 +43,7 @@ entity makeXonoticCvarList() me.configureXonoticCvarList(me); return me; } -void configureXonoticCvarListXonoticCvarList(entity me) +void XonoticCvarList_configureXonoticCvarList(entity me) { me.configureXonoticListBox(me); @@ -51,11 +51,11 @@ void configureXonoticCvarListXonoticCvarList(entity me) buf_cvarlist(me.handle, "", "_"); me.nItems = buf_getsize(me.handle); } -void destroyXonoticCvarList(entity me) +void XonoticCvarList_destroy(entity me) { buf_del(me.handle); } -void setSelectedXonoticCvarList(entity me, float i) +void XonoticCvarList_setSelected(entity me, float i) { string s; @@ -107,7 +107,7 @@ void CvarList_Filter_Change(entity box, entity me) me.setSelected(me, 0); } -void resizeNotifyXonoticCvarList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void XonoticCvarList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { SUPER(XonoticCvarList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); @@ -122,7 +122,7 @@ void resizeNotifyXonoticCvarList(entity me, vector relOrigin, vector relSize, ve me.setSelected(me, me.selectedItem); } -void drawListBoxItemXonoticCvarList(entity me, float i, vector absSize, float isSelected) +void XonoticCvarList_drawListBoxItem(entity me, float i, vector absSize, float isSelected) { string k, v, d; float t; @@ -155,7 +155,7 @@ void drawListBoxItemXonoticCvarList(entity me, float i, vector absSize, float is draw_Text(me.realUpperMargin * eY + me.columnValueOrigin * eX, s, me.realFontSize, theColor, theAlpha, 0); } -float keyDownXonoticCvarList(entity me, float scan, float ascii, float shift) +float XonoticCvarList_keyDown(entity me, float scan, float ascii, float shift) { if(SUPER(XonoticCvarList).keyDown(me, scan, ascii, shift)) return 1; diff --git a/qcsrc/menu/xonotic/demolist.c b/qcsrc/menu/xonotic/demolist.c index 15498743d5..0882a3ed4a 100644 --- a/qcsrc/menu/xonotic/demolist.c +++ b/qcsrc/menu/xonotic/demolist.c @@ -39,13 +39,13 @@ entity makeXonoticDemoList() return me; } -void configureXonoticDemoListXonoticDemoList(entity me) +void XonoticDemoList_configureXonoticDemoList(entity me) { me.configureXonoticListBox(me); me.getDemos(me); } -string demoNameXonoticDemoList(entity me, float i ) +string XonoticDemoList_demoName(entity me, float i ) { string s; s = search_getfilename(me.listDemo, i); @@ -54,7 +54,7 @@ string demoNameXonoticDemoList(entity me, float i ) } -void getDemosXonoticDemoList(entity me) +void XonoticDemoList_getDemos(entity me) { string s; @@ -74,12 +74,12 @@ void getDemosXonoticDemoList(entity me) me.nItems=search_getsize(me.listDemo); } -void destroyXonoticDemoList(entity me) +void XonoticDemoList_destroy(entity me) { search_end(me.listDemo); } -void resizeNotifyXonoticDemoList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void XonoticDemoList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { me.itemAbsSize = '0 0 0'; SUPER(XonoticDemoList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); @@ -92,7 +92,7 @@ void resizeNotifyXonoticDemoList(entity me, vector relOrigin, vector relSize, ve me.columnNameSize = 1 - 2 * me.realFontSize_x; } -void drawListBoxItemXonoticDemoList(entity me, float i, vector absSize, float isSelected) +void XonoticDemoList_drawListBoxItem(entity me, float i, vector absSize, float isSelected) { string s; if(isSelected) @@ -103,7 +103,7 @@ void drawListBoxItemXonoticDemoList(entity me, float i, vector absSize, float is draw_Text(me.realUpperMargin * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0); } -void showNotifyXonoticDemoList(entity me) +void XonoticDemoList_showNotify(entity me) { me.getDemos(me); } @@ -121,7 +121,7 @@ void DemoList_Filter_Change(entity box, entity me) me.getDemos(me); } -void startDemoXonoticDemoList(entity me) +void XonoticDemoList_startDemo(entity me) { string s; s = me.demoName(me,me.selectedItem); @@ -140,7 +140,7 @@ void TimeDemo_Click(entity btn, entity me) localcmd("timedemo demos/", s, ".dem\nwait\ntogglemenu\n"); } -void clickListBoxItemXonoticDemoList(entity me, float i, vector where) +void XonoticDemoList_clickListBoxItem(entity me, float i, vector where) { if(i == me.lastClickedDemo) if(time < me.lastClickedTime + 0.3) @@ -153,7 +153,7 @@ void clickListBoxItemXonoticDemoList(entity me, float i, vector where) me.lastClickedTime = time; } -float keyDownXonoticDemoList(entity me, float scan, float ascii, float shift) +float XonoticDemoList_keyDown(entity me, float scan, float ascii, float shift) { if(scan == K_ENTER) { me.startDemo(me); diff --git a/qcsrc/menu/xonotic/dialog.c b/qcsrc/menu/xonotic/dialog.c index b8cfac55b6..7087d83cb9 100644 --- a/qcsrc/menu/xonotic/dialog.c +++ b/qcsrc/menu/xonotic/dialog.c @@ -33,7 +33,7 @@ entity currentDialog; #endif #ifdef IMPLEMENTATION -void configureDialogXonoticDialog(entity me) +void XonoticDialog_configureDialog(entity me) { currentDialog = me; SUPER(XonoticDialog).configureDialog(me); diff --git a/qcsrc/menu/xonotic/dialog_credits.c b/qcsrc/menu/xonotic/dialog_credits.c index bcd3545d9c..07c2fc4f29 100644 --- a/qcsrc/menu/xonotic/dialog_credits.c +++ b/qcsrc/menu/xonotic/dialog_credits.c @@ -12,7 +12,7 @@ ENDCLASS(XonoticCreditsDialog) #endif #ifdef IMPLEMENTATION -void fillXonoticCreditsDialog(entity me) +void XonoticCreditsDialog_fill(entity me) { entity e; me.TR(me); @@ -22,7 +22,7 @@ void fillXonoticCreditsDialog(entity me) e.onClick = Dialog_Close; e.onClickEntity = me; } -void focusEnterXonoticCreditsDialog(entity me) +void XonoticCreditsDialog_focusEnter(entity me) { me.creditsList.scrolling = time + 1; } diff --git a/qcsrc/menu/xonotic/dialog_multiplayer.c b/qcsrc/menu/xonotic/dialog_multiplayer.c index 6bbe66dd16..e755710c5b 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer.c @@ -10,7 +10,7 @@ ENDCLASS(XonoticMultiplayerDialog) #endif #ifdef IMPLEMENTATION -void fillXonoticMultiplayerDialog(entity me) +void XonoticMultiplayerDialog_fill(entity me) { entity mc, e; mc = makeXonoticTabController(me.rows - 2); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create.c b/qcsrc/menu/xonotic/dialog_multiplayer_create.c index 51ed2d442b..3aea0e4858 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create.c @@ -26,7 +26,7 @@ entity makeXonoticServerCreateTab() return me; } -void fillXonoticServerCreateTab(entity me) +void XonoticServerCreateTab_fill(entity me) { entity e, e0; float n; @@ -195,7 +195,7 @@ void GameType_ConfigureSliders(entity e, entity l, entity l2, string pLabel, flo } } -void gameTypeChangeNotifyXonoticServerCreateTab(entity me) +void XonoticServerCreateTab_gameTypeChangeNotify(entity me) { // tell the map list to update float gt; diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create_advanced.c b/qcsrc/menu/xonotic/dialog_multiplayer_create_advanced.c index 84cc7fdddd..2d75d43652 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create_advanced.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create_advanced.c @@ -13,12 +13,12 @@ ENDCLASS(XonoticAdvancedDialog) #endif #ifdef IMPLEMENTATION -void showNotifyXonoticAdvancedDialog(entity me) +void XonoticAdvancedDialog_showNotify(entity me) { loadAllCvars(me); } -void fillXonoticAdvancedDialog(entity me) +void XonoticAdvancedDialog_fill(entity me) { entity e; me.TR(me); @@ -69,7 +69,7 @@ void fillXonoticAdvancedDialog(entity me) e.onClickEntity = me; } -void closeXonoticAdvancedDialog(entity me) +void XonoticAdvancedDialog_close(entity me) { if(me.refilterEntity) me.refilterEntity.refilter(me.refilterEntity); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.c b/qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.c index e4056ba7ef..05ed89887d 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.c @@ -40,7 +40,7 @@ ENDCLASS(XonoticMapInfoDialog) #endif #ifdef IMPLEMENTATION -void loadMapInfoXonoticMapInfoDialog(entity me, float i, entity mlb) +void XonoticMapInfoDialog_loadMapInfo(entity me, float i, entity mlb) { me.currentMapIndex = i; me.startButton.onClickEntity = mlb; @@ -86,7 +86,7 @@ void loadMapInfoXonoticMapInfoDialog(entity me, float i, entity mlb) MapInfo_ClearTemps(); } -void fillXonoticMapInfoDialog(entity me) +void XonoticMapInfoDialog_fill(entity me) { entity e; float w, wgt; diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c index f49cccd1ba..517f68bd31 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c @@ -14,7 +14,7 @@ ENDCLASS(XonoticMutatorsDialog) #endif #ifdef IMPLEMENTATION -void showNotifyXonoticMutatorsDialog(entity me) +void XonoticMutatorsDialog_showNotify(entity me) { loadAllCvars(me); } @@ -60,7 +60,7 @@ string WeaponArenaString() return weaponarenastring; } -string toStringXonoticMutatorsDialog(entity me) +string XonoticMutatorsDialog_toString(entity me) { string s; s = ""; @@ -157,7 +157,7 @@ void preDrawLaserWeaponArenaLaserButton(entity me) -void fillXonoticMutatorsDialog(entity me) +void XonoticMutatorsDialog_fill(entity me) { entity e, s, w; float i, j; @@ -276,7 +276,7 @@ void fillXonoticMutatorsDialog(entity me) e.onClickEntity = me; } -void closeXonoticMutatorsDialog(entity me) +void XonoticMutatorsDialog_close(entity me) { if(me.refilterEntity) me.refilterEntity.refilter(me.refilterEntity); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_demo.c b/qcsrc/menu/xonotic/dialog_multiplayer_demo.c index 20d8c9d42f..ec57b7fca8 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_demo.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_demo.c @@ -18,7 +18,7 @@ entity makeXonoticDemoBrowserTab() me.configureDialog(me); return me; } -void fillXonoticDemoBrowserTab(entity me) +void XonoticDemoBrowserTab_fill(entity me) { entity e; entity btn; diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join.c b/qcsrc/menu/xonotic/dialog_multiplayer_join.c index 130f2dea0e..799d33455f 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_join.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_join.c @@ -18,7 +18,7 @@ entity makeXonoticServerListTab() me.configureDialog(me); return me; } -void fillXonoticServerListTab(entity me) +void XonoticServerListTab_fill(entity me) { entity e, slist, btn; diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.c b/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.c index 0eb42c144e..7770230d31 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.c @@ -45,7 +45,7 @@ void Join_Click(entity btn, entity me); #endif #ifdef IMPLEMENTATION -void loadServerInfoXonoticServerInfoDialog(entity me, float i) +void XonoticServerInfoDialog_loadServerInfo(entity me, float i) { float m; string s, typestr, versionstr, numh, maxp; @@ -108,7 +108,7 @@ void loadServerInfoXonoticServerInfoDialog(entity me, float i) me.pingLabel.setText(me.pingLabel, me.currentServerPing); } -void fillXonoticServerInfoDialog(entity me) +void XonoticServerInfoDialog_fill(entity me) { entity e; me.TR(me); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c index 1b48b15641..c2ac9ed412 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c @@ -20,7 +20,7 @@ entity makeXonoticPlayerSettingsTab() me.configureDialog(me); return me; } -void drawXonoticPlayerSettingsTab(entity me) +void XonoticPlayerSettingsTab_draw(entity me) { if(cvar_string("_cl_name") == "Player") me.playerNameLabel.alpha = ((mod(time * 2, 2) < 1) ? 1 : 0); @@ -28,7 +28,7 @@ void drawXonoticPlayerSettingsTab(entity me) me.playerNameLabel.alpha = me.playerNameLabelAlpha; SUPER(XonoticPlayerSettingsTab).draw(me); } -void fillXonoticPlayerSettingsTab(entity me) +void XonoticPlayerSettingsTab_fill(entity me) { entity e, pms, sl, label, e0, box; float i, r, m, n; diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_radar.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_radar.c index dd1ebc52ce..509daa9399 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_radar.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_radar.c @@ -12,15 +12,15 @@ ENDCLASS(XonoticRadarDialog) #endif #ifdef IMPLEMENTATION -void showNotifyXonoticRadarDialog(entity me) +void XonoticRadarDialog_showNotify(entity me) { loadAllCvars(me); } -string toStringXonoticRadarDialog(entity me) +string XonoticRadarDialog_toString(entity me) { return "XXX"; } -void fillXonoticRadarDialog(entity me) +void XonoticRadarDialog_fill(entity me) { entity e, sl; me.TR(me); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_weapons.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_weapons.c index 0b31a823f1..ca6d705c6f 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_weapons.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_weapons.c @@ -13,15 +13,15 @@ ENDCLASS(XonoticWeaponsDialog) #endif #ifdef IMPLEMENTATION -void showNotifyXonoticWeaponsDialog(entity me) +void XonoticWeaponsDialog_showNotify(entity me) { loadAllCvars(me); } -string toStringXonoticWeaponsDialog(entity me) +string XonoticWeaponsDialog_toString(entity me) { return me.weaponsList.toString(me.weaponsList); } -void fillXonoticWeaponsDialog(entity me) +void XonoticWeaponsDialog_fill(entity me) { entity e; diff --git a/qcsrc/menu/xonotic/dialog_news.c b/qcsrc/menu/xonotic/dialog_news.c index 67de2d2145..cfe91afcee 100644 --- a/qcsrc/menu/xonotic/dialog_news.c +++ b/qcsrc/menu/xonotic/dialog_news.c @@ -10,7 +10,7 @@ ENDCLASS(XonoticNewsDialog) #endif #ifdef IMPLEMENTATION -void fillXonoticNewsDialog(entity me) +void XonoticNewsDialog_fill(entity me) { entity e; me.TR(me); diff --git a/qcsrc/menu/xonotic/dialog_quit.c b/qcsrc/menu/xonotic/dialog_quit.c index a58b2e4555..0229e02676 100644 --- a/qcsrc/menu/xonotic/dialog_quit.c +++ b/qcsrc/menu/xonotic/dialog_quit.c @@ -10,7 +10,7 @@ ENDCLASS(XonoticQuitDialog) #endif #ifdef IMPLEMENTATION -void fillXonoticQuitDialog(entity me) +void XonoticQuitDialog_fill(entity me) { entity e; me.TR(me); diff --git a/qcsrc/menu/xonotic/dialog_settings.c b/qcsrc/menu/xonotic/dialog_settings.c index f0adf0488a..1f19bf6565 100644 --- a/qcsrc/menu/xonotic/dialog_settings.c +++ b/qcsrc/menu/xonotic/dialog_settings.c @@ -10,7 +10,7 @@ ENDCLASS(XonoticSettingsDialog) #endif #ifdef IMPLEMENTATION -void fillXonoticSettingsDialog(entity me) +void XonoticSettingsDialog_fill(entity me) { entity mc; mc = makeXonoticTabController(me.rows - 2); diff --git a/qcsrc/menu/xonotic/dialog_settings_audio.c b/qcsrc/menu/xonotic/dialog_settings_audio.c index 7c3c754d4c..7d1f17f0f2 100644 --- a/qcsrc/menu/xonotic/dialog_settings_audio.c +++ b/qcsrc/menu/xonotic/dialog_settings_audio.c @@ -18,7 +18,7 @@ entity makeXonoticAudioSettingsTab() return me; } -void fillXonoticAudioSettingsTab(entity me) +void XonoticAudioSettingsTab_fill(entity me) { entity e, s, sl; diff --git a/qcsrc/menu/xonotic/dialog_settings_effects.c b/qcsrc/menu/xonotic/dialog_settings_effects.c index eb080a50f5..fcb2b8ccfd 100644 --- a/qcsrc/menu/xonotic/dialog_settings_effects.c +++ b/qcsrc/menu/xonotic/dialog_settings_effects.c @@ -29,7 +29,7 @@ float someShadowCvarIsEnabled(entity box) return FALSE; } -void fillXonoticEffectsSettingsTab(entity me) +void XonoticEffectsSettingsTab_fill(entity me) { entity e, s; float n; diff --git a/qcsrc/menu/xonotic/dialog_settings_input.c b/qcsrc/menu/xonotic/dialog_settings_input.c index bd6ade81b9..00a056fcad 100644 --- a/qcsrc/menu/xonotic/dialog_settings_input.c +++ b/qcsrc/menu/xonotic/dialog_settings_input.c @@ -17,7 +17,7 @@ entity makeXonoticInputSettingsTab() me.configureDialog(me); return me; } -void fillXonoticInputSettingsTab(entity me) +void XonoticInputSettingsTab_fill(entity me) { entity e; entity kb; diff --git a/qcsrc/menu/xonotic/dialog_settings_input_userbind.c b/qcsrc/menu/xonotic/dialog_settings_input_userbind.c index 38660b89a8..3cdfa95b73 100644 --- a/qcsrc/menu/xonotic/dialog_settings_input_userbind.c +++ b/qcsrc/menu/xonotic/dialog_settings_input_userbind.c @@ -22,7 +22,7 @@ void XonoticUserbindEditDialog_Save(entity btn, entity me) Dialog_Close(btn, me); } -void loadUserBindXonoticUserbindEditDialog(entity me, string theName, string theCommandPress, string theCommandRelease) +void XonoticUserbindEditDialog_loadUserBind(entity me, string theName, string theCommandPress, string theCommandRelease) { me.nameBox.setText(me.nameBox, theName); me.nameBox.keyDown(me.nameBox, K_END, 0, 0); @@ -32,7 +32,7 @@ void loadUserBindXonoticUserbindEditDialog(entity me, string theName, string the me.nameBox.keyDown(me.commandReleaseBox, K_END, 0, 0); } -void fillXonoticUserbindEditDialog(entity me) +void XonoticUserbindEditDialog_fill(entity me) { entity e; me.TR(me); diff --git a/qcsrc/menu/xonotic/dialog_settings_misc.c b/qcsrc/menu/xonotic/dialog_settings_misc.c index 2494d4593f..2dcf83f1f0 100644 --- a/qcsrc/menu/xonotic/dialog_settings_misc.c +++ b/qcsrc/menu/xonotic/dialog_settings_misc.c @@ -17,7 +17,7 @@ entity makeXonoticMiscSettingsTab() me.configureDialog(me); return me; } -void fillXonoticMiscSettingsTab(entity me) +void XonoticMiscSettingsTab_fill(entity me) { entity e; entity sk; diff --git a/qcsrc/menu/xonotic/dialog_settings_misc_cvars.c b/qcsrc/menu/xonotic/dialog_settings_misc_cvars.c index c8bc46cdca..0d846caf2a 100644 --- a/qcsrc/menu/xonotic/dialog_settings_misc_cvars.c +++ b/qcsrc/menu/xonotic/dialog_settings_misc_cvars.c @@ -12,15 +12,15 @@ ENDCLASS(XonoticCvarsDialog) #endif #ifdef IMPLEMENTATION -void showNotifyXonoticCvarsDialog(entity me) +void XonoticCvarsDialog_showNotify(entity me) { loadAllCvars(me); } -string toStringXonoticCvarsDialog(entity me) +string XonoticCvarsDialog_toString(entity me) { return "XXX"; } -void fillXonoticCvarsDialog(entity me) +void XonoticCvarsDialog_fill(entity me) { entity e, cvarlist, btn; cvarlist = makeXonoticCvarList(); diff --git a/qcsrc/menu/xonotic/dialog_settings_network.c b/qcsrc/menu/xonotic/dialog_settings_network.c index 929da470df..6e0c472afb 100644 --- a/qcsrc/menu/xonotic/dialog_settings_network.c +++ b/qcsrc/menu/xonotic/dialog_settings_network.c @@ -18,7 +18,7 @@ entity makeXonoticNetworkSettingsTab() return me; } -void fillXonoticNetworkSettingsTab(entity me) +void XonoticNetworkSettingsTab_fill(entity me) { entity e; diff --git a/qcsrc/menu/xonotic/dialog_settings_video.c b/qcsrc/menu/xonotic/dialog_settings_video.c index 5eb228ae93..dd2f960c73 100644 --- a/qcsrc/menu/xonotic/dialog_settings_video.c +++ b/qcsrc/menu/xonotic/dialog_settings_video.c @@ -18,7 +18,7 @@ entity makeXonoticVideoSettingsTab() me.configureDialog(me); return me; } -void fillXonoticVideoSettingsTab(entity me) +void XonoticVideoSettingsTab_fill(entity me) { entity e; diff --git a/qcsrc/menu/xonotic/dialog_singleplayer.c b/qcsrc/menu/xonotic/dialog_singleplayer.c index e8b1d943a7..560192ff1d 100644 --- a/qcsrc/menu/xonotic/dialog_singleplayer.c +++ b/qcsrc/menu/xonotic/dialog_singleplayer.c @@ -50,7 +50,7 @@ void InstantAction_LoadMap(entity btn, entity dummy) fclose(fh); } -void fillXonoticSingleplayerDialog(entity me) +void XonoticSingleplayerDialog_fill(entity me) { entity e, btnPrev, btnNext, lblTitle; diff --git a/qcsrc/menu/xonotic/dialog_singleplayer_winner.c b/qcsrc/menu/xonotic/dialog_singleplayer_winner.c index b0df2d3d29..5d377e6d0a 100644 --- a/qcsrc/menu/xonotic/dialog_singleplayer_winner.c +++ b/qcsrc/menu/xonotic/dialog_singleplayer_winner.c @@ -10,7 +10,7 @@ ENDCLASS(XonoticWinnerDialog) #endif #ifdef IMPLEMENTATION -void fillXonoticWinnerDialog(entity me) +void XonoticWinnerDialog_fill(entity me) { entity e; diff --git a/qcsrc/menu/xonotic/dialog_teamselect.c b/qcsrc/menu/xonotic/dialog_teamselect.c index 4a2f81231f..e0908ee364 100644 --- a/qcsrc/menu/xonotic/dialog_teamselect.c +++ b/qcsrc/menu/xonotic/dialog_teamselect.c @@ -23,7 +23,7 @@ entity makeTeamButton(string theName, vector theColor, string commandtheName) return b; } -void showNotifyXonoticTeamSelectDialog(entity me) +void XonoticTeamSelectDialog_showNotify(entity me) { float teams, nTeams; teams = cvar("_teams_available"); @@ -34,7 +34,7 @@ void showNotifyXonoticTeamSelectDialog(entity me) me.team4.disabled = !(teams & 8); nTeams += !!(teams & 8); } -void fillXonoticTeamSelectDialog(entity me) +void XonoticTeamSelectDialog_fill(entity me) { entity e; me.TR(me); diff --git a/qcsrc/menu/xonotic/gametypebutton.c b/qcsrc/menu/xonotic/gametypebutton.c index f88cb0029c..c1dc04c730 100644 --- a/qcsrc/menu/xonotic/gametypebutton.c +++ b/qcsrc/menu/xonotic/gametypebutton.c @@ -30,7 +30,7 @@ entity makeXonoticGametypeButton(float theGroup, string theCvar, string theText) me.configureXonoticGametypeButton(me, theGroup, theCvar, theText); return me; } -void configureXonoticGametypeButtonXonoticGametypeButton(entity me, float theGroup, string theCvar, string theText) +void XonoticGametypeButton_configureXonoticGametypeButton(entity me, float theGroup, string theCvar, string theText) { if(theCvar) { @@ -43,7 +43,7 @@ void configureXonoticGametypeButtonXonoticGametypeButton(entity me, float theGro me.onClick = GameTypeButton_Click; me.onClickEntity = NULL; } -void setCheckedXonoticGametypeButton(entity me, float val) +void XonoticGametypeButton_setChecked(entity me, float val) { if(val != me.checked) { @@ -51,14 +51,14 @@ void setCheckedXonoticGametypeButton(entity me, float val) me.saveCvars(me); } } -void loadCvarsXonoticGametypeButton(entity me) +void XonoticGametypeButton_loadCvars(entity me) { if not(me.cvarName) return; me.checked = cvar(me.cvarName); } -void saveCvarsXonoticGametypeButton(entity me) +void XonoticGametypeButton_saveCvars(entity me) { if not(me.cvarName) return; diff --git a/qcsrc/menu/xonotic/image.c b/qcsrc/menu/xonotic/image.c index 65f5ee9d81..9f0de67b8a 100644 --- a/qcsrc/menu/xonotic/image.c +++ b/qcsrc/menu/xonotic/image.c @@ -13,7 +13,7 @@ entity makeXonoticImage(string theImage, float theAspect) me.configureXonoticImage(me, theImage, theAspect); return me; } -void configureXonoticImageXonoticImage(entity me, string theImage, float theAspect) +void XonoticImage_configureXonoticImage(entity me, string theImage, float theAspect) { me.configureImage(me, theImage); me.forcedAspect = theAspect; diff --git a/qcsrc/menu/xonotic/inputbox.c b/qcsrc/menu/xonotic/inputbox.c index c585e05486..26dc4536c4 100644 --- a/qcsrc/menu/xonotic/inputbox.c +++ b/qcsrc/menu/xonotic/inputbox.c @@ -32,7 +32,7 @@ entity makeXonoticInputBox(float doEditColorCodes, string theCvar) me.configureXonoticInputBox(me, doEditColorCodes, theCvar); return me; } -void configureXonoticInputBoxXonoticInputBox(entity me, float doEditColorCodes, string theCvar) +void XonoticInputBox_configureXonoticInputBox(entity me, float doEditColorCodes, string theCvar) { me.configureInputBox(me, "", 0, me.fontSize, me.image); me.editColorCodes = doEditColorCodes; @@ -44,11 +44,11 @@ void configureXonoticInputBoxXonoticInputBox(entity me, float doEditColorCodes, } me.cursorPos = strlen(me.text); } -void focusLeaveXonoticInputBox(entity me) +void XonoticInputBox_focusLeave(entity me) { me.saveCvars(me); } -void setTextXonoticInputBox(entity me, string new) +void XonoticInputBox_setText(entity me, string new) { if(me.text != new) { @@ -58,19 +58,19 @@ void setTextXonoticInputBox(entity me, string new) else SUPER(XonoticInputBox).setText(me, new); } -void loadCvarsXonoticInputBox(entity me) +void XonoticInputBox_loadCvars(entity me) { if not(me.cvarName) return; SUPER(XonoticInputBox).setText(me, cvar_string(me.cvarName)); } -void saveCvarsXonoticInputBox(entity me) +void XonoticInputBox_saveCvars(entity me) { if not(me.cvarName) return; cvar_set(me.cvarName, me.text); } -float keyDownXonoticInputBox(entity me, float key, float ascii, float shift) +float XonoticInputBox_keyDown(entity me, float key, float ascii, float shift) { float r; r = 0; diff --git a/qcsrc/menu/xonotic/keybinder.c b/qcsrc/menu/xonotic/keybinder.c index c2d124c041..bb16e08889 100644 --- a/qcsrc/menu/xonotic/keybinder.c +++ b/qcsrc/menu/xonotic/keybinder.c @@ -68,7 +68,7 @@ entity makeXonoticKeyBinder() me.configureXonoticKeyBinder(me); return me; } -void configureXonoticKeyBinderXonoticKeyBinder(entity me) +void XonoticKeyBinder_configureXonoticKeyBinder(entity me) { me.configureXonoticListBox(me); if(Xonotic_KeyBinds_Count < 0) @@ -76,7 +76,7 @@ void configureXonoticKeyBinderXonoticKeyBinder(entity me) me.nItems = Xonotic_KeyBinds_Count; me.setSelected(me, 0); } -void resizeNotifyXonoticKeyBinder(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void XonoticKeyBinder_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { SUPER(XonoticKeyBinder).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); @@ -103,7 +103,7 @@ void KeyBinder_Bind_Change(entity btn, entity me) me.keyGrabButton.forcePressed = 1; keyGrabber = me; } -void keyGrabbedXonoticKeyBinder(entity me, float key, float ascii) +void XonoticKeyBinder_keyGrabbed(entity me, float key, float ascii) { float n, j, k, nvalid; string func; @@ -135,7 +135,7 @@ void keyGrabbedXonoticKeyBinder(entity me, float key, float ascii) } localcmd("\nbind \"", keynumtostring(key), "\" \"", func, "\"\n"); } -void editUserbindXonoticKeyBinder(entity me, string theName, string theCommandPress, string theCommandRelease) +void XonoticKeyBinder_editUserbind(entity me, string theName, string theCommandPress, string theCommandRelease) { string func, descr; @@ -195,7 +195,7 @@ void KeyBinder_Bind_Clear(entity btn, entity me) } } -void clickListBoxItemXonoticKeyBinder(entity me, float i, vector where) +void XonoticKeyBinder_clickListBoxItem(entity me, float i, vector where) { if(i == me.lastClickedServer) if(time < me.lastClickedTime + 0.3) @@ -206,7 +206,7 @@ void clickListBoxItemXonoticKeyBinder(entity me, float i, vector where) me.lastClickedServer = i; me.lastClickedTime = time; } -void setSelectedXonoticKeyBinder(entity me, float i) +void XonoticKeyBinder_setSelected(entity me, float i) { // handling of "unselectable" items i = floor(0.5 + bound(0, i, me.nItems - 1)); @@ -233,7 +233,7 @@ void setSelectedXonoticKeyBinder(entity me, float i) me.userbindEditButton.disabled = (substring(Xonotic_KeyBinds_Descriptions[i], 0, 1) != "$"); SUPER(XonoticKeyBinder).setSelected(me, i); } -float keyDownXonoticKeyBinder(entity me, float key, float ascii, float shift) +float XonoticKeyBinder_keyDown(entity me, float key, float ascii, float shift) { float r; r = 1; @@ -253,7 +253,7 @@ float keyDownXonoticKeyBinder(entity me, float key, float ascii, float shift) } return r; } -void drawListBoxItemXonoticKeyBinder(entity me, float i, vector absSize, float isSelected) +void XonoticKeyBinder_drawListBoxItem(entity me, float i, vector absSize, float isSelected) { string s; float j, k, n; diff --git a/qcsrc/menu/xonotic/listbox.c b/qcsrc/menu/xonotic/listbox.c index f0df7216db..23fa58d832 100644 --- a/qcsrc/menu/xonotic/listbox.c +++ b/qcsrc/menu/xonotic/listbox.c @@ -25,11 +25,11 @@ entity makeXonoticListBox() me.configureXonoticListBox(me); return me; } -void configureXonoticListBoxXonoticListBox(entity me) +void XonoticListBox_configureXonoticListBox(entity me) { me.configureListBox(me, me.scrollbarWidth, 1); // item height gets set up later } -void resizeNotifyXonoticListBox(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void XonoticListBox_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { me.itemHeight = me.rowsPerItem * me.fontSize / absSize_y; SUPER(XonoticListBox).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); diff --git a/qcsrc/menu/xonotic/mainwindow.c b/qcsrc/menu/xonotic/mainwindow.c index 979bb572b0..9932788e8b 100644 --- a/qcsrc/menu/xonotic/mainwindow.c +++ b/qcsrc/menu/xonotic/mainwindow.c @@ -25,7 +25,7 @@ void DemoButton_Click(entity me, entity other) me.setText(me, "Do not press this button again!"); } -void configureMainWindowMainWindow(entity me) +void MainWindow_configureMainWindow(entity me) { entity n, i; diff --git a/qcsrc/menu/xonotic/maplist.c b/qcsrc/menu/xonotic/maplist.c index 88be816790..7a5a4ba150 100644 --- a/qcsrc/menu/xonotic/maplist.c +++ b/qcsrc/menu/xonotic/maplist.c @@ -51,7 +51,7 @@ void MapList_LoadMap(entity btn, entity me); #endif #ifdef IMPLEMENTATION -void destroyXonoticMapList(entity me) +void XonoticMapList_destroy(entity me) { MapInfo_Shutdown(); } @@ -64,22 +64,22 @@ entity makeXonoticMapList() return me; } -void configureXonoticMapListXonoticMapList(entity me) +void XonoticMapList_configureXonoticMapList(entity me) { me.configureXonoticListBox(me); me.refilter(me); } -void loadCvarsXonoticMapList(entity me) +void XonoticMapList_loadCvars(entity me) { me.refilter(me); } -float g_maplistCacheQueryXonoticMapList(entity me, float i) +float XonoticMapList_g_maplistCacheQuery(entity me, float i) { return stof(substring(me.g_maplistCache, i, 1)); } -void g_maplistCacheToggleXonoticMapList(entity me, float i) +void XonoticMapList_g_maplistCacheToggle(entity me, float i) { string a, b, c, s, bspname; float n; @@ -113,14 +113,14 @@ void g_maplistCacheToggleXonoticMapList(entity me, float i) } } -void drawXonoticMapList(entity me) +void XonoticMapList_draw(entity me) { if(me.startButton) me.startButton.disabled = ((me.selectedItem < 0) || (me.selectedItem >= me.nItems)); SUPER(XonoticMapList).draw(me); } -void resizeNotifyXonoticMapList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void XonoticMapList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { me.itemAbsSize = '0 0 0'; SUPER(XonoticMapList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); @@ -139,7 +139,7 @@ void resizeNotifyXonoticMapList(entity me, vector relOrigin, vector relSize, vec me.checkMarkOrigin = eY + eX * (me.columnPreviewOrigin + me.columnPreviewSize) - me.checkMarkSize; } -void clickListBoxItemXonoticMapList(entity me, float i, vector where) +void XonoticMapList_clickListBoxItem(entity me, float i, vector where) { if(where_x <= me.columnPreviewOrigin + me.columnPreviewSize) { @@ -163,7 +163,7 @@ void clickListBoxItemXonoticMapList(entity me, float i, vector where) } } -void drawListBoxItemXonoticMapList(entity me, float i, vector absSize, float isSelected) +void XonoticMapList_drawListBoxItem(entity me, float i, vector absSize, float isSelected) { // layout: Ping, Map name, Map name, NP, TP, MP string s; @@ -197,7 +197,7 @@ void drawListBoxItemXonoticMapList(entity me, float i, vector absSize, float isS MapInfo_ClearTemps(); } -void refilterXonoticMapList(entity me) +void XonoticMapList_refilter(entity me) { float i, j, n; string s; @@ -233,7 +233,7 @@ void refilterXonoticMapList(entity me) } } -void refilterCallbackXonoticMapList(entity me, entity cb) +void XonoticMapList_refilterCallback(entity me, entity cb) { me.refilter(me); } @@ -292,7 +292,7 @@ void MapList_LoadMap(entity btn, entity me) } } -float keyDownXonoticMapList(entity me, float scan, float ascii, float shift) +float XonoticMapList_keyDown(entity me, float scan, float ascii, float shift) { string ch, save; if(scan == K_ENTER) diff --git a/qcsrc/menu/xonotic/nexposee.c b/qcsrc/menu/xonotic/nexposee.c index 32253b0c0e..b375393c02 100644 --- a/qcsrc/menu/xonotic/nexposee.c +++ b/qcsrc/menu/xonotic/nexposee.c @@ -15,11 +15,11 @@ entity makeXonoticNexposee() return me; } -void configureXonoticNexposeeXonoticNexposee(entity me) +void XonoticNexposee_configureXonoticNexposee(entity me) { } -void closeXonoticNexposee(entity me) +void XonoticNexposee_close(entity me) { m_goto(string_null); // hide } diff --git a/qcsrc/menu/xonotic/playerlist.c b/qcsrc/menu/xonotic/playerlist.c index e616c4fa66..f409a1b99d 100644 --- a/qcsrc/menu/xonotic/playerlist.c +++ b/qcsrc/menu/xonotic/playerlist.c @@ -34,7 +34,7 @@ entity makeXonoticPlayerList() return me; } -void setPlayerListXonoticPlayerList(entity me, string plist) +void XonoticPlayerList_setPlayerList(entity me, string plist) { dprint(plist,"------------\n"); @@ -71,12 +71,12 @@ void setPlayerListXonoticPlayerList(entity me, string plist) me.playerList = buf; } -string getPlayerListXonoticPlayerList(entity me, float i, float key) +string XonoticPlayerList_getPlayerList(entity me, float i, float key) { return bufstr_get(me.playerList, i * PLAYERPARM_COUNT + key); } -void resizeNotifyXonoticPlayerList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void XonoticPlayerList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { me.itemAbsSize = '0 0 0'; SUPER(XonoticPlayerList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); @@ -93,7 +93,7 @@ void resizeNotifyXonoticPlayerList(entity me, vector relOrigin, vector relSize, me.columnScoreOrigin = me.columnNameOrigin + me.columnNameSize + me.realFontSize_x; } -void drawListBoxItemXonoticPlayerList(entity me, float i, vector absSize, float isSelected) +void XonoticPlayerList_drawListBoxItem(entity me, float i, vector absSize, float isSelected) { string s; string score; diff --git a/qcsrc/menu/xonotic/playermodel.c b/qcsrc/menu/xonotic/playermodel.c index 6f4851c994..585a5f7fc1 100644 --- a/qcsrc/menu/xonotic/playermodel.c +++ b/qcsrc/menu/xonotic/playermodel.c @@ -42,7 +42,7 @@ entity makeXonoticPlayerModelSelector() #define BUFMODELS_DESC 4 #define BUFMODELS_COUNT 5 -void configureXonoticPlayerModelSelectorXonoticPlayerModelSelector(entity me) +void XonoticPlayerModelSelector_configureXonoticPlayerModelSelector(entity me) { float sortbuf, glob, i; string fn; @@ -87,13 +87,13 @@ void configureXonoticPlayerModelSelectorXonoticPlayerModelSelector(entity me) get_model_parameters(string_null, 0); me.loadCvars(me); } -void destroyXonoticPlayerModelSelector(entity me) +void XonoticPlayerModelSelector_destroy(entity me) { buf_del(me.bufModels); me.bufModels = -1; } -void loadCvarsXonoticPlayerModelSelector(entity me) +void XonoticPlayerModelSelector_loadCvars(entity me) { float i; if(me.currentModel) @@ -112,7 +112,7 @@ void loadCvarsXonoticPlayerModelSelector(entity me) me.go(me, 0); // this will set the other vars for currentSkin and currentModel } -void goXonoticPlayerModelSelector(entity me, float d) +void XonoticPlayerModelSelector_go(entity me, float d) { me.idxModels = mod(me.idxModels + d + me.numModels, me.numModels); @@ -149,14 +149,14 @@ void PlayerModelSelector_Prev_Click(entity btn, entity me) me.saveCvars(me); } -void saveCvarsXonoticPlayerModelSelector(entity me) +void XonoticPlayerModelSelector_saveCvars(entity me) { // we can't immediately apply here because of flood control cvar_set("_cl_playermodel", me.currentModel); cvar_set("_cl_playerskin", ftos(me.currentSkin)); } -void drawXonoticPlayerModelSelector(entity me) +void XonoticPlayerModelSelector_draw(entity me) { float i, n; vector o; @@ -174,7 +174,7 @@ void drawXonoticPlayerModelSelector(entity me) } } -void resizeNotifyXonoticPlayerModelSelector(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void XonoticPlayerModelSelector_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { SUPER(XonoticPlayerModelSelector).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); me.realFontSize_y = me.fontSize / absSize_y; diff --git a/qcsrc/menu/xonotic/radiobutton.c b/qcsrc/menu/xonotic/radiobutton.c index 2591356a09..8c353eae67 100644 --- a/qcsrc/menu/xonotic/radiobutton.c +++ b/qcsrc/menu/xonotic/radiobutton.c @@ -30,7 +30,7 @@ entity makeXonoticRadioButton(float theGroup, string theCvar, string theValue, s me.configureXonoticRadioButton(me, theGroup, theCvar, theValue, theText); return me; } -void configureXonoticRadioButtonXonoticRadioButton(entity me, float theGroup, string theCvar, string theValue, string theText) +void XonoticRadioButton_configureXonoticRadioButton(entity me, float theGroup, string theCvar, string theValue, string theText) { if(theCvar) { @@ -41,7 +41,7 @@ void configureXonoticRadioButtonXonoticRadioButton(entity me, float theGroup, st } me.configureRadioButton(me, theText, me.fontSize, me.image, theGroup, 0); } -void setCheckedXonoticRadioButton(entity me, float val) +void XonoticRadioButton_setChecked(entity me, float val) { if(val != me.checked) { @@ -49,7 +49,7 @@ void setCheckedXonoticRadioButton(entity me, float val) me.saveCvars(me); } } -void loadCvarsXonoticRadioButton(entity me) +void XonoticRadioButton_loadCvars(entity me) { if(me.cvarValue) { @@ -72,7 +72,7 @@ void loadCvarsXonoticRadioButton(entity me) } } } -void drawXonoticRadioButton(entity me) +void XonoticRadioButton_draw(entity me) { if not(me.cvarValue) if not(me.cvarName) @@ -91,7 +91,7 @@ void drawXonoticRadioButton(entity me) } SUPER(XonoticRadioButton).draw(me); } -void saveCvarsXonoticRadioButton(entity me) +void XonoticRadioButton_saveCvars(entity me) { if(me.cvarValue) { diff --git a/qcsrc/menu/xonotic/rootdialog.c b/qcsrc/menu/xonotic/rootdialog.c index d784cba449..efc00822d8 100644 --- a/qcsrc/menu/xonotic/rootdialog.c +++ b/qcsrc/menu/xonotic/rootdialog.c @@ -14,7 +14,7 @@ ENDCLASS(XonoticRootDialog) #endif #ifdef IMPLEMENTATION -void closeXonoticRootDialog(entity me) +void XonoticRootDialog_close(entity me) { m_goto(string_null); } diff --git a/qcsrc/menu/xonotic/serverlist.c b/qcsrc/menu/xonotic/serverlist.c index 860bc739b1..c205fba705 100644 --- a/qcsrc/menu/xonotic/serverlist.c +++ b/qcsrc/menu/xonotic/serverlist.c @@ -141,7 +141,7 @@ entity makeXonoticServerList() me.configureXonoticServerList(me); return me; } -void configureXonoticServerListXonoticServerList(entity me) +void XonoticServerList_configureXonoticServerList(entity me) { me.configureXonoticListBox(me); @@ -149,7 +149,7 @@ void configureXonoticServerListXonoticServerList(entity me) me.nItems = 0; } -void setSelectedXonoticServerList(entity me, float i) +void XonoticServerList_setSelected(entity me, float i) { float save; save = me.selectedItem; @@ -171,7 +171,7 @@ void setSelectedXonoticServerList(entity me, float i) me.ipAddressBox.cursorPos = strlen(me.selectedServer); me.ipAddressBoxFocused = -1; } -void refreshServerListXonoticServerList(entity me, float mode) +void XonoticServerList_refreshServerList(entity me, float mode) { // 0: just reparametrize // 1: also ask for new servers @@ -234,7 +234,7 @@ void refreshServerListXonoticServerList(entity me, float mode) refreshhostcache(); } } -void focusEnterXonoticServerList(entity me) +void XonoticServerList_focusEnter(entity me) { if(time < me.nextRefreshTime) { @@ -244,7 +244,7 @@ void focusEnterXonoticServerList(entity me) me.nextRefreshTime = time + 10; me.refreshServerList(me, 1); } -void drawXonoticServerList(entity me) +void XonoticServerList_draw(entity me) { float i, found, owned; @@ -413,7 +413,7 @@ void ServerList_ShowFull_Click(entity box, entity me) me.ipAddressBox.cursorPos = 0; me.ipAddressBoxFocused = -1; } -void setSortOrderXonoticServerList(entity me, float field, float direction) +void XonoticServerList_setSortOrder(entity me, float field, float direction) { if(me.currentSortField == field) direction = -me.currentSortOrder; @@ -430,7 +430,7 @@ void setSortOrderXonoticServerList(entity me, float field, float direction) me.selectedServer = string_null; me.refreshServerList(me, 0); } -void positionSortButtonXonoticServerList(entity me, entity btn, float theOrigin, float theSize, string theTitle, void(entity, entity) theFunc) +void XonoticServerList_positionSortButton(entity me, entity btn, float theOrigin, float theSize, string theTitle, void(entity, entity) theFunc) { vector originInLBSpace, sizeInLBSpace; originInLBSpace = eY * (-me.itemHeight); @@ -447,7 +447,7 @@ void positionSortButtonXonoticServerList(entity me, entity btn, float theOrigin, btn.onClickEntity = me; btn.resized = 1; } -void resizeNotifyXonoticServerList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void XonoticServerList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { SUPER(XonoticServerList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); @@ -502,7 +502,7 @@ void ServerList_Info_Click(entity btn, entity me) main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, me.selectedItem); DialogOpenButton_Click(me, main.serverInfoDialog); } -void clickListBoxItemXonoticServerList(entity me, float i, vector where) +void XonoticServerList_clickListBoxItem(entity me, float i, vector where) { if(i == me.lastClickedServer) if(time < me.lastClickedTime + 0.3) @@ -513,7 +513,7 @@ void clickListBoxItemXonoticServerList(entity me, float i, vector where) me.lastClickedServer = i; me.lastClickedTime = time; } -void drawListBoxItemXonoticServerList(entity me, float i, vector absSize, float isSelected) +void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float isSelected) { // layout: Ping, Server name, Map name, NP, TP, MP string s; @@ -574,7 +574,7 @@ void drawListBoxItemXonoticServerList(entity me, float i, vector absSize, float draw_Text(me.realUpperMargin * eY + (me.columnPlayersOrigin + (me.columnPlayersSize - draw_TextWidth(s, 0, me.realFontSize)) * 0.5) * eX, s, me.realFontSize, theColor, theAlpha, 0); } -float keyDownXonoticServerList(entity me, float scan, float ascii, float shift) +float XonoticServerList_keyDown(entity me, float scan, float ascii, float shift) { float i; vector org, sz; diff --git a/qcsrc/menu/xonotic/skinlist.c b/qcsrc/menu/xonotic/skinlist.c index 05820bf63c..bcb62251aa 100644 --- a/qcsrc/menu/xonotic/skinlist.c +++ b/qcsrc/menu/xonotic/skinlist.c @@ -50,14 +50,14 @@ entity makeXonoticSkinList() return me; } -void configureXonoticSkinListXonoticSkinList(entity me) +void XonoticSkinList_configureXonoticSkinList(entity me) { me.configureXonoticListBox(me); me.getSkins(me); me.loadCvars(me); } -void loadCvarsXonoticSkinList(entity me) +void XonoticSkinList_loadCvars(entity me) { string s; float i, n; @@ -73,17 +73,17 @@ void loadCvarsXonoticSkinList(entity me) } } -void saveCvarsXonoticSkinList(entity me) +void XonoticSkinList_saveCvars(entity me) { cvar_set("menu_skin", me.skinParameter(me, me.selectedItem, SKINPARM_NAME)); } -string skinParameterXonoticSkinList(entity me, float i, float key) +string XonoticSkinList_skinParameter(entity me, float i, float key) { return bufstr_get(me.skinlist, i * SKINPARM_COUNT + key); } -void getSkinsXonoticSkinList(entity me) +void XonoticSkinList_getSkins(entity me) { float glob, buf, i, n, fh; string s; @@ -128,12 +128,12 @@ void getSkinsXonoticSkinList(entity me) me.nItems = n; } -void destroyXonoticSkinList(entity me) +void XonoticSkinList_destroy(entity me) { buf_del(me.skinlist); } -void resizeNotifyXonoticSkinList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void XonoticSkinList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { me.itemAbsSize = '0 0 0'; SUPER(XonoticSkinList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); @@ -149,7 +149,7 @@ void resizeNotifyXonoticSkinList(entity me, vector relOrigin, vector relSize, ve me.columnNameSize = 1 - me.columnPreviewSize - 2 * me.realFontSize_x; } -void drawListBoxItemXonoticSkinList(entity me, float i, vector absSize, float isSelected) +void XonoticSkinList_drawListBoxItem(entity me, float i, vector absSize, float isSelected) { string s; @@ -169,7 +169,7 @@ void drawListBoxItemXonoticSkinList(entity me, float i, vector absSize, float is draw_Text(me.realUpperMargin2 * eY + (me.columnNameOrigin + 1.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, SKINCOLOR_SKINLIST_AUTHOR, SKINALPHA_TEXT, 0); } -void setSkinXonoticSkinList(entity me) +void XonoticSkinList_setSkin(entity me) { me.saveCvars(me); localcmd("\nmenu_restart\ntogglemenu\ndefer 0.1 \"menu_cmd skinselect\"\n"); @@ -180,7 +180,7 @@ void SetSkin_Click(entity btn, entity me) me.setSkin(me); } -void clickListBoxItemXonoticSkinList(entity me, float i, vector where) +void XonoticSkinList_clickListBoxItem(entity me, float i, vector where) { if(i == me.lastClickedSkin) if(time < me.lastClickedTime + 0.3) @@ -193,7 +193,7 @@ void clickListBoxItemXonoticSkinList(entity me, float i, vector where) me.lastClickedTime = time; } -float keyDownXonoticSkinList(entity me, float scan, float ascii, float shift) +float XonoticSkinList_keyDown(entity me, float scan, float ascii, float shift) { if(scan == K_ENTER) { me.setSkin(me); diff --git a/qcsrc/menu/xonotic/slider.c b/qcsrc/menu/xonotic/slider.c index a2e22a553c..46a01bb5ac 100644 --- a/qcsrc/menu/xonotic/slider.c +++ b/qcsrc/menu/xonotic/slider.c @@ -31,7 +31,7 @@ entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueSte me.configureXonoticSlider(me, theValueMin, theValueMax, theValueStep, theCvar); return me; } -void configureXonoticSliderXonoticSlider(entity me, float theValueMin, float theValueMax, float theValueStep, string theCvar) +void XonoticSlider_configureXonoticSlider(entity me, float theValueMin, float theValueMax, float theValueStep, string theCvar) { float v, vk, vp; v = theValueMin; @@ -49,7 +49,7 @@ void configureXonoticSliderXonoticSlider(entity me, float theValueMin, float the me.tooltip = getZonedTooltipForIdentifier(theCvar); } } -void setValueXonoticSlider(entity me, float val) +void XonoticSlider_setValue(entity me, float val) { if(val != me.value) { @@ -57,14 +57,14 @@ void setValueXonoticSlider(entity me, float val) me.saveCvars(me); } } -void loadCvarsXonoticSlider(entity me) +void XonoticSlider_loadCvars(entity me) { if not(me.cvarName) return; me.setValue( me, cvar(me.cvarName) ); } -void saveCvarsXonoticSlider(entity me) +void XonoticSlider_saveCvars(entity me) { if not(me.cvarName) return; diff --git a/qcsrc/menu/xonotic/slider_decibels.c b/qcsrc/menu/xonotic/slider_decibels.c index 8ba5a235f9..0e4b4e3720 100644 --- a/qcsrc/menu/xonotic/slider_decibels.c +++ b/qcsrc/menu/xonotic/slider_decibels.c @@ -16,7 +16,7 @@ entity makeXonoticDecibelsSlider(float theValueMin, float theValueMax, float the me.configureXonoticSlider(me, theValueMin, theValueMax, theValueStep, theCvar); return me; } -void loadCvarsXonoticDecibelsSlider(entity me) +void XonoticDecibelsSlider_loadCvars(entity me) { float v; @@ -25,13 +25,13 @@ void loadCvarsXonoticDecibelsSlider(entity me) v = cvar(me.cvarName); if(v >= 0.98) - setValueSlider( me, 0 ); + Slider_setValue( me, 0 ); else if(v < 0.0005) - setValueSlider( me, -1000000 ); + Slider_setValue( me, -1000000 ); else - setValueSlider( me, 0.1 * floor(0.5 + 10.0 * log10(cvar(me.cvarName)) * 10) ); + Slider_setValue( me, 0.1 * floor(0.5 + 10.0 * log10(cvar(me.cvarName)) * 10) ); } -void saveCvarsXonoticDecibelsSlider(entity me) +void XonoticDecibelsSlider_saveCvars(entity me) { if not(me.cvarName) return; @@ -44,7 +44,7 @@ void saveCvarsXonoticDecibelsSlider(entity me) cvar_set(me.cvarName, ftos(pow(10, me.value / 10))); } -string valueToTextXonoticDecibelsSlider(entity me, float v) +string XonoticDecibelsSlider_valueToText(entity me, float v) { if(v < -33) return "OFF"; diff --git a/qcsrc/menu/xonotic/slider_resolution.c b/qcsrc/menu/xonotic/slider_resolution.c index ed6db5b69e..de34a410d9 100644 --- a/qcsrc/menu/xonotic/slider_resolution.c +++ b/qcsrc/menu/xonotic/slider_resolution.c @@ -60,12 +60,12 @@ entity makeXonoticResolutionSlider() me.configureXonoticResolutionSlider(me); return me; } -void addResolutionXonoticResolutionSlider(entity me, float w, float h, float pixelheight) +void XonoticResolutionSlider_addResolution(entity me, float w, float h, float pixelheight) { me.addValue(me, strzone(strcat(ftos(w), "x", ftos(h))), strzone(strcat(ftos(w), " ", ftos(h), " ", ftos(pixelheight)))); // FIXME (in case you ever want to dynamically instantiate this): THIS IS NEVER FREED } -void configureXonoticResolutionSliderXonoticResolutionSlider(entity me) +void XonoticResolutionSlider_configureXonoticResolutionSlider(entity me) { float i; vector r0, r; @@ -90,11 +90,11 @@ void configureXonoticResolutionSliderXonoticResolutionSlider(entity me) me.configureXonoticTextSliderValues(me); } -void loadCvarsXonoticResolutionSlider(entity me) +void XonoticResolutionSlider_loadCvars(entity me) { me.setValueFromIdentifier(me, strcat(cvar_string("menu_vid_width"), " ", cvar_string("menu_vid_height"), " ", cvar_string("menu_vid_pixelheight"))); } -void saveCvarsXonoticResolutionSlider(entity me) +void XonoticResolutionSlider_saveCvars(entity me) { if(me.value >= 0 || me.value < me.nValues) { diff --git a/qcsrc/menu/xonotic/tab.c b/qcsrc/menu/xonotic/tab.c index 42d952e96a..d1a867a2f8 100644 --- a/qcsrc/menu/xonotic/tab.c +++ b/qcsrc/menu/xonotic/tab.c @@ -22,7 +22,7 @@ ENDCLASS(XonoticTab) #endif #ifdef IMPLEMENTATION -void showNotifyXonoticTab(entity me) +void XonoticTab_showNotify(entity me) { loadAllCvars(me); SUPER(XonoticTab).showNotify(me); diff --git a/qcsrc/menu/xonotic/tabcontroller.c b/qcsrc/menu/xonotic/tabcontroller.c index e454e23e06..1faa625aee 100644 --- a/qcsrc/menu/xonotic/tabcontroller.c +++ b/qcsrc/menu/xonotic/tabcontroller.c @@ -17,11 +17,11 @@ entity makeXonoticTabController(float theRows) me.configureXonoticTabController(me, theRows); return me; } -void configureXonoticTabControllerXonoticTabController(entity me, float theRows) +void XonoticTabController_configureXonoticTabController(entity me, float theRows) { me.rows = theRows; } -entity makeTabButtonXonoticTabController(entity me, string theTitle, entity tab) +entity XonoticTabController_makeTabButton(entity me, string theTitle, entity tab) { entity b; if(me.rows != tab.rows) diff --git a/qcsrc/menu/xonotic/textlabel.c b/qcsrc/menu/xonotic/textlabel.c index d0107525f9..757e07ff1b 100644 --- a/qcsrc/menu/xonotic/textlabel.c +++ b/qcsrc/menu/xonotic/textlabel.c @@ -17,11 +17,11 @@ entity makeXonoticTextLabel(float theAlign, string theText) me.configureXonoticTextLabel(me, theAlign, theText); return me; } -void configureXonoticTextLabelXonoticTextLabel(entity me, float theAlign, string theText) +void XonoticTextLabel_configureXonoticTextLabel(entity me, float theAlign, string theText) { me.configureLabel(me, theText, me.fontSize, theAlign); } -void drawXonoticTextLabel(entity me) +void XonoticTextLabel_draw(entity me) { SUPER(XonoticTextLabel).draw(me); } diff --git a/qcsrc/menu/xonotic/textslider.c b/qcsrc/menu/xonotic/textslider.c index 0c0da18aa3..69270a67ac 100644 --- a/qcsrc/menu/xonotic/textslider.c +++ b/qcsrc/menu/xonotic/textslider.c @@ -32,7 +32,7 @@ entity makeXonoticTextSlider(string theCvar) me.configureXonoticTextSlider(me, theCvar); return me; } -void configureXonoticTextSliderXonoticTextSlider(entity me, string theCvar) +void XonoticTextSlider_configureXonoticTextSlider(entity me, string theCvar) { me.configureSliderVisuals(me, me.fontSize, me.align, me.valueSpace, me.image); if(theCvar) @@ -42,7 +42,7 @@ void configureXonoticTextSliderXonoticTextSlider(entity me, string theCvar) // don't load it yet } } -void setValueXonoticTextSlider(entity me, float val) +void XonoticTextSlider_setValue(entity me, float val) { if(val != me.value) { @@ -50,7 +50,7 @@ void setValueXonoticTextSlider(entity me, float val) me.saveCvars(me); } } -void loadCvarsXonoticTextSlider(entity me) +void XonoticTextSlider_loadCvars(entity me) { if not(me.cvarName) return; @@ -62,7 +62,7 @@ void loadCvarsXonoticTextSlider(entity me) s = strcat(s, " ", cvar_string(argv(i))); me.setValueFromIdentifier(me, s); } -void saveCvarsXonoticTextSlider(entity me) +void XonoticTextSlider_saveCvars(entity me) { if not(me.cvarName) return; @@ -94,7 +94,7 @@ void saveCvarsXonoticTextSlider(entity me) } } } -void configureXonoticTextSliderValuesXonoticTextSlider(entity me) +void XonoticTextSlider_configureXonoticTextSliderValues(entity me) { me.configureTextSliderValues(me, string_null); me.loadCvars(me); diff --git a/qcsrc/menu/xonotic/weaponslist.c b/qcsrc/menu/xonotic/weaponslist.c index d800005e38..bd2acdf5a6 100644 --- a/qcsrc/menu/xonotic/weaponslist.c +++ b/qcsrc/menu/xonotic/weaponslist.c @@ -25,11 +25,11 @@ entity makeXonoticWeaponsList() me.configureXonoticWeaponsList(me); return me; } -void configureXonoticWeaponsListXonoticWeaponsList(entity me) +void XonoticWeaponsList_configureXonoticWeaponsList(entity me) { me.configureXonoticListBox(me); } -void drawXonoticWeaponsList(entity me) +void XonoticWeaponsList_draw(entity me) { // read in cvar? string s, t; @@ -59,7 +59,7 @@ void WeaponsList_MoveDown_Click(entity box, entity me) me.selectedItem += 1; } } -void resizeNotifyXonoticWeaponsList(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) +void XonoticWeaponsList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { SUPER(XonoticWeaponsList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize); @@ -67,7 +67,7 @@ void resizeNotifyXonoticWeaponsList(entity me, vector relOrigin, vector relSize, me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth)); me.realUpperMargin = 0.5 * (1 - me.realFontSize_y); } -float mouseDragXonoticWeaponsList(entity me, vector pos) +float XonoticWeaponsList_mouseDrag(entity me, vector pos) { float f, i; i = me.selectedItem; @@ -76,7 +76,7 @@ float mouseDragXonoticWeaponsList(entity me, vector pos) cvar_set("cl_weaponpriority", swapInPriorityList(cvar_string("cl_weaponpriority"), me.selectedItem, i)); return f; } -string toStringXonoticWeaponsList(entity me) +string XonoticWeaponsList_toString(entity me) { float n, i; string s; @@ -90,7 +90,7 @@ string toStringXonoticWeaponsList(entity me) } return substring(s, 0, strlen(s) - 2); } -void drawListBoxItemXonoticWeaponsList(entity me, float i, vector absSize, float isSelected) +void XonoticWeaponsList_drawListBoxItem(entity me, float i, vector absSize, float isSelected) { entity e; if(isSelected) @@ -99,7 +99,7 @@ void drawListBoxItemXonoticWeaponsList(entity me, float i, vector absSize, float draw_Text(me.realUpperMargin * eY, e.message, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0); } -float keyDownXonoticWeaponsList(entity me, float scan, float ascii, float shift) +float XonoticWeaponsList_keyDown(entity me, float scan, float ascii, float shift) { if(ascii == 43) // + { -- 2.39.2