X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Ftabcontroller.qc;h=fe6941723a121ac93f56ca9b8af51a2176150cd0;hb=565754a35f9e84a3b8e6eac08635ec27145b369a;hp=1faa625aee83c607a4af8eab55117a0ddde091ea;hpb=bb80a6aba067167c6ef8d5f3465f03bd34142fa2;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/tabcontroller.qc b/qcsrc/menu/xonotic/tabcontroller.qc index 1faa625ae..fe6941723 100644 --- a/qcsrc/menu/xonotic/tabcontroller.qc +++ b/qcsrc/menu/xonotic/tabcontroller.qc @@ -1,19 +1,11 @@ -#ifdef INTERFACE -CLASS(XonoticTabController) EXTENDS(ModalController) - METHOD(XonoticTabController, configureXonoticTabController, void(entity, float)) - METHOD(XonoticTabController, makeTabButton, entity(entity, string, entity)) - ATTRIB(XonoticTabController, rows, float, 0) - ATTRIB(XonoticTabController, fontSize, float, SKINFONTSIZE_NORMAL) - ATTRIB(XonoticTabController, image, string, SKINGFX_BUTTON) -ENDCLASS(XonoticTabController) -entity makeXonoticTabController(float theRows); -#endif +#include "tabcontroller.qh" + +#include "button.qh" -#ifdef IMPLEMENTATION entity makeXonoticTabController(float theRows) { entity me; - me = spawnXonoticTabController(); + me = NEW(XonoticTabController); me.configureXonoticTabController(me, theRows); return me; } @@ -21,14 +13,17 @@ void XonoticTabController_configureXonoticTabController(entity me, float theRows { me.rows = theRows; } -entity XonoticTabController_makeTabButton(entity me, string theTitle, entity tab) +entity XonoticTabController_makeTabButton_T(entity me, string theTitle, entity tab, string theTooltip) { entity b; if(me.rows != tab.rows) error("Tab dialog height mismatch!"); - b = makeXonoticButton(theTitle, '0 0 0'); + b = makeXonoticButton_T(theTitle, '0 0 0', theTooltip); me.addTab(me, tab, b); // TODO make this real tab buttons (with color parameters, and different gfx) return b; } -#endif +entity XonoticTabController_makeTabButton(entity me, string theTitle, entity tab) +{ + return XonoticTabController_makeTabButton_T(me, theTitle, tab, string_null); +}