X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fcommandbutton.qc;h=0a4943e41acba2c543bf4b0ae83e7876c3c5b086;hb=87b1a8def06bcf477cb8dbd1b5e069c29ce0ab91;hp=db1ec61ef2a06aea43e50103cc9793eb26ac2c99;hpb=1556aa4ea70b3b275afb1cb4587e555fb44f71c3;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/commandbutton.qc b/qcsrc/menu/xonotic/commandbutton.qc index db1ec61ef..0a4943e41 100644 --- a/qcsrc/menu/xonotic/commandbutton.qc +++ b/qcsrc/menu/xonotic/commandbutton.qc @@ -8,21 +8,26 @@ #define COMMANDBUTTON_H #include "button.qc" CLASS(XonoticCommandButton, XonoticButton) - METHOD(XonoticCommandButton, configureXonoticCommandButton, void(entity, string, vector, string, float)); + METHOD(XonoticCommandButton, configureXonoticCommandButton, void(entity, string, vector, string, float, string)); ATTRIB(XonoticCommandButton, onClickCommand, string, string_null) ATTRIB(XonoticCommandButton, flags, float, 0) ENDCLASS(XonoticCommandButton) +entity makeXonoticCommandButton_T(string theText, vector theColor, string theCommand, float closesMenu, string theTooltip); entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, float closesMenu); #endif #ifdef IMPLEMENTATION -entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, float theFlags) +entity makeXonoticCommandButton_T(string theText, vector theColor, string theCommand, float theFlags, string theTooltip) { entity me; me = NEW(XonoticCommandButton); - me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags); + me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags, theTooltip); return me; } +entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, float theFlags) +{ + return makeXonoticCommandButton_T(theText, theColor, theCommand, theFlags, string_null); +} void XonoticCommandButton_Click(entity me, entity other) { @@ -35,9 +40,9 @@ void XonoticCommandButton_Click(entity me, entity other) m_goto(string_null); } -void XonoticCommandButton_configureXonoticCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags) +void XonoticCommandButton_configureXonoticCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags, string theTooltip) { - me.configureXonoticButton(me, theText, theColor); + me.configureXonoticButton(me, theText, theColor, theTooltip); me.onClickCommand = theCommand; me.flags = theFlags; me.onClick = XonoticCommandButton_Click;