libgui 2.01
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
GuiFileBrowser.h
1/****************************************************************************
2 * libgui
3 * Daryl Borth 2009-2026
4 * GuiFileBrowser.h
5 ***************************************************************************/
6#pragma once
7
8#define FILE_PAGESIZE 8
9
13{
14 public:
17 GuiFileBrowser(int w, int h);
19 void resetState();
20 void setFocus(int f);
21 void draw() override;
24 void triggerUpdate();
25 void update(InputController * c);
28 GuiButton * fileList[FILE_PAGESIZE];
29 protected:
31 GuiText * fileListText[FILE_PAGESIZE];
32 GuiImage * fileListBg[FILE_PAGESIZE];
33 GuiImage * fileListFolder[FILE_PAGESIZE];
34
35 GuiButton * arrowUpBtn;
36 GuiButton * arrowDownBtn;
37 GuiButton * scrollbarBoxBtn;
38
39 GuiImage * bgFileSelectionImg;
40 GuiImage * scrollbarImg;
41 GuiImage * arrowDownImg;
42 GuiImage * arrowDownOverImg;
43 GuiImage * arrowUpImg;
44 GuiImage * arrowUpOverImg;
45 GuiImage * scrollbarBoxImg;
46 GuiImage * scrollbarBoxOverImg;
47
48 GuiImageData * bgFileSelection;
49 GuiImageData * bgFileSelectionEntry;
50 GuiImageData * fileFolder;
51 GuiImageData * scrollbar;
52 GuiImageData * arrowDown;
53 GuiImageData * arrowDownOver;
54 GuiImageData * arrowUp;
55 GuiImageData * arrowUpOver;
56 GuiImageData * scrollbarBox;
57 GuiImageData * scrollbarBoxOver;
58
59 GuiSound * btnSoundOver;
60 GuiSound * btnSoundClick;
61 GuiTrigger * trigA;
62 GuiTrigger * trigHeldA;
63
64 int selectedItem;
65 int numEntries;
66 bool listChanged;
68};
Display, manage, and manipulate buttons in the GUI.
Definition GuiButton.h:13
GuiElement()
Constructor.
Definition GuiElement.cpp:9
GuiButton * fileList[FILE_PAGESIZE]
One button per visible row of the current page.
void update(InputController *c)
Called constantly to allow the element to respond to the current input data.
void resetState()
Resets the element's state to STATE::DEFAULT.
void setFocus(int f)
Sets the element's focus.
GuiFileBrowser(int w, int h)
void triggerUpdate()
Forces the visible page to refresh from the underlying browser data, eg.
void draw() override
Draw the button on screen.
Decodes compressed image data (PNG) into a platform-native texture created from it.
Display, manage, and manipulate images in the GUI.
Definition GuiImage.h:18
Sound conversion and playback.
Definition GuiSound.h:27
Display, manage, and manipulate text in the GUI.
Definition GuiText.h:10
Input-condition matcher attached to a GuiElement (via setSimpleTrigger() etc.) and evaluated against ...
Definition GuiTrigger.h:34
Logical controller for one input channel.