Go to the source code of this file.
|
void | getScreenshots_for_ext (entity me, string ext, float subdir) |
|
entity | makeXonoticScreenshotList () |
|
void | ScreenshotList_Filter_Change (entity box, entity me) |
|
void | ScreenshotList_Filter_Would_Change (entity box, entity me) |
|
void | ScreenshotList_Refresh_Click (entity btn, entity me) |
|
void | StartScreenshot_Click (entity btn, entity me) |
|
void | XonoticScreenshotList_configureXonoticScreenshotList (entity me) |
|
void | XonoticScreenshotList_destroy (entity me) |
|
void | XonoticScreenshotList_doubleClickListBoxItem (entity me, float i, vector where) |
|
void | XonoticScreenshotList_draw (entity me) |
|
void | XonoticScreenshotList_drawListBoxItem (entity me, int i, vector absSize, bool isSelected, bool isFocused) |
|
void | XonoticScreenshotList_getScreenshots (entity me) |
|
void | XonoticScreenshotList_goScreenshot (entity me, float d) |
|
float | XonoticScreenshotList_keyDown (entity me, float scan, float ascii, float shift) |
|
void | XonoticScreenshotList_previewScreenshot (entity me) |
|
void | XonoticScreenshotList_resizeNotify (entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) |
|
string | XonoticScreenshotList_screenshotName (entity me, float i) |
|
void | XonoticScreenshotList_setSelected (entity me, float i) |
|
void | XonoticScreenshotList_showNotify (entity me) |
|
void | XonoticScreenshotList_startScreenshot (entity me) |
|
void | XonoticScreenshotList_startSlideShow (entity me) |
|
void | XonoticScreenshotList_stopSlideShow (entity me) |
|
◆ getScreenshots_for_ext()
Definition at line 34 of file screenshotlist.qc.
References rgb_to_hexcolor(), search_begin(), search_end(), search_getfilename(), search_getsize(), strcat(), strlen(), and substring().
Referenced by XonoticScreenshotList_getScreenshots().
42 s=
strcat(s, me.filterString, ext);
51 for(i = 0; i < n; ++i)
58 s = strreplace(
"/",
"^7/", s);
60 bufstr_add(me.listScreenshot, s,
true);
62 else { bufstr_add(me.listScreenshot, s,
true); }
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
ERASEABLE string rgb_to_hexcolor(vector rgb)
void getScreenshots_for_ext(entity me, string ext, float subdir)
◆ makeXonoticScreenshotList()
entity makeXonoticScreenshotList |
( |
| ) |
|
◆ ScreenshotList_Filter_Change()
◆ ScreenshotList_Filter_Would_Change()
◆ ScreenshotList_Refresh_Click()
◆ StartScreenshot_Click()
◆ XonoticScreenshotList_configureXonoticScreenshotList()
void XonoticScreenshotList_configureXonoticScreenshotList |
( |
entity |
me | ) |
|
◆ XonoticScreenshotList_destroy()
◆ XonoticScreenshotList_doubleClickListBoxItem()
◆ XonoticScreenshotList_draw()
Definition at line 177 of file screenshotlist.qc.
References ScreenshotList_Filter_Change(), SUPER, and time.
179 if (me.filterTime &&
time > me.filterTime)
184 if (me.newScreenshotTime &&
time > me.newScreenshotTime)
186 me.previewScreenshot(me);
187 me.newScreenshotTime = 0;
189 else if (me.newSlideShowScreenshotTime &&
time > me.newSlideShowScreenshotTime)
191 if (me.selectedItem == me.nItems - 1)
194 me.setSelected(me, 0);
195 me.goScreenshot(me, +0);
198 me.goScreenshot(me, +1);
void ScreenshotList_Filter_Change(entity box, entity me)
◆ XonoticScreenshotList_drawListBoxItem()
Definition at line 128 of file screenshotlist.qc.
References draw_Fill(), draw_Text(), draw_TextShortenToWidth(), draw_TextWidth(), eX, eY, and getFadedAlpha().
132 draw_Fill(
'0 0 0',
'1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
135 me.focusedItemAlpha =
getFadedAlpha(me.focusedItemAlpha, SKINALPHA_LISTBOX_FOCUSED, SKINFADEALPHA_LISTBOX_FOCUSED);
136 draw_Fill(
'0 0 0',
'1 1 0', SKINCOLOR_LISTBOX_FOCUSED, me.focusedItemAlpha);
139 s = me.screenshotName(me,i);
141 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, 1);
◆ XonoticScreenshotList_getScreenshots()
void XonoticScreenshotList_getScreenshots |
( |
entity |
me | ) |
|
Definition at line 71 of file screenshotlist.qc.
References buf_create, and getScreenshots_for_ext().
73 if (me.listScreenshot >= 0)
74 buf_del(me.listScreenshot);
76 if (me.listScreenshot < 0)
84 me.nItems = buf_getsize(me.listScreenshot);
86 buf_sort(me.listScreenshot, 128,
false);
void getScreenshots_for_ext(entity me, string ext, float subdir)
◆ XonoticScreenshotList_goScreenshot()
Definition at line 213 of file screenshotlist.qc.
References strcat().
215 if(!me.screenshotViewerDialog)
217 me.setSelected(me, me.selectedItem + d);
218 me.screenshotViewerDialog.loadScreenshot(me.screenshotViewerDialog,
strcat(
"/screenshots/", strdecolorize(me.screenshotName(me,me.selectedItem))));
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
◆ XonoticScreenshotList_keyDown()
◆ XonoticScreenshotList_previewScreenshot()
void XonoticScreenshotList_previewScreenshot |
( |
entity |
me | ) |
|
Definition at line 228 of file screenshotlist.qc.
References strcat().
230 if(!me.screenshotBrowserDialog)
233 me.screenshotBrowserDialog.loadPreviewScreenshot(me.screenshotBrowserDialog,
"");
235 me.screenshotBrowserDialog.loadPreviewScreenshot(me.screenshotBrowserDialog,
strcat(
"/screenshots/", strdecolorize(me.screenshotName(me,me.selectedItem))));
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
◆ XonoticScreenshotList_resizeNotify()
Definition at line 95 of file screenshotlist.qc.
References SUPER.
97 me.itemAbsSize =
'0 0 0';
100 me.itemAbsSize.y = absSize.y * me.itemHeight;
101 me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
102 me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
103 me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
104 me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
106 me.columnNameOrigin = me.realFontSize.x;
107 me.columnNameSize = 1 - 2 * me.realFontSize.x;
◆ XonoticScreenshotList_screenshotName()
◆ XonoticScreenshotList_setSelected()
Definition at line 110 of file screenshotlist.qc.
References SUPER, and time.
112 if (me.newSlideShowScreenshotTime)
113 me.startSlideShow(me);
114 float selectedItem_save = me.selectedItem;
116 if (me.pressed && me.selectedItem != selectedItem_save)
119 me.newScreenshotTime =
time + 0.22;
121 else if (
time > me.newScreenshotTime)
123 me.newScreenshotTime = 0;
124 me.previewScreenshot(me);
◆ XonoticScreenshotList_showNotify()
void XonoticScreenshotList_showNotify |
( |
entity |
me | ) |
|
Definition at line 144 of file screenshotlist.qc.
146 me.getScreenshots(me);
147 me.previewScreenshot(me);
◆ XonoticScreenshotList_startScreenshot()
void XonoticScreenshotList_startScreenshot |
( |
entity |
me | ) |
|
Definition at line 221 of file screenshotlist.qc.
References DialogOpenButton_Click_withCoords(), eX, eY, NULL, and strcat().
223 me.screenshotViewerDialog.loadScreenshot(me.screenshotViewerDialog,
strcat(
"/screenshots/", strdecolorize(me.screenshotName(me,me.selectedItem))));
225 DialogOpenButton_Click_withCoords(
NULL, me.screenshotViewerDialog, me.origin +
eX * (me.columnNameOrigin * me.size.x) +
eY * ((me.itemHeight * me.selectedItem - me.scrollPos) * me.size.y),
eY * me.itemAbsSize.y +
eX * (me.itemAbsSize.x * me.columnNameSize));
void DialogOpenButton_Click_withCoords(entity button, entity tab, vector theOrigin, vector theSize)
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
◆ XonoticScreenshotList_startSlideShow()
void XonoticScreenshotList_startSlideShow |
( |
entity |
me | ) |
|
◆ XonoticScreenshotList_stopSlideShow()
void XonoticScreenshotList_stopSlideShow |
( |
entity |
me | ) |
|