Update player model list when menu is opened (no noticeable performance difference...
authorMario <zacjardine@y7mail.com>
Thu, 13 Nov 2014 08:47:36 +0000 (19:47 +1100)
committerMario <zacjardine@y7mail.com>
Thu, 13 Nov 2014 08:47:36 +0000 (19:47 +1100)
qcsrc/menu/xonotic/playermodel.c

index e419561..a1592de 100644 (file)
@@ -5,6 +5,7 @@ CLASS(XonoticPlayerModelSelector) EXTENDS(XonoticImage)
        METHOD(XonoticPlayerModelSelector, saveCvars, void(entity))
        METHOD(XonoticPlayerModelSelector, draw, void(entity))
        METHOD(XonoticPlayerModelSelector, resizeNotify, void(entity, vector, vector, vector, vector))
+       METHOD(XonoticPlayerModelSelector, showNotify, void(entity))
        ATTRIB(XonoticPlayerModelSelector, currentModel, string, string_null)
        ATTRIB(XonoticPlayerModelSelector, currentSkin, float, 0)
        ATTRIB(XonoticPlayerModelSelector, currentModelImage, string, string_null)
@@ -201,4 +202,9 @@ void XonoticPlayerModelSelector_resizeNotify(entity me, vector relOrigin, vector
        me.realFontSize_y = me.fontSize / absSize_y;
        me.realFontSize_x = me.fontSize / absSize_x;
 }
+
+void XonoticPlayerModelSelector_showNotify(entity me)
+{
+       me.configureXonoticPlayerModelSelector(me);
+}
 #endif