wavelength 1.0.0
Loading...
Searching...
No Matches
songpicpanel.h
Go to the documentation of this file.
1#pragma once
2
3#include "met/freqpanel.h"
4#include "os/filepath.h"
5#include "rnd/rndmesh.h"
6#include "script/dataarray.h"
7
17class SongPicPanel : public FreqPanel {
18public:
25 ~SongPicPanel() override = default;
26
35 SongPicPanel(DataArray *pData, const char *pszDir);
36
48 static UIPanel *New(DataArray *pData, const char *pszDir) {
49 return new SongPicPanel(pData, pszDir);
50 }
51
60 void Exit(bool bForce, float fTime) override;
61
69 void Poll(float fTime) override;
70
77 void FinishLoad() override;
78
93 void SetBandPicture(const char *pszSong, bool bSmall, bool bUnlocked, bool bEncrypted);
94
102 void SetArenaPicture(const char *pszArena);
103
113 void SetPictureShowing(bool bShowing);
114
116 int GetPictureReady() const {
117 return mPictureReady;
118 }
119
121 int GetPictureShowing() const {
122 return mPictureShowing;
123 }
124
125private:
126 FilePath mPicturePath;
127 RndMesh *mPictureMesh;
128 int mUnlocked;
129 const char *mSong;
130 int mPictureShowing;
131 int mPictureReady;
132 int mEncrypted;
133};
Reference-counted array of script data nodes.
Definition dataarray.h:20
Path of a file, kept relative to a shared root directory.
Definition filepath.h:14
FreqPanel(DataArray *pData, const char *pszDir)
Construct a panel from its script description.
Triangle mesh with a material.
Definition rndmesh.h:31
void Poll(float fTime) override
Advance the panel, and place a picture that finished loading on the picture mesh.
int GetPictureShowing() const
Definition songpicpanel.h:121
int GetPictureReady() const
Definition songpicpanel.h:116
void Exit(bool bForce, float fTime) override
Start the exit and release the picture.
SongPicPanel(DataArray *pData, const char *pszDir)
Construct a panel from its script description, with no picture.
void SetArenaPicture(const char *pszArena)
Start loading the picture of an arena, Metagame\image<arena>_band.bmp.
void SetPictureShowing(bool bShowing)
Show or hide the picture mesh.
static UIPanel * New(DataArray *pData, const char *pszDir)
Create a panel from its script description.
Definition songpicpanel.h:48
void FinishLoad() override
Finish the load, and find and hide the picture mesh <name>.mesh.
void SetBandPicture(const char *pszSong, bool bSmall, bool bUnlocked, bool bEncrypted)
Start loading the picture of a song's band.
~SongPicPanel() override=default
Destroy the object.
UIPanel(DataArray *pData, const char *pszDir)
Construct a hidden panel from its script description.