]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'origin/terencehill/newpanelhud' into fruitiex/newpanelhud
authorFruitieX <rasse@rasse-lappy.localdomain>
Thu, 17 Jun 2010 08:48:35 +0000 (11:48 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Thu, 17 Jun 2010 08:48:35 +0000 (11:48 +0300)
104 files changed:
qcsrc/menu/anim/animation.c
qcsrc/menu/anim/animhost.c
qcsrc/menu/anim/easing.c
qcsrc/menu/anim/keyframe.c
qcsrc/menu/auto-super.pl [new file with mode: 0644]
qcsrc/menu/item.c
qcsrc/menu/item/borderimage.c
qcsrc/menu/item/button.c
qcsrc/menu/item/checkbox.c
qcsrc/menu/item/container.c
qcsrc/menu/item/dialog.c
qcsrc/menu/item/gecko.c
qcsrc/menu/item/image.c
qcsrc/menu/item/inputbox.c
qcsrc/menu/item/inputcontainer.c
qcsrc/menu/item/label.c
qcsrc/menu/item/listbox.c
qcsrc/menu/item/modalcontroller.c
qcsrc/menu/item/nexposee.c
qcsrc/menu/item/radiobutton.c
qcsrc/menu/item/slider.c
qcsrc/menu/item/textslider.c
qcsrc/menu/menu.qc
qcsrc/menu/oo/base.h
qcsrc/menu/oo/classdefs.h
qcsrc/menu/oo/constructors.h
qcsrc/menu/oo/implementation.h
qcsrc/menu/xonotic/bigbutton.c
qcsrc/menu/xonotic/bigcommandbutton.c
qcsrc/menu/xonotic/button.c
qcsrc/menu/xonotic/campaign.c
qcsrc/menu/xonotic/charmap.c
qcsrc/menu/xonotic/checkbox.c
qcsrc/menu/xonotic/checkbox_slider_invalid.c
qcsrc/menu/xonotic/colorbutton.c
qcsrc/menu/xonotic/colorpicker.c
qcsrc/menu/xonotic/commandbutton.c
qcsrc/menu/xonotic/credits.c
qcsrc/menu/xonotic/crosshairbutton.c
qcsrc/menu/xonotic/cvarlist.c
qcsrc/menu/xonotic/demolist.c
qcsrc/menu/xonotic/dialog.c
qcsrc/menu/xonotic/dialog_credits.c
qcsrc/menu/xonotic/dialog_hudpanel_chat.c
qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.c
qcsrc/menu/xonotic/dialog_hudpanel_inventory.c
qcsrc/menu/xonotic/dialog_hudpanel_modicons.c
qcsrc/menu/xonotic/dialog_hudpanel_notification.c
qcsrc/menu/xonotic/dialog_hudpanel_powerups.c
qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.c
qcsrc/menu/xonotic/dialog_hudpanel_racetimer.c
qcsrc/menu/xonotic/dialog_hudpanel_radar.c
qcsrc/menu/xonotic/dialog_hudpanel_score.c
qcsrc/menu/xonotic/dialog_hudpanel_timer.c
qcsrc/menu/xonotic/dialog_hudpanel_vote.c
qcsrc/menu/xonotic/dialog_hudpanel_weaponicons.c
qcsrc/menu/xonotic/dialog_hudsetup_exit.c
qcsrc/menu/xonotic/dialog_multiplayer.c
qcsrc/menu/xonotic/dialog_multiplayer_create.c
qcsrc/menu/xonotic/dialog_multiplayer_create_advanced.c
qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.c
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c
qcsrc/menu/xonotic/dialog_multiplayer_demo.c
qcsrc/menu/xonotic/dialog_multiplayer_join.c
qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup_waypoint.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup_weapons.c
qcsrc/menu/xonotic/dialog_news.c
qcsrc/menu/xonotic/dialog_quit.c
qcsrc/menu/xonotic/dialog_settings.c
qcsrc/menu/xonotic/dialog_settings_audio.c
qcsrc/menu/xonotic/dialog_settings_effects.c
qcsrc/menu/xonotic/dialog_settings_input.c
qcsrc/menu/xonotic/dialog_settings_input_userbind.c
qcsrc/menu/xonotic/dialog_settings_misc.c
qcsrc/menu/xonotic/dialog_settings_misc_cvars.c
qcsrc/menu/xonotic/dialog_settings_network.c
qcsrc/menu/xonotic/dialog_settings_video.c
qcsrc/menu/xonotic/dialog_singleplayer.c
qcsrc/menu/xonotic/dialog_singleplayer_winner.c
qcsrc/menu/xonotic/dialog_teamselect.c
qcsrc/menu/xonotic/gametypebutton.c
qcsrc/menu/xonotic/image.c
qcsrc/menu/xonotic/inputbox.c
qcsrc/menu/xonotic/keybinder.c
qcsrc/menu/xonotic/listbox.c
qcsrc/menu/xonotic/mainwindow.c
qcsrc/menu/xonotic/maplist.c
qcsrc/menu/xonotic/nexposee.c
qcsrc/menu/xonotic/playerlist.c
qcsrc/menu/xonotic/playermodel.c
qcsrc/menu/xonotic/radiobutton.c
qcsrc/menu/xonotic/rootdialog.c
qcsrc/menu/xonotic/serverlist.c
qcsrc/menu/xonotic/skinlist.c
qcsrc/menu/xonotic/slider.c
qcsrc/menu/xonotic/slider_decibels.c
qcsrc/menu/xonotic/slider_resolution.c
qcsrc/menu/xonotic/tab.c
qcsrc/menu/xonotic/tabcontroller.c
qcsrc/menu/xonotic/textlabel.c
qcsrc/menu/xonotic/textslider.c
qcsrc/menu/xonotic/weaponslist.c

index d6fb114c2c4a9c113ccaaa5cd7732a093679c03c..99ccc789681552dd1f5c96cee4244921c39d88b1 100644 (file)
@@ -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;
index 41a26d5e0dace443b32be76b912810c04d4e9a38..fc345e44588a1fba5f8c77714524b310101ae28b 100644 (file)
@@ -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)
index f14a4be0a602625b3d1dae98e3579f5bc553cc1f..94ea9cf0872da839e836be94e28cda460f029bab 100644 (file)
@@ -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;
 }
index 95fbf63ccefe5b15d5acc6a019db25a868d2fedf..de5d54ae1002ad79486867e1a8f4d83da5a152f0 100644 (file)
@@ -6,7 +6,7 @@ CLASS(Keyframe) EXTENDS(Animation)
        ATTRIB(Keyframe, currentChild, entity, NULL)
        ATTRIB(Keyframe, firstChild, entity, NULL)
        ATTRIB(Keyframe, lastChild, entity, NULL)
-ENDCLASS(Animation)
+ENDCLASS(Keyframe)
 entity makeHostedKeyframe(entity, void(entity, float), float, float, float);
 entity makeKeyframe(entity, void(entity, float), float, float, float);
 float getNewChildStart(entity);
