-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScrollPanel.h
More file actions
36 lines (28 loc) · 866 Bytes
/
ScrollPanel.h
File metadata and controls
36 lines (28 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#include<algorithm>
#include"Object.h"
#include"Button.h"
class ScrollPanel:public Object
{
private:
float scrollSpeed;
float margin;
Position* offSet;
Position offset;
SDL_Color color;
vector<std::unique_ptr<Object>> objectList;
vector<std::unique_ptr<Object>>::iterator hittedObject;//スクロールパネル上のみ
public:
ScrollPanel();
void setPanelSize(float width, float height);
void setPanelSize(int x, int y, float width, float height);
void setScrollSpeed(float scrollSpeed);
void setScrollSpeed(int scrollSpeed);
void setColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
void setScrollLimit(float topMargin, float bottomMargin);
void addObjectList(Object* obj);
void Update() override;
void moveObjects(float wheel);
bool hitCheck() override;
void drawObjects(SDL_Renderer* gRenderer) override;
};