-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAtaqueViewElemento.h
54 lines (47 loc) · 961 Bytes
/
AtaqueViewElemento.h
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef _ATAQUEVIEWELEMENTO_H_
#define _ATAQUEVIEWELEMENTO_H_
#include "AtaqueGeometrico.h"
#pragma once
namespace MyViews {
using namespace System;
using namespace System::Windows::Forms;
public ref class AtaqueViewElemento
{
private:
int id; //Id do ataque que gerou este componente
GroupBox ^groupBox;
Button ^button;
Label ^label;
public:
AtaqueViewElemento(int i, GroupBox ^g, Button ^b, Label ^l)
{
id = i;
groupBox = g;
button = b;
label = l;
}
AtaqueViewElemento()
{
groupBox = gcnew GroupBox();
button = gcnew Button();
label = gcnew Label();
}
~AtaqueViewElemento()
{
delete groupBox;
delete button;
delete label;
}
const int getId()
{
return id;
}
void ajustarPosicao(int diminuiX, int diminuiY)
{
int x = groupBox->Location.X - diminuiX;
int y = groupBox->Location.Y - diminuiY;
groupBox->Location = System::Drawing::Point(x, y);
}
};
}
#endif