mirror of
https://github.com/rvtr/ctr_test_tools.git
synced 2025-10-31 13:41:24 -04:00
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_test_tools@3 6b0af911-cb57-b745-895f-eec5701120e1
66 lines
1.3 KiB
C++
66 lines
1.3 KiB
C++
#ifndef WINDOW_H_
|
|
#define WINDOW_H_
|
|
|
|
#include <nn.h>
|
|
#include <nn/srv.h>
|
|
#include <nn/fs.h>
|
|
#include <nn/am/am_Api.h>
|
|
#include <nn/am/am_Result.h>
|
|
#include <nn/applet.h>
|
|
#include <nn/hid/CTR/hid_ApiWithPrivilege.h>
|
|
#include <nn/hid.h>
|
|
|
|
class Window {
|
|
public:
|
|
//screenHeight:縦方向に画面に入る文字数
|
|
//screenHeight = windowHeight / Y_SCALE
|
|
Window(u16 screenHeight):
|
|
isSelectedWindow(false),
|
|
mIndex(0),
|
|
mOriginIndex(0),
|
|
mSelectPos(0)
|
|
{
|
|
mScreenHeight = screenHeight;
|
|
}
|
|
virtual ~Window(){}
|
|
void Initialize(void);
|
|
void UpDown(nn::hid::PadStatus& status);
|
|
void Update(u16 fileSize);
|
|
void Import(u16 count)
|
|
{
|
|
mSelectPos = count + 1;
|
|
if(count == 0)
|
|
{
|
|
mSelectPos = 0;
|
|
mOriginIndex = 0;
|
|
}
|
|
}
|
|
|
|
s16 GetIndex(void)
|
|
{
|
|
return mIndex;
|
|
}
|
|
s16 GetOriginIndex(void)
|
|
{
|
|
return mOriginIndex;
|
|
}
|
|
s16 GetSelectPos(void)
|
|
{
|
|
return mSelectPos;
|
|
}
|
|
|
|
NN_PADDING3;
|
|
bool isSelectedWindow;
|
|
|
|
private:
|
|
s16 mIndex;
|
|
s16 mOriginIndex;
|
|
s16 mSelectPos;
|
|
u16 mScreenHeight;
|
|
u16 mCursorCounter;
|
|
u16 mAcceleCounter;
|
|
|
|
};
|
|
|
|
#endif /* WINDOW_H_ */
|