@@ -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
new file mode 100644 (file)
index 0000000..00926d0
--- /dev/null
@@ -0,0 +1,101 @@
+my %classoffile = ();
+my %classes = ();
+my %baseclass = ();
+my %methods = ();
+my %attrs = ();
+my %methodnames = ();
+my %old2new = ();
+
+print STDERR "Scanning...\n";
+for my $f(@ARGV)
+{
+       open my $fh, '<', $f;
+       while(<$fh>)
+       {
+               if(/^CLASS\(([^)]*)\)(?:\s*EXTENDS\(([^)]*)\))?/)
+               {
+                       $classes{$1} = defined($2) ? $2 : "Object";
+                       $classoffile{$f} = $1;
+               }
+               if(/^\s*METHOD\(([^),]*),\s*([^),]*)/)
+               {
+                       $methods{$1}{$2} = $1;
+                       $methodnames{"$1"."_"."$2"} = $f;
+                       $old2new{"$2$1"} = "$1"."_"."$2";
+               }
+               if(/^\s*ATTRIB(?:ARRAY)?\(([^),]*),\s*([^),]*)/)
+               {
+                       $attrs{$1}{$2} = $1;
+               }
+       }
+       close $fh;
+}
+
+# propagate down methods etc.
+print STDERR "Propagating...\n";
+for my $class(keys %classes)
+{
+       print STDERR "$class";
+       my $base = $class;
+       for(;;)
+       {
+               $base = $classes{$base};
+               last if not defined $base;
+               print STDERR " -> $base";
+               while(my ($method, $definingclass) = each %{$methods{$base}})
+               {
+                       $methods{$class}{$method} = $definingclass
+                               if not defined $methods{$class}{$method};
+               }
+               while(my ($attr, $definingclass) = each %{$attrs{$base}})
+               {
+                       $attrs{$class}{$attr} = $definingclass
+                               if not defined $attrs{$class}{$attr};
+               }
+       }
+       print STDERR "\n";
+}
+
+# change all calls to base method to super, complain about skipping
+print STDERR "Fixing...\n";
+for my $f(@ARGV)
+{
+       open my $fh, '<', $f;
+       my $s = do { undef local $/; <$fh>; };
+       my $s0 = $s;
+       close $fh;
+
+       my $class = $classoffile{$f};
+       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)
+       {
+               my ($search, $replace) = @$_;
+               my $n = ($s =~ s/\b$search\b/$replace/g);
+               print STDERR "[$f] $search -> $replace... $n replacements\n"
+                       if $n;
+       }
+
+       for(grep { $methodnames{$_} ne $f } keys %methodnames)
+       {
+               if($s =~ /\b$_\b/)
+               {
+                       print STDERR "[$f] calls non-super external method directly: $_\n";
+               }
+       }
+
+       if($s ne $s0)
+       {
+               print STDERR "Rewriting $f...\n";
+               open my $fh, '>', $f;
+               print $fh $s;
+               close $fh;
+       }
+}
index b249ce9eb713ae20e30fd1507c639a6806719946..497d1cf661699974a640bcf86e28a22b8d840e57 100644 (file)
@@ -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;
 }
index 1bb458ad1d1d365b4591d5eaeb372583bd12d5e3..0229b53a55b9d6e18a72ba6e97bdd313d92d5193 100644 (file)
@@ -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)
@@ -30,12 +30,12 @@ void resizeNotifyBorderImage(entity me, vector relOrigin, vector relSize, vector
        {
                vector scrs;
                scrs = eX * conwidth + eY * conheight;
-               resizeNotifyLabel(me, relOrigin, relSize, boxToGlobal(me.parent.Nexposee_smallOrigin, '0 0 0', scrs), boxToGlobalSize(me.parent.Nexposee_smallSize, scrs));
+               SUPER(BorderImage).resizeNotify(me, relOrigin, relSize, boxToGlobal(me.parent.Nexposee_smallOrigin, '0 0 0', scrs), boxToGlobalSize(me.parent.Nexposee_smallSize, scrs));
                me.realOrigin_y = me.realFontSize_y * me.zoomedOutTitleBarPosition;
                me.realOrigin_Nexposeed = me.realOrigin;
                me.realFontSize_Nexposeed = me.realFontSize;
        }
-       resizeNotifyLabel(me, relOrigin, relSize, absOrigin, absSize);
+       SUPER(BorderImage).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
        me.borderVec = me.borderHeight / absSize_y * (eY + eX * (absSize_y / absSize_x));
        me.realOrigin_y = 0.5 * (me.borderVec_y - me.realFontSize_y);
        if(me.closeButton)
@@ -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");
 
@@ -76,7 +76,7 @@ void drawBorderImage(entity me)
                        draw_fontscale = globalToBoxSize(boxToGlobalSize(df, me.realFontSize), rf);
                }
 
-               drawLabel(me);
+               SUPER(BorderImage).draw(me);
 
                if(me.isNexposeeTitleBar)
                {
index 096c75b805388d5bb81f21d03b8c9b4372ff8ff2..728413135ad1d5f8f9dfb6bd189e041e63aefef5 100644 (file)
@@ -35,20 +35,20 @@ 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;
        else
                me.keepspaceLeft = min(0.8, absSize_y / absSize_x);
-       resizeNotifyLabel(me, relOrigin, relSize, absOrigin, absSize);
+       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)
 {
-       configureLabelLabel(me, txt, sz, me.srcMulti ? 0.5 : 0);
+       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;
@@ -150,7 +150,7 @@ void drawButton(entity me)
 
        draw_alpha = save;
 
-       drawLabel(me);
+       SUPER(Button).draw(me);
 
        if(me.clickTime > 0 && me.clickTime <= frametime)
        {
index 40fa6675bd0df2ba8d1e92b51c8a4233bfa3d38a..5ae92d6122f097bf2d9b4e6060f6377d27229cad 100644 (file)
@@ -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(toStringLabel(me), ", ", me.checked ? "checked" : "unchecked");
+       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;
@@ -42,7 +42,7 @@ void drawCheckBox(entity me)
        }
        else
                me.srcSuffix = (me.checked ? "1" : "0");
-       drawButton(me);
+       SUPER(CheckBox).draw(me);
        me.pressed = s;
 }
 #endif
index 53e3eaa1acc57bdf1c787d21bf6801971bccf37a..b29eea0b80ea70c8ed805682d6e38665cd580b8f 100644 (file)
@@ -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;
@@ -98,15 +98,15 @@ void resizeNotifyLieContainer(entity me, vector relOrigin, vector relSize, vecto
                        }
        }
        while(d);
-       resizeNotifyItem(me, relOrigin, relSize, absOrigin, absSize);
+       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;
index 7733a60302e59c3cfea156a7b7e393bcb9082f5f..8202fbbb67e4c358989d96c20bae9eb2dd002cec 100644 (file)
@@ -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)
        {
@@ -186,6 +186,6 @@ float keyDownDialog(entity me, float key, float ascii, float shift)
                        return 1;
                }
        }
-       return keyDownInputContainer(me, key, ascii, shift);
+       return SUPER(Dialog).keyDown(me, key, ascii, shift);
 }
 #endif
index de0502fe632adff53a0bf51ea1438eaf5515ab3b..139e87e1a03903baa96650e607b8347cb780d93f 100644 (file)
@@ -1,23 +1,23 @@
 // 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')
-ENDCLASS(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')
+ENDCLASS(Gecko)
 #endif
 
 #ifdef IMPLEMENTATION
 // 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,21 +69,21 @@ 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)
 {
-       resizeNotifyItem(me, relOrigin, relSize, absOrigin, absSize);
+       SUPER(Gecko).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
        gecko_resize( me.texturePath, absSize_x, absSize_y );
        me.textureExtent = gecko_get_texture_extent( me.texturePath );
 }
index c60ec232f2c7b2f2e4e5539f02bb69a034711464..c64561b39b4d0e2f625cab044956fae9408db48c 100644 (file)
@@ -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,9 +59,9 @@ 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)
 {
-       resizeNotifyItem(me, relOrigin, relSize, absOrigin, absSize);
+       SUPER(Image).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
        me.updateAspect(me);
 }
 #endif
index 03e1605daff2411d2a426874be3c823355024972..cb1b32e8b1c9a4225e9e3bb09885b935e3945491 100644 (file)
@@ -31,18 +31,18 @@ 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)
 {
-       configureLabelLabel(me, theText, theFontSize, 0.0);
+       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);
-       setTextLabel(me, strzone(txt));
+       SUPER(InputBox).setText(me, strzone(txt));
 }
 
 void InputBox_Clear_Click(entity btn, entity me)
