wavelength 1.0.0
Loading...
Searching...
No Matches
ovycontroller.h
Go to the documentation of this file.
1#pragma once
2
3#include "app/hideablepanel.h"
4#include "rnd/rndanimatable.h"
5#include "rnd/rnddrawable.h"
6#include "rnd/rndmat.h"
7#include "rnd/rndmesh.h"
8#include "rnd/rndview.h"
9
16public:
18 static constexpr int kNumButtons = 16;
19
21 struct Button {
29 void Load(const char *pszName);
30
33 };
34
41
49 explicit OvyController(RndView *pHudView);
50
57 ~OvyController() override = default;
58
65 void Reset();
66
74 void SetHighlight(bool bHighlight);
75
84 void ShowButton(int nButton, bool bShow);
85
88 return mPosAnim;
89 }
90
91private:
92 Button mButtons[kNumButtons];
93 RndView *mView;
94 RndMat *mMats[kNumHighlights];
95 RndMesh *mMesh;
96 RndAnimatable *mPosAnim;
97};
HideablePanel(const char *pszAnim, const char *pszDrawable, bool bShown)
Construct a panel and find its animation and drawable.
OvyController(RndView *pHudView)
Construct a hidden picture and draw it into the letterboxed view of the head-up display.
~OvyController() override=default
Destroy the picture.
void ShowButton(int nButton, bool bShow)
Show or hide a button, and start or stop its animation.
void SetHighlight(bool bHighlight)
Light or darken the picture.
RndAnimatable * GetPosAnim() const
Definition ovycontroller.h:87
static constexpr int kNumButtons
The number of buttons of the picture, one per JoypadButton from kPadL2 to kPadDLeft.
Definition ovycontroller.h:18
Highlight
The materials of the picture, the indices of mMats.
Definition ovycontroller.h:36
@ kNumHighlights
Definition ovycontroller.h:39
@ kHighlightOff
Definition ovycontroller.h:37
@ kHighlightOn
Definition ovycontroller.h:38
void Reset()
Hide the picture and every button at once.
Mix-in for an object driven by a frame.
Definition rndanimatable.h:16
Mix-in for an object that draws itself and then a list of other drawables.
Definition rnddrawable.h:16
Surface description: blending, lighting colours, culling, and a list of texture stages.
Definition rndmat.h:20
Triangle mesh with a material.
Definition rndmesh.h:31
View that shows the children of another view, its children owner, under its own transform and frame.
Definition rndview.h:27
One button of the picture.
Definition ovycontroller.h:21
RndAnimatable * mAnim
Definition ovycontroller.h:31
void Load(const char *pszName)
Find the animation and the mesh of a button.
RndDrawable * mMesh
Definition ovycontroller.h:32