-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.cpp
36 lines (27 loc) · 911 Bytes
/
Main.cpp
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
# include <Siv3D.hpp> // Siv3D v0.6.14
# include "SimpleGridViewer/SpreadSheet.hpp"
void Main()
{
Window::Resize(1920, 1009);
Scene::SetBackground(Color(34, 116, 71));
size_t columnCount = 20;
size_t rowCount = 24;
SimpleGridViewer::SpreadSheet spreadSheet{ {columnCount, rowCount }, { 10, 10 }, { 0, 0 } };
Grid<String> values(columnCount, rowCount);
Array<String> columnNames = SimpleGridViewer::AlphabetUtility::GenerateAlphabetArray(columnCount);
for (size_t row = 0; row < rowCount; ++row)
{
for (size_t column = 0; column < columnCount; ++column)
{
values[row][column] = U"{}{}"_fmt(columnNames[column], row);
}
}
spreadSheet.setValues(values);
spreadSheet.setTextFont(Font(15));
while (System::Update())
{
const Transformer2D t{ Mat3x2::Translate(50, 50), TransformCursor::Yes };
spreadSheet.update();
spreadSheet.draw();
}
}