@@ -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;
@@ -303,14 +303,14 @@ void drawInputBox(entity me)
        }
        else
                draw_Text(me.realOrigin - eX * me.scrollPos, me.text, me.realFontSize, '1 1 1', 1, 0);
-               // skipping drawLabel(me);
+               // skipping SUPER(InputBox).draw(me);
        if(!me.focused || (time - me.lastChangeTime) < floor(time - me.lastChangeTime) + 0.5)
                draw_Text(me.realOrigin + eX * (cursorPosInWidths - me.scrollPos), CURSOR, me.realFontSize, '1 1 1', 1, 0);
 
        draw_ClearClip();
 }
 
-void showNotifyInputBox(entity me)
+void InputBox_showNotify(entity me)
 {
        me.focusable = !me.disabled;
 }
index 91e0012c888bd445fabe771d1ef4a81cb6e8c0ca..e1b14d3b1602d468d08ccdf6b26ef0aaf48b43df 100644 (file)
@@ -15,9 +15,9 @@ 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)
 {
-       resizeNotifyContainer(me, relOrigin, relSize, absOrigin, absSize);
+       SUPER(InputContainer).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
        /*
        if(me.parent.instanceOfInputContainer)
                me.isTabRoot = 0;
@@ -26,16 +26,16 @@ void resizeNotifyInputContainer(entity me, vector relOrigin, vector relSize, vec
        */
 }
 
-void focusLeaveInputContainer(entity me)
+void InputContainer_focusLeave(entity me)
 {
-       focusLeaveContainer(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(keyDownContainer(me, scan, ascii, shift))
+       if(SUPER(InputContainer).keyDown(me, scan, ascii, shift))
                return 1;
        if(scan == K_ESCAPE)
        {
@@ -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,37 +124,37 @@ float _changeFocusXYInputContainer(entity me, vector pos)
        return (ne != NULL);
 }
 
-float mouseDragInputContainer(entity me, vector pos)
+float InputContainer_mouseDrag(entity me, vector pos)
 {
-       if(mouseDragContainer(me, pos))
+       if(SUPER(InputContainer).mouseDrag(me, pos))
                return 1;
        if(pos_x >= 0 && pos_y >= 0 && pos_x < 1 && pos_y < 1)
                return 1;
        return 0;
 }
-float mouseMoveInputContainer(entity me, vector pos)
+float InputContainer_mouseMove(entity me, vector pos)
 {
        if(me._changeFocusXY(me, pos))
-               if(mouseMoveContainer(me, pos))
+               if(SUPER(InputContainer).mouseMove(me, pos))
                        return 1;
        if(pos_x >= 0 && pos_y >= 0 && pos_x < 1 && pos_y < 1)
                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))
-               if(mousePressContainer(me, pos))
+               if(SUPER(InputContainer).mousePress(me, pos))
                        return 1;
        if(pos_x >= 0 && pos_y >= 0 && pos_x < 1 && pos_y < 1)
                return 1;
        return 0;
 }
-float mouseReleaseInputContainer(entity me, vector pos)
+float InputContainer_mouseRelease(entity me, vector pos)
 {
        float r;
-       r = mouseReleaseContainer(me, pos);
+       r = SUPER(InputContainer).mouseRelease(me, pos);
        if(me.focused) // am I still eligible for this? (UGLY HACK, but a mouse event could have changed focus away)
                if(me._changeFocusXY(me, pos))
                        return 1;
index 1ac50be751e0d3853fd07f9b26b826edea4c4b83..5a6bb1c69745efc4d67333b73b08a99226f29b15 100644 (file)
@@ -26,18 +26,18 @@ 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)
 {
-       resizeNotifyItem(me, relOrigin, relSize, absOrigin, absSize);
+       SUPER(Label).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
        // absSize_y is height of label
        me.realFontSize_y = me.fontSize / absSize_y;
        me.realFontSize_x = me.fontSize / absSize_x;
@@ -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;
index d85b1d5285084566dae9598a08565312cd45bfd0..3dd873c33a23428e2acda977d9664fd50f563a1e 100644 (file)
@@ -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)
 {
-       resizeNotifyItem(me, relOrigin, relSize, absOrigin, 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);
 }
index 9befdabbfbd3976803c4b21600e5d5efa2045981..4bc2fb9bdea80ba65477c1cc502f67d264a03a52 100644 (file)
@@ -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;
@@ -222,10 +222,10 @@ void drawModalController(entity me)
                me.setFocus(me, NULL);
        else
                me.setFocus(me, front);
-       drawContainer(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,15 +239,15 @@ 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)
 {
-       addItemContainer(me, other, theOrigin, theSize, (other == me.firstChild) ? theAlpha : 0);
+       SUPER(ModalController).addItem(me, other, theOrigin, theSize, (other == me.firstChild) ? theAlpha : 0);
        other.ModalController_initialSize = other.Container_size;
        other.ModalController_initialOrigin = other.Container_origin;
        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)
        {
index 75ebf3701cdddb8ec97bba74ece080a11e61d402..c9232b192d62b3d40b97cb460288f8cd4deb6a67 100644 (file)
@@ -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;
@@ -161,7 +161,7 @@ void drawNexposee(entity me)
                        {
                                me.animationFactor = 1;
                                me.animationState = 2;
-                               setFocusContainer(me, me.selectedChild);
+                               SUPER(Nexposee).setFocus(me, me.selectedChild);
                        }
                        break;
                case 2:
@@ -206,19 +206,19 @@ void drawNexposee(entity me)
                e.Container_fontscale = globalToBoxSize(e.Container_size, e.Nexposee_initialSize);
        }
 
-       drawContainer(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;
-                       setFocusContainer(me, NULL);
+                       SUPER(Nexposee).setFocus(me, NULL);
                }
                else
                        me.close(me);
@@ -226,38 +226,38 @@ float mousePressNexposee(entity me, vector pos)
        }
        else if(me.animationState == 2)
        {
-               if not(mousePressContainer(me, pos))
+               if not(SUPER(Nexposee).mousePress(me, pos))
                {
                        me.animationState = 3;
-                       setFocusContainer(me, NULL);
+                       SUPER(Nexposee).setFocus(me, NULL);
                }
                return 1;
        }
        return 0;
 }
 
-float mouseReleaseNexposee(entity me, vector pos)
+float Nexposee_mouseRelease(entity me, vector pos)
 {
        if(me.animationState == 2)
-               return mouseReleaseContainer(me, pos);
+               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 mouseDragContainer(me, pos);
+               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;
        e = me.mouseFocusedChild;
        me.mouseFocusedChild = me.itemFromPoint(me, pos);
        if(me.animationState == 2)
-               return mouseMoveContainer(me, pos);
+               return SUPER(Nexposee).mouseMove(me, pos);
        if(me.animationState == 0)
        {
                if(me.mouseFocusedChild)
@@ -268,18 +268,18 @@ 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 keyUpContainer(me, scan, ascii, shift);
+               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)
-               if(keyDownContainer(me, scan, ascii, shift))
+               if(SUPER(Nexposee).keyDown(me, scan, ascii, shift))
                        return 1;
        if(scan == K_TAB)
        {
@@ -329,27 +329,27 @@ float keyDownNexposee(entity me, float scan, float ascii, float shift)
                        me.selectedChild = me.focusedChild;
                if not(me.selectedChild)
                        me.animationState = 0;
-               setFocusContainer(me, NULL);
+               SUPER(Nexposee).setFocus(me, NULL);
                return 1;
        }
        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)
 {
-       addItemContainer(me, other, theOrigin, theSize, theAlpha);
+       SUPER(Nexposee).addItem(me, other, theOrigin, theSize, theAlpha);
        other.Nexposee_initialSize = other.Container_size;
        other.Nexposee_initialOrigin = other.Container_origin;
        other.Nexposee_initialAlpha = other.Container_alpha;
 }
 
