From 23fb76509aa9aa47af16a6c0444fd60c19090039 Mon Sep 17 00:00:00 2001 From: otta8634 Date: Sat, 15 Feb 2025 19:14:07 +0800 Subject: [PATCH] Rename .description and .descriptionWrapped .m_description already exists, might as well re-use it in qcsrc/menu/xonotic/guide/description.q*. --- qcsrc/menu/xonotic/guide/description.qc | 12 ++++++------ qcsrc/menu/xonotic/guide/description.qh | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/qcsrc/menu/xonotic/guide/description.qc b/qcsrc/menu/xonotic/guide/description.qc index b0f2dc234d..05df251e1d 100644 --- a/qcsrc/menu/xonotic/guide/description.qc +++ b/qcsrc/menu/xonotic/guide/description.qc @@ -2,18 +2,18 @@ void XonoticGuideDescription_drawListBoxItem(entity me, int i, vector absSize, bool isSelected, bool isFocused) { - tokenizebyseparator(me.descriptionWrapped, "\n"); + tokenizebyseparator(me.m_descriptionWrapped, "\n"); draw_Text(me.realFontSize.x * eX + me.realUpperMargin * eY, argv(i), me.realFontSize, '1 1 1', 1, true); } void XonoticGuideDescription_setDescription(entity me, string desc) { - string current = me.description; + string current = me.m_description; if (current && current != desc) strunzone(current); - me.description = strzone(desc); + me.m_description = strzone(desc); - string currentWrapped = me.descriptionWrapped; + string currentWrapped = me.m_descriptionWrapped; if (currentWrapped) strunzone(currentWrapped); @@ -30,7 +30,7 @@ void XonoticGuideDescription_setDescription(entity me, string desc) } wrapped = strcat(wrapped, line); } - me.descriptionWrapped = strzone(wrapped); + me.m_descriptionWrapped = strzone(wrapped); me.nItems = tokenizebyseparator(wrapped, "\n"); } @@ -42,5 +42,5 @@ void XonoticGuideDescription_resizeNotify(entity me, vector relOrigin, vector re 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); - me.setDescription(me, me.description); + me.setDescription(me, me.m_description); } diff --git a/qcsrc/menu/xonotic/guide/description.qh b/qcsrc/menu/xonotic/guide/description.qh index 81e9644d08..cc66f9a1de 100644 --- a/qcsrc/menu/xonotic/guide/description.qh +++ b/qcsrc/menu/xonotic/guide/description.qh @@ -6,8 +6,8 @@ CLASS(XonoticGuideDescription, XonoticListBox) ATTRIB(XonoticGuideDescription, realUpperMargin, float, 0); ATTRIB(XonoticGuideDescription, rowsPerItem, float, 1); ATTRIB(XonoticGuideDescription, selectionDoesntMatter, bool, true); - ATTRIB(XonoticGuideDescription, description, string, string_null); - ATTRIB(XonoticGuideDescription, descriptionWrapped, string, string_null); + ATTRIB(XonoticGuideDescription, m_description, string, string_null); + ATTRIB(XonoticGuideDescription, m_descriptionWrapped, string, string_null); METHOD(XonoticGuideDescription, drawListBoxItem, void(entity, int, vector, bool, bool)); METHOD(XonoticGuideDescription, setDescription, void(entity, string)); -- 2.39.5