Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Sqrt404 authored Jul 9, 2024
1 parent c788331 commit 672768a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,32 @@ void ChangeText(string text1);

修改按钮文字。

5.
```cpp
Ccs::button btn;
btn.startb(NULL, 1, 1, "hi");
while(1)
{
system("pause");
Ccs::mlock();
cout << btn.stats;
Ccs::munlock();
}
```
按钮状态,0为未触摸也未按下,1为触摸但是未按下,2为已按下
---
### 贡献者:

- [Sqrt404](https://github.com/Sqrt404)
---
### 注意事项:
- 使用了这个头文件后在正常的输出前需要使用`Ccs::mlock()`,输出后需要使用`Ccs::munlock()`。例如:
```cpp
Ccs::button btn;
btn.startb(NULL, 1, 1, "hi");
Ccs::mlock();
cout << "Hallo World!" << endl;
Ccs::munlock();
```

- 在主函数开头需要使用`Ccs::ColorSet()``Ccs::StartSet()`以初始化按钮所需的函数。

0 comments on commit 672768a

Please sign in to comment.