-void focusEnterNexposee(entity me)
+void Nexposee_focusEnter(entity me)
 {
        if(me.animationState == 2)
-               setFocusContainer(me, me.selectedChild);
+               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;
 }
index 34ef101a703dc16e11a7347ba16897e3c0244892..80fd5329b41f70f2dedab6ced75caea971e58284 100644 (file)
@@ -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;
index eeac0edd844ba43d3e1e25ae197cd2188eda9bd6..92f3b55fe12b56516d08fa781f0a07e74b56bd79 100644 (file)
@@ -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)
 {
-       resizeNotifyLabel(me, relOrigin, relSize, absOrigin, 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)
 {
-       configureLabelLabel(me, string_null, sz, theAlign);
+       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;
@@ -273,7 +273,7 @@ void drawSlider(entity me)
        }
        me.setText(me, me.valueToText(me, me.value));
        draw_alpha = save;
-       drawLabel(me);
+       SUPER(Slider).draw(me);
        me.text = string_null; // TEMPSTRING!
 }
 #endif
index b6a345481171b949904913e5010a6c57ac24bc08..c4a7af7a890e6a5d84ae4cf727e7cde8d5c5151f 100644 (file)
@@ -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,28 +31,28 @@ 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)
                if(me.valueToIdentifier(me, i) == id)
                {
-                       setValueSlider( me, i );
+                       SUPER(TextSlider).setValue( me, i );
                        return;
                }
-       setValueSlider( me, -1 );
+       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);
index e7fc1665a2c85040eda2fb2e8c327a9c77ae557f..7bec34ea0b0a1ff91aad1c9ed91d051f34ca7fc9 100644 (file)
@@ -762,8 +762,9 @@ void() m_shutdown =
        m_hide();
        for(e = NULL; (e = nextent(e)) != NULL; )
        {
-               if(e.destroy)
-                       e.destroy(e);
+               if(e.classname != "vtbl")
+                       if(e.destroy)
+                               e.destroy(e);
        }
 };
 
@@ -795,7 +796,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)
        {
index 65bfbf55607c82eb65e2003496d41519803614a5..3553d447a81fae55be9e7ab50cd2c17257fb594f 100644 (file)
@@ -1,8 +1,26 @@
 .string classname;
+entity Object_vtbl;
+.string vtblname;
+.entity vtblbase;
+entity spawnVtbl(entity e, entity b)
+{
+       entity v;
+       v = spawn();
+       copyentity(e, v);
+       v.vtblname = v.classname;
+       v.classname = "vtbl";
+       if(b)
+               v.vtblbase = b;
+       else
+               v.vtblbase = v;
+       return v;
+}
 entity spawnObject()
 {
        entity e;
        e = spawn();
        e.classname = "Object";
+       if(!Object_vtbl)
+               Object_vtbl = spawnVtbl(e, null_entity);
        return e;
 }
index b62638017dd4bdb0af36df4f69a4a412a4b20598..85bc6c2afa9fe6678c7f239de9343c649f7a4ad9 100644 (file)
 #undef ATTRIB
 #undef ATTRIBARRAY
 #undef ENDCLASS
+#undef SUPER
 #endif
 
-#define CLASS(cname)                       entity spawn##cname();
+#define CLASS(cname)                       entity spawn##cname(); entity cname##_vtbl;
 #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;
+#define SUPER(cname)
index 6aa2eafc4f9412bb8a184741c5ae749857bc9d44..4e758dd4727ad4c29012239b9166f40800826a2a 100644 (file)
 #undef ATTRIB
 #undef ATTRIBARRAY
 #undef ENDCLASS
+#undef SUPER
 #endif
 
 #define CLASS(cname)                       entity spawn##cname() { entity me;
-#define EXTENDS(base)                      me = spawn##base ();
-#define METHOD(cname,name,prototype)       me.name = name##cname;
+#define EXTENDS(base)                      me = spawn##base (); entity basevtbl; basevtbl = base##_vtbl;
+#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; return me; }
+#define ENDCLASS(cname)                    me.instanceOf##cname = 1; me.classname = #cname; if(!cname##_vtbl) cname##_vtbl = spawnVtbl(me, basevtbl); return me; }
+#define SUPER(cname)
index 24d914050e5c30b663469a9f29badd434228c3e7..ed6bd71f36087d7527c52fe03cef45388bb03c2b 100644 (file)
@@ -13,4 +13,7 @@
 #undef ATTRIB
 #undef ATTRIBARRAY
 #undef ENDCLASS
+#undef SUPER
 #endif
+
+#define SUPER(cname) (cname##_vtbl.vtblbase)
index 8a2a11757d80a891a8bec3c36d9b605bdfaf2780..a63189b63a850dc326e46216e7429f5d80ba98cb 100644 (file)
@@ -3,7 +3,7 @@ CLASS(XonoticBigButton) EXTENDS(XonoticButton)
        METHOD(XonoticBigButton, configureXonoticBigButton, void(entity, string, vector))
        ATTRIB(XonoticBigButton, image, string, SKINGFX_BUTTON_BIG)
        ATTRIB(XonoticBigButton, grayImage, string, SKINGFX_BUTTON_BIG_GRAY)
-ENDCLASS(XonoticButton)
+ENDCLASS(XonoticBigButton)
 entity makeXonoticButton(string theText, vector theColor);
 #endif
 
@@ -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);
 }
index a667f0e6121a50887d19ebd004e4f74947b1731f..c96dd57a16afcc614fedff7ce68d5a65b6076182 100644 (file)
@@ -3,7 +3,7 @@ CLASS(XonoticBigCommandButton) EXTENDS(XonoticCommandButton)
        METHOD(XonoticBigCommandButton, configureXonoticBigCommandButton, void(entity, string, vector, string, float))
        ATTRIB(XonoticBigCommandButton, image, string, SKINGFX_BUTTON_BIG)
        ATTRIB(XonoticBigCommandButton, grayImage, string, SKINGFX_BUTTON_BIG_GRAY)
-ENDCLASS(XonoticCommandButton)
+ENDCLASS(XonoticBigCommandButton)
 entity makeXonoticBigCommandButton(string theText, vector theColor, string theCommand, float closesMenu);
 #endif
 
@@ -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);
 }
index 2112c2c5002ae4020e43903d87fb2c0c57f8f698..5522905bc2a54cdf1baa07371e6972895c5a846a 100644 (file)
@@ -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')
        {
index 1550d3f6fc7e93df6cb637111fe3ca9312aff846..bd31f435e2f0d30e7bfcbb4c193bccfda3e5fb6c 100644 (file)
@@ -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,17 +203,17 @@ 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);
-       drawListBox(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';
-       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+       SUPER(XonoticCampaignList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
        me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
        me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
@@ -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,18 +307,18 @@ 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
-       setSelectedListBox(me, min(i, me.campaignIndex));
+       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);
        else
-               return keyDownListBox(me, scan, ascii, shift);
+               return SUPER(XonoticCampaignList).keyDown(me, scan, ascii, shift);
        return 1;
 }
 #endif
index 5547403251dcff62c388c446e9bb0082207e3178..21a4aad6f33fa77784fc49a1ab57173acdbdc10d 100644 (file)
@@ -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)
        {
@@ -139,6 +139,6 @@ void drawXonoticCharmap(entity me)
                        draw_Picture(c, me.image2, '0.0625 0.1 0', '1 1 1', 1);
                }
        }
-       drawImage(me);
+       SUPER(XonoticCharmap).draw(me);
 }
 #endif
index ad8216a9fe64c8b90c96229381692224dc369d0b..c28edcc07070982cd6d6353d3629a3303d6ee231 100644 (file)
@@ -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;
index ea05c3fd067dd63699246b247c1a92f8aa27aaea..a9d2becc3d9ef8f47f7c5309918634a856edddad 100644 (file)
@@ -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;
-       drawCheckBox(me);
+       SUPER(XonoticSliderCheckBox).draw(me);
 }
-void setCheckedXonoticSliderCheckBox(entity me, float val)
+void XonoticSliderCheckBox_setChecked(entity me, float val)
 {
        if(me.checked == val)
                return;
index 84281b6af3229de04ecf39d696aa3961255fffb6..2ca8c86c4078d056c86ba0d8512709b7d45b5df8 100644 (file)
@@ -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,9 +68,9 @@ 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);
-       drawCheckBox(me);
+       SUPER(XonoticColorButton).draw(me);
 }
 #endif
index a8403aee955b79c5171fd1c7e8e1b000894eb92c..b888358c3748fe6919a39da1a3f038f90702bc84 100644 (file)
@@ -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,23 +97,23 @@ 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)
 {
-       drawImage(me);
+       SUPER(XonoticColorpicker).draw(me);
 
        float B, C, aC;
        C = cvar("r_textcontrast");
index b54805c7382c3baa09f4cb3a9ccc7ca520022895..8ee4e7de3a75503215591c49e643a68768c580bf 100644 (file)
@@ -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;
index 9beb213c22c29df1989c29745ada4fb532b80183..5c2f1585c462479d2c47486599456d36beb09511 100644 (file)
@@ -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)
@@ -47,17 +47,17 @@ void drawXonoticCreditsList(entity me)
                i = max(i, ceil(me.scrollPos / me.itemHeight));
                me.setSelected(me, i);
        }
-       drawListBox(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)
 {
-       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+       SUPER(XonoticCreditsList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
        me.realFontSize_y = me.fontSize / (absSize_y * me.itemHeight);
        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;
@@ -102,7 +102,7 @@ float keyDownXonoticCreditsList(entity me, float scan, float ascii, float shift)
        else if(scan == K_DOWNARROW)
                me.scrollPos = min(me.scrollPos + me.itemHeight, me.nItems * me.itemHeight - 1);
        else
-               return keyDownListBox(me, scan, ascii, shift);
+               return SUPER(XonoticCreditsList).keyDown(me, scan, ascii, shift);
 
        i = min(me.selectedItem, floor((me.scrollPos + 1) / me.itemHeight - 1));
        i = max(i, ceil(me.scrollPos / me.itemHeight));
index 209677ff5df16248d727f7aa945b01053356e403..b290f3d218b1faab5a5ee5de4e8ff7770a827a09 100644 (file)
@@ -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;
@@ -72,7 +72,7 @@ void drawXonoticCrosshairButton(entity me)
                rgb = '1 1 1';
        }
 
-       drawCheckBox(me);
+       SUPER(XonoticCrosshairButton).draw(me);
 
        sz = draw_PictureSize(me.src3);
        sz = globalToBoxSize(sz, draw_scale);
index cf3cd940fa52d13c55d451cd82fdcf9eb1b01a63..387396bbaf050b0001950d589d8ecdf24d2a276d 100644 (file)
@@ -43,7 +43,7 @@ entity makeXonoticCvarList()
        me.configureXonoticCvarList(me);
        return me;
 }
-void configureXonoticCvarListXonoticCvarList(entity me)
+void XonoticCvarList_configureXonoticCvarList(entity me)
 {
        me.configureXonoticListBox(me);
 
@@ -51,15 +51,15 @@ 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;
 
-       setSelectedListBox(me, i);
+       SUPER(XonoticCvarList).setSelected(me, i);
        if(me.nItems == 0)
                return;
        
@@ -107,9 +107,9 @@ 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)
 {
-       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+       SUPER(XonoticCvarList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
        me.realFontSize_y = me.fontSize / (absSize_y * me.itemHeight);
        me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth));
@@ -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,9 +155,9 @@ 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(keyDownListBox(me, scan, ascii, shift))
+       if(SUPER(XonoticCvarList).keyDown(me, scan, ascii, shift))
                return 1;
        else if(!me.controlledTextbox)
                return 0;
index 7a2d338ea382efc88361ca91daa48bff07cf7112..0882a3ed4af375cfb0b157c411c3fe112e27c311 100644 (file)
@@ -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,15 +74,15 @@ 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';
-    resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+    SUPER(XonoticDemoList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
     me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
     me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
@@ -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,14 +153,14 @@ 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);
         return 1;
     }
     else
-        return keyDownListBox(me, scan, ascii, shift);
+        return SUPER(XonoticDemoList).keyDown(me, scan, ascii, shift);
 }
 #endif
 
index badfbaf4449b1a015ee005b457f9b53928d020ab..7087d83cb9707987437edd588a45f71119ec8b14 100644 (file)
@@ -33,10 +33,10 @@ entity currentDialog;
 #endif
 
 #ifdef IMPLEMENTATION
-void configureDialogXonoticDialog(entity me)
+void XonoticDialog_configureDialog(entity me)
 {
        currentDialog = me;
-       configureDialogDialog(me);
+       SUPER(XonoticDialog).configureDialog(me);
        me.tooltip = getZonedTooltipForIdentifier(me.classname);
 }
 #endif
index bcd3545d9cb67a6a1b65e5984b2bf255febb09f3..07c2fc4f293bca09b22c1089263c274e66324bc2 100644 (file)
@@ -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;
 }
index 693c7ad7003d00271623f3eeb85d143de95a69be..cd9f3854b903f60257b6668424fe09615e890d1f 100644 (file)
@@ -11,7 +11,7 @@ ENDCLASS(XonoticHUDChatDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticHUDChatDialog(entity me)
+void XonoticHUDChatDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
index 246fd65f5c5f130281b1edee931e0184eedd1259..e2e896b3840b2cb3b1c2ebbf5e14e0e9988a1619 100644 (file)
@@ -11,7 +11,7 @@ ENDCLASS(XonoticHUDHealthArmorDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticHUDHealthArmorDialog(entity me)
+void XonoticHUDHealthArmorDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
index 2234bfc158ff275eb20886ccaec44027241287ad..b67210a1e32e5c4e9edd994ef2e8bd23f601a364 100644 (file)
@@ -11,7 +11,7 @@ ENDCLASS(XonoticHUDInventoryDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticHUDInventoryDialog(entity me)
+void XonoticHUDInventoryDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
index a03a325cb6b05c6545ae809bc05075627ff80ef5..8635dae06cc85220d00a8113d1e217f99f33fd6d 100644 (file)
@@ -11,7 +11,7 @@ ENDCLASS(XonoticHUDModIconsDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticHUDModIconsDialog(entity me)
+void XonoticHUDModIconsDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
index 45accec2d25b4664978403a74d0f4812f9272621..503d50a47fe9b83296c42886fd03186d836b9943 100644 (file)
@@ -11,7 +11,7 @@ ENDCLASS(XonoticHUDNotificationDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticHUDNotificationDialog(entity me)
+void XonoticHUDNotificationDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
index e33c0c8bac2a709eb16f04e213835de81aa76bec..b6d42326de1b99e0017a6e1a80cfd22955515475 100644 (file)
@@ -11,7 +11,7 @@ ENDCLASS(XonoticHUDPowerupsDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticHUDPowerupsDialog(entity me)
+void XonoticHUDPowerupsDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
index 51b7c574964a6480458b92d9bc8737423d7a4063..9b66fc3cbac5fadfe8e57a4f531d16acb1a5a0b5 100644 (file)
@@ -11,7 +11,7 @@ ENDCLASS(XonoticHUDPressedKeysDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticHUDPressedKeysDialog(entity me)
+void XonoticHUDPressedKeysDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
index 9b70a43399c07a388dff0d3d31d235d955e6f7f5..7fe0f682e9a693eb2f3b0c24af780563ccec7c61 100644 (file)
@@ -11,7 +11,7 @@ ENDCLASS(XonoticHUDRaceTimerDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticHUDRaceTimerDialog(entity me)
+void XonoticHUDRaceTimerDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
index 0ed16f4126c8881f8fb22346728666bb4f06537f..a0ead55ef921604541b9b0c8f2bcc50953fbf9cb 100644 (file)
@@ -11,7 +11,7 @@ ENDCLASS(XonoticHUDRadarDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticHUDRadarDialog(entity me)
+void XonoticHUDRadarDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
index b7d8018956fe6944c81d2bfa8736b50eb9060e6b..05fdb74f1076c1773aeca56f0bc1ba14f812c022 100644 (file)
@@ -11,7 +11,7 @@ ENDCLASS(XonoticHUDScoreDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticHUDScoreDialog(entity me)
+void XonoticHUDScoreDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
index 5bf62a2627e8968dcc84237e614ee5df4f46c0b3..6bfa03b995b7dbc1d3b3f83846200ec3f69f4147 100644 (file)
@@ -11,7 +11,7 @@ ENDCLASS(XonoticHUDTimerDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticHUDTimerDialog(entity me)
+void XonoticHUDTimerDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
index df50e039e0543b0b6441c6922c579866a981c499..e96af574aad69cd187a7897194ab13e17845a50f 100644 (file)
@@ -11,7 +11,7 @@ ENDCLASS(XonoticHUDVoteDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticHUDVoteDialog(entity me)
+void XonoticHUDVoteDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
index 7e1be44ddf19b8c622490c636e9d2c13d84f41b2..1a55bced0bf95c9b09979e9adeac00dc6b359f58 100644 (file)
@@ -11,7 +11,7 @@ ENDCLASS(XonoticHUDWeaponIconsDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticHUDWeaponIconsDialog(entity me)
+void XonoticHUDWeaponIconsDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
index 37dee5faf9a64f5019a1a94b6ee87113acbd596a..da75603f4933d948ed6c2a38dca31540258a1267 100644 (file)
@@ -12,7 +12,7 @@ ENDCLASS(XonoticHUDExitDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticHUDExitDialog(entity me)
+void XonoticHUDExitDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
index 6bbe66dd164a44aba1cc6849ddb1844431ded24f..e755710c5b31bb0bb69de0cb5d85be32c85f4380 100644 (file)
@@ -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);
index 51ed2d442bf81d16f58b41b7e66f77f47c88a959..3aea0e4858615ec2b5f2e8c72d4a49426daf16f5 100644 (file)
@@ -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;
index 160f15d2658a36dbcc15eaeeda2eca051a951c56..2d75d43652512e6cdcf2dac5b010de2bf13f320f 100644 (file)
@@ -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,10 +69,10 @@ void fillXonoticAdvancedDialog(entity me)
                        e.onClickEntity = me;
 }
 
-void closeXonoticAdvancedDialog(entity me)
+void XonoticAdvancedDialog_close(entity me)
 {
        if(me.refilterEntity)
                me.refilterEntity.refilter(me.refilterEntity);
-       closeDialog(me);
+       SUPER(XonoticAdvancedDialog).close(me);
 }
 #endif
index e4056ba7ef3d8f0aa4a0ff96c6f621c097d41e01..05ed89887d3ce94f165028a286896b37addb89e3 100644 (file)
@@ -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;
index 12d7e4fccb980ce15b539d6a80ae9662faa55bb1..517f68bd311b7ee10176b8f8ab1e9b8a65127905 100644 (file)
@@ -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,10 +276,10 @@ void fillXonoticMutatorsDialog(entity me)
                        e.onClickEntity = me;
 }
 
-void closeXonoticMutatorsDialog(entity me)
+void XonoticMutatorsDialog_close(entity me)
 {
        if(me.refilterEntity)
                me.refilterEntity.refilter(me.refilterEntity);
-       closeDialog(me);
+       SUPER(XonoticMutatorsDialog).close(me);
 }
 #endif
index 20d8c9d42f1534d678064deabcba1233f843825a..ec57b7fca809ec5e917f1bceafc6d82e59bf07c5 100644 (file)
@@ -18,7 +18,7 @@ entity makeXonoticDemoBrowserTab()
        me.configureDialog(me);
        return me;
 }
-void fillXonoticDemoBrowserTab(entity me)
+void XonoticDemoBrowserTab_fill(entity me)
 {
        entity e;
        entity btn;
index 130f2dea0e66905a1d5426c174d062c67f0eb49f..799d33455f19f0015025c141d4e84612c01089ab 100644 (file)
@@ -18,7 +18,7 @@ entity makeXonoticServerListTab()
        me.configureDialog(me);
        return me;
 }
-void fillXonoticServerListTab(entity me)
+void XonoticServerListTab_fill(entity me)
 {
        entity e, slist, btn;
 
index 0eb42c144eedf656f39d4d4374e668a1b6586b84..7770230d316d1d39bc1930499e92c8291496fdb8 100644 (file)
@@ -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);
index 68842113e77d087916b7167fe9e0bb6e4070171c..4769c5878095cdbda8616237b77a3aa64a4c56da 100644 (file)
@@ -23,15 +23,15 @@ 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);
        else
                me.playerNameLabel.alpha = me.playerNameLabelAlpha;
-       drawContainer(me);
+       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;
index 82c3bf5975ef509471a38f8891e5335573c6bc2d..584e1d9b1cd0f448a80c3518319aa54b04b04280 100644 (file)
@@ -12,15 +12,15 @@ ENDCLASS(XonoticWaypointDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void showNotifyXonoticWaypointDialog(entity me)
+void XonoticWaypointDialog_showNotify(entity me)
 {
         loadAllCvars(me);
 }
-string toStringXonoticWaypointDialog(entity me)
+string XonoticWaypointDialog_toString(entity me)
 {
        return "XXX";
 }
-void fillXonoticWaypointDialog(entity me)
+void XonoticWaypointDialog_fill(entity me)
 {
        entity e, sl;
        
index 0b31a823f15a0674123f69d4af81250b4c1c1136..ca6d705c6fd68df9a85226533dd8573c9601faa5 100644 (file)
@@ -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;
 
index 67de2d214534327b5acc6c878b4c63fc539e57a3..cfe91afceece6fe5e7ca8c57dc7fe2877203ece5 100644 (file)
@@ -10,7 +10,7 @@ ENDCLASS(XonoticNewsDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticNewsDialog(entity me)
+void XonoticNewsDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
index a58b2e4555eb2602938cb39a332520a6cbecfe66..0229e026766d4037daa76339c003a3e910f4a80f 100644 (file)
@@ -10,7 +10,7 @@ ENDCLASS(XonoticQuitDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticQuitDialog(entity me)
+void XonoticQuitDialog_fill(entity me)
 {
        entity e;
        me.TR(me);
index f0adf0488a6d8a593e72596b8108a152cb91498f..1f19bf656531e1bc26d27d9f49e487ec5395515e 100644 (file)
@@ -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);
index 7c3c754d4cce746dbb49ad9acf44c44ec8814fa4..7d1f17f0f2c51609f13d2af59e5129594dba87a2 100644 (file)
@@ -18,7 +18,7 @@ entity makeXonoticAudioSettingsTab()
        return me;
 }
 
-void fillXonoticAudioSettingsTab(entity me)
+void XonoticAudioSettingsTab_fill(entity me)
 {
        entity e, s, sl;
 
index eb080a50f5f8ada5697f4dbc8ba9a326dbeb05ba..fcb2b8ccfd7205cdd4156a890002b4a1f6a4d499 100644 (file)
@@ -29,7 +29,7 @@ float someShadowCvarIsEnabled(entity box)
        return FALSE;
 }
 
-void fillXonoticEffectsSettingsTab(entity me)
+void XonoticEffectsSettingsTab_fill(entity me)
 {
        entity e, s;
        float n;
index bd6ade81b96692f1fe81c00df1b32db0bcfc1227..00a056fcadc08ec838dd0bb956b96b3efdb36027 100644 (file)
@@ -17,7 +17,7 @@ entity makeXonoticInputSettingsTab()
        me.configureDialog(me);
        return me;
 }
-void fillXonoticInputSettingsTab(entity me)
+void XonoticInputSettingsTab_fill(entity me)
 {
        entity e;
        entity kb;
index 38660b89a8d2a8544d69c31594d2564391a1f4b0..3cdfa95b739c957670fc42ff5d17a36e2c3098f4 100644 (file)
@@ -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);
index 2494d4593fb8df6181040d7b1a8265179522969d..2dcf83f1f044ac34658d21819637cfd90bc57442 100644 (file)
@@ -17,7 +17,7 @@ entity makeXonoticMiscSettingsTab()
        me.configureDialog(me);
        return me;
 }
-void fillXonoticMiscSettingsTab(entity me)
+void XonoticMiscSettingsTab_fill(entity me)
 {
        entity e;
        entity sk;
index c8bc46cdcaf1ae287922d6b50690a086293930ee..0d846caf2ae5f60643f4b8b376bd7a0c89e86278 100644 (file)
@@ -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();
index 929da470df03d705bdba695e35258a8ab84260fd..6e0c472afb4dc07a92a6a175f457d584353323a5 100644 (file)
@@ -18,7 +18,7 @@ entity makeXonoticNetworkSettingsTab()
        return me;
 }
 
-void fillXonoticNetworkSettingsTab(entity me)
+void XonoticNetworkSettingsTab_fill(entity me)
 {
        entity e;
 
index 5eb228ae9323710656ee6ac0ca0e8e57d73379d2..dd2f960c730af59c7b97ee480363e21c909a00bb 100644 (file)
@@ -18,7 +18,7 @@ entity makeXonoticVideoSettingsTab()
        me.configureDialog(me);
        return me;
 }
-void fillXonoticVideoSettingsTab(entity me)
+void XonoticVideoSettingsTab_fill(entity me)
 {
        entity e;
 
index e8b1d943a79d949a29ea68a311f3d128c8d732d7..560192ff1d6edfdb6021f796b8de44e7b74c1938 100644 (file)
@@ -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;
 
index b0df2d3d29ff1ef27fa3f17f78aaa91319621a80..5d377e6d0a1747d0884fa1f235fef802cc413e17 100644 (file)
@@ -10,7 +10,7 @@ ENDCLASS(XonoticWinnerDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void fillXonoticWinnerDialog(entity me)
+void XonoticWinnerDialog_fill(entity me)
 {
        entity e;
 
index 4a2f81231f9d2f998b2f5f3ee20fe7fc30df0a13..e0908ee364d76d3b4666adfb3dbe1ad981cfcb36 100644 (file)
@@ -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);
index f88cb0029cf19eb6d071489093c0cd48923a5d2b..c1dc04c7300e53f0c297ea804723121bd1b6c667 100644 (file)
@@ -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;
index 65f5ee9d817b84957f105519ae5789ad8b32e2ab..9f0de67b8a1deb592ddf0aff2eb8c6f5b03097d0 100644 (file)
@@ -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;
index 0793ae181227fade01f859aa06b40c9c4ddfdb97..26dc4536c477fa198a1abdf44c2adac91833ebb5 100644 (file)
@@ -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,33 +44,33 @@ 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)
        {
-               setTextInputBox(me, new);
+               SUPER(XonoticInputBox).setText(me, new);
                me.onChange(me, me.onChangeEntity);
        }
        else
-               setTextInputBox(me, new);
+               SUPER(XonoticInputBox).setText(me, new);
 }
-void loadCvarsXonoticInputBox(entity me)
+void XonoticInputBox_loadCvars(entity me)
 {
        if not(me.cvarName)
                return;
-       setTextInputBox(me, cvar_string(me.cvarName));
+       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;
@@ -83,7 +83,7 @@ float keyDownXonoticInputBox(entity me, float key, float ascii, float shift)
                }
                me.onEnter(me, me.onEnterEntity);
        }
-       if(keyDownInputBox(me, key, ascii, shift))
+       if(SUPER(XonoticInputBox).keyDown(me, key, ascii, shift))
                r = 1;
        return r;
 }
index 6b490be23115a380ece36e67930e7551b0f73f32..bb16e0888956ca61d830a2cece4b2a5374cffd63 100644 (file)
@@ -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,9 +76,9 @@ 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)
 {
-       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+       SUPER(XonoticKeyBinder).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
        me.realFontSize_y = me.fontSize / (absSize_y * me.itemHeight);
        me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth));
@@ -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));
@@ -231,9 +231,9 @@ void setSelectedXonoticKeyBinder(entity me, float i)
                me.previouslySelected = i;
        if(me.userbindEditButton)
                me.userbindEditButton.disabled = (substring(Xonotic_KeyBinds_Descriptions[i], 0, 1) != "$");
-       setSelectedListBox(me, i);
+       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;
@@ -248,12 +248,12 @@ float keyDownXonoticKeyBinder(entity me, float key, float ascii, float shift)
                        KeyBinder_Bind_Clear(me, me);
                        break;
                default:
-                       r = keyDownListBox(me, key, ascii, shift);
+                       r = SUPER(XonoticKeyBinder).keyDown(me, key, ascii, shift);
                        break;
        }
        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;
index ce08d4bf4d762985dda216d1d54aa69a4235cd51..23fa58d83263637ede8ab7c0311cfe1a9f7e5e19 100644 (file)
@@ -25,13 +25,13 @@ 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;
-       resizeNotifyListBox(me, relOrigin, relSize, absOrigin, absSize);
+       SUPER(XonoticListBox).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 }
 #endif
index 00da54b59e45aabec936b3fe48141f9dce0b9fea..f1cbfffc7555f42d1eedacc0b500811cc5d3b926 100644 (file)
@@ -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;
 
index 9bce96dfd776bdd0520eee3545873211be46732e..7a5a4ba150c6f5d332eaaa0648c3cd0961c3ac96 100644 (file)
@@ -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,17 +113,17 @@ 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));
-       drawListBox(me);
+       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';
-       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+       SUPER(XonoticMapList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
        me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
        me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
@@ -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)
@@ -348,7 +348,7 @@ float keyDownXonoticMapList(entity me, float scan, float ascii, float shift)
                        me.setSelected(me, MapInfo_FindName_firstResult);
        }
        else
-               return keyDownListBox(me, scan, ascii, shift);
+               return SUPER(XonoticMapList).keyDown(me, scan, ascii, shift);
        return 1;
 }
 
index 32253b0c0eaef1efef0f9c463a65ede8761a50ee..b375393c02a30047a31ed6442a0c7d16d6bc4a5a 100644 (file)
@@ -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
 }
index 4406e58055b6232a0809f5ea48f48d8f62279866..f409a1b99df2742445a88bd1cfe1ea3b5f63ce2b 100644 (file)
@@ -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,15 +71,15 @@ 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';
-       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+       SUPER(XonoticPlayerList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
        me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
        me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
@@ -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;
index 27d5721afd3c6d432e50fc50e15049989c0a7548..585a5f7fc1cf342c1dd919eb81959eb750a0b119 100644 (file)
@@ -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,19 +149,19 @@ 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;
 
-       drawImage(me);
+       SUPER(XonoticPlayerModelSelector).draw(me);
 
        // draw text on the image, handle \n in the description
        draw_CenterText('0.5 0 0', me.currentModelTitle, me.realFontSize * (me.titleFontSize / me.fontSize), SKINCOLOR_MODELTITLE, SKINALPHA_MODELTITLE, FALSE);
@@ -174,9 +174,9 @@ 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)
 {
-       resizeNotifyImage(me, relOrigin, relSize, absOrigin, absSize);
+       SUPER(XonoticPlayerModelSelector).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
        me.realFontSize_y = me.fontSize / absSize_y;
        me.realFontSize_x = me.fontSize / absSize_x;
 }
index 0281a542db6db7cda64db38a99461a28efbfe16b..8c353eae6725aec683419db78b88d6e3ce5274d5 100644 (file)
@@ -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)
@@ -89,9 +89,9 @@ void drawXonoticRadioButton(entity me)
                        if(!found)
                                me.setChecked(me, 1);
                }
-       drawCheckBox(me);
+       SUPER(XonoticRadioButton).draw(me);
 }
-void saveCvarsXonoticRadioButton(entity me)
+void XonoticRadioButton_saveCvars(entity me)
 {
        if(me.cvarValue)
        {
index d784cba4498262a1f1fc8d437969080ac3135d16..efc00822d8f72456979fd721890afcfe4798e3af 100644 (file)
@@ -14,7 +14,7 @@ ENDCLASS(XonoticRootDialog)
 #endif
 
 #ifdef IMPLEMENTATION
-void closeXonoticRootDialog(entity me)
+void XonoticRootDialog_close(entity me)
 {
        m_goto(string_null);
 }
index d4b01e28207a0cad033622b03594a2e0f0036e06..c205fba70574e031eb1951cecbfa33d413c766ba 100644 (file)
@@ -141,7 +141,7 @@ entity makeXonoticServerList()
        me.configureXonoticServerList(me);
        return me;
 }
-void configureXonoticServerListXonoticServerList(entity me)
+void XonoticServerList_configureXonoticServerList(entity me)
 {
        me.configureXonoticListBox(me);
 
@@ -149,11 +149,11 @@ 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;
-       setSelectedListBox(me, i);
+       SUPER(XonoticServerList).setSelected(me, i);
        /*
        if(me.selectedItem == save)
                return;
@@ -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;
 
@@ -317,7 +317,7 @@ void drawXonoticServerList(entity me)
                me.ipAddressBoxFocused = me.ipAddressBox.focused;
        }
 
-       drawListBox(me);
+       SUPER(XonoticServerList).draw(me);
 }
 void ServerList_PingSort_Click(entity btn, entity me)
 {
@@ -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,9 +447,9 @@ 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)
 {
-       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+       SUPER(XonoticServerList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
        me.realFontSize_y = me.fontSize / (absSize_y * me.itemHeight);
        me.realFontSize_x = me.fontSize / (absSize_x * (1 - me.controlWidth));
@@ -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;
@@ -601,7 +601,7 @@ float keyDownXonoticServerList(entity me, float scan, float ascii, float shift)
                        me.ipAddressBoxFocused = -1;
                }
        }
-       else if(keyDownListBox(me, scan, ascii, shift))
+       else if(SUPER(XonoticServerList).keyDown(me, scan, ascii, shift))
                return 1;
        else if(!me.controlledTextbox)
                return 0;
index 78ff80ca40306d73070eff7a543e1d3dedfe54d5..bcb62251aa9f30650c41894a486add3546383ae4 100644 (file)
@@ -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,15 +128,15 @@ 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';
-       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+       SUPER(XonoticSkinList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
        me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
        me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
@@ -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,13 +193,13 @@ 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);
                return 1;
        }
        else
-               return keyDownListBox(me, scan, ascii, shift);
+               return SUPER(XonoticSkinList).keyDown(me, scan, ascii, shift);
 }
 #endif
index 134557da7dcd9bd1c12065e89f213d78fea799d1..46a01bb5ac0e3c1c1e089a90836c4de3b851370f 100644 (file)
@@ -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,22 +49,22 @@ 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)
        {
-               setValueSlider( me, val );
+               SUPER(XonoticSlider).setValue( me, 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;
index ba7cffc22f049b99564ca11fb7582225716b90db..0e4b4e3720e8c0bece5fe57d26cf79620c6428ce 100644 (file)
@@ -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,13 +44,13 @@ 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";
        else if(v >= -0.1)
                return "MAX";
-       return strcat(valueToTextSlider(me, v), " dB");
+       return strcat(SUPER(XonoticDecibelsSlider).valueToText(me, v), " dB");
 }
 
 #endif
index ed6db5b69eaef49cd3c4ce2c64147660ba81c619..de34a410d9fb2ef9722efb6b9e28382f11b563dd 100644 (file)
@@ -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)
        {
index d771d7157b65355c92cdbe28bfb96764bb7eabf4..d1a867a2f88817253b5285838a772c444caf9994 100644 (file)
@@ -22,9 +22,9 @@ ENDCLASS(XonoticTab)
 #endif
 
 #ifdef IMPLEMENTATION
-void showNotifyXonoticTab(entity me)
+void XonoticTab_showNotify(entity me)
 {
        loadAllCvars(me);
-       showNotifyContainer(me);
+       SUPER(XonoticTab).showNotify(me);
 }
 #endif
index e454e23e066089f60cddec00de2b633c4ad6ce4d..1faa625aee83c607a4af8eab55117a0ddde091ea 100644 (file)
@@ -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)
index 020f79035f1bf05c8b6a515c5e5878809f6c6b5c..757e07ff1bc74e77408c5b22e364ea1727863275 100644 (file)
@@ -17,12 +17,12 @@ 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)
 {
-       drawLabel(me);
+       SUPER(XonoticTextLabel).draw(me);
 }
 #endif
index 2236bc51fe362b88705c10b353e0e57b6e5ef7fe..69270a67ac11f3e7f0419b07c7a52c40d5fb5d41 100644 (file)
@@ -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,15 +42,15 @@ 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)
        {
-               setValueSlider( me, val );
+               SUPER(XonoticTextSlider).setValue( me, 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);
index 012f7bc7e68ea7e739e4028bbddbae5e984314f4..bd2acdf5a60ea0e20718ea363b9c9ee1d905a2bc 100644 (file)
@@ -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;
@@ -41,7 +41,7 @@ void drawXonoticWeaponsList(entity me)
                cvar_set("cl_weaponpriority", W_NameWeaponOrder(t));
        }
        me.nItems = tokenize_console(t);
-       drawListBox(me);
+       SUPER(XonoticWeaponsList).draw(me);
 }
 void WeaponsList_MoveUp_Click(entity box, entity me)
 {
@@ -59,24 +59,24 @@ 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)
 {
-       resizeNotifyXonoticListBox(me, relOrigin, relSize, absOrigin, absSize);
+       SUPER(XonoticWeaponsList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
        me.realFontSize_y = me.fontSize / (absSize_y * me.itemHeight);
        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;
-       f = mouseDragListBox(me, pos);
+       f = SUPER(XonoticWeaponsList).mouseDrag(me, pos);
        if(me.selectedItem != i)
                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) // +
        {
@@ -111,7 +111,7 @@ float keyDownXonoticWeaponsList(entity me, float scan, float ascii, float shift)
                WeaponsList_MoveDown_Click(NULL, me);
                return 1;
        }
-       else if(keyDownListBox(me, scan, ascii, shift))
+       else if(SUPER(XonoticWeaponsList).keyDown(me, scan, ascii, shift))
                return 1;
        return 0;
 }