rouwan-gui 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rouwan_gui-0.2.2/PKG-INFO +232 -0
- rouwan_gui-0.2.2/README.md +214 -0
- rouwan_gui-0.2.2/pyproject.toml +38 -0
- rouwan_gui-0.2.2/setup.cfg +4 -0
- rouwan_gui-0.2.2/src/rouwan_gui/Button.py +29 -0
- rouwan_gui-0.2.2/src/rouwan_gui/Entry.py +36 -0
- rouwan_gui-0.2.2/src/rouwan_gui/Frame.py +34 -0
- rouwan_gui-0.2.2/src/rouwan_gui/STSONG.TTF +0 -0
- rouwan_gui-0.2.2/src/rouwan_gui/Table.py +16 -0
- rouwan_gui-0.2.2/src/rouwan_gui/Text.py +40 -0
- rouwan_gui-0.2.2/src/rouwan_gui/Window.py +56 -0
- rouwan_gui-0.2.2/src/rouwan_gui/__init__.py +11 -0
- rouwan_gui-0.2.2/src/rouwan_gui.egg-info/PKG-INFO +232 -0
- rouwan_gui-0.2.2/src/rouwan_gui.egg-info/SOURCES.txt +17 -0
- rouwan_gui-0.2.2/src/rouwan_gui.egg-info/dependency_links.txt +1 -0
- rouwan_gui-0.2.2/src/rouwan_gui.egg-info/requires.txt +5 -0
- rouwan_gui-0.2.2/src/rouwan_gui.egg-info/top_level.txt +1 -0
- rouwan_gui-0.2.2/tests/test1.py +11 -0
- rouwan_gui-0.2.2/tests/test2.py +2 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rouwan-gui
|
|
3
|
+
Version: 0.2.2
|
|
4
|
+
Summary: 这是一个Python的GUI库。
|
|
5
|
+
Author-email: 肥美入类 <ydx20140606@qq.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/you/pygui
|
|
8
|
+
Project-URL: Repository, https://github.com/you/pygui
|
|
9
|
+
Keywords: gui,demo
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.9
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
Requires-Dist: pyglet>=2.0
|
|
15
|
+
Provides-Extra: dev
|
|
16
|
+
Requires-Dist: pytest; extra == "dev"
|
|
17
|
+
Requires-Dist: build; extra == "dev"
|
|
18
|
+
|
|
19
|
+
# rouwan-gui
|
|
20
|
+
|
|
21
|
+
一个基于 [pyglet](https://pyglet.org/) 的轻量级 Python GUI 库。
|
|
22
|
+
|
|
23
|
+
## 简介
|
|
24
|
+
|
|
25
|
+
`rouwan-gui` 提供窗口、按钮、输入框、文本、容器、表格等常用控件,采用固定的逻辑坐标系,纯 Python 实现,跨平台运行。
|
|
26
|
+
|
|
27
|
+
## 坐标约定
|
|
28
|
+
|
|
29
|
+
- 逻辑分辨率固定为 `1920 x 1080`
|
|
30
|
+
- 屏幕中心为 `(0, 0)`
|
|
31
|
+
- 横向范围 `-960 ~ +960`,纵向范围 `-540 ~ +540`
|
|
32
|
+
- 右上为正方向,左下为负方向
|
|
33
|
+
- **所有控件以自身中心点作为位置参考点**
|
|
34
|
+
|
|
35
|
+
实际像素位置会按窗口真实尺寸自动换算,无需手动处理。
|
|
36
|
+
|
|
37
|
+
## 安装
|
|
38
|
+
|
|
39
|
+
从 whl 安装:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install E:\PycharmProject\rouwan_gui-0.2.2-py3-none-any.whl
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
从源码可编辑安装(开发用):
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
cd PyUI
|
|
49
|
+
pip install -e .
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
依赖 `pyglet`,安装时会自动拉取。
|
|
53
|
+
|
|
54
|
+
## 快速开始
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
import rouwan_gui as rwg
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def update(window, dt):
|
|
61
|
+
"""每帧调用一次。"""
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# 创建窗口:宽、高、标题、帧率、每帧回调
|
|
66
|
+
win = rwg.Window(800, 600, "我的应用", 60, update)
|
|
67
|
+
|
|
68
|
+
# 创建按钮:名称, x, y, 宽, 高, 文本, 窗口, 颜色, 回调, 字号
|
|
69
|
+
rwg.create_Button(
|
|
70
|
+
"btn1", 0, 0, 200, 60, "点我", win, (0, 255, 0, 255),
|
|
71
|
+
command=lambda: print("clicked"),
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# 创建输入框:名称, x, y, 宽, 高, 窗口, 颜色, 初始文本, 字号
|
|
75
|
+
rwg.create_Entry(
|
|
76
|
+
"input1", 0, -100, 300, 40, win, (60, 60, 60, 255),
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
# 创建文本:名称, x, y, 文本, 窗口, 字号
|
|
80
|
+
rwg.create_Text("title", 0, 200, "标题", win, font_size=24)
|
|
81
|
+
|
|
82
|
+
# 启动主循环
|
|
83
|
+
win.run()
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## API
|
|
87
|
+
|
|
88
|
+
### Window
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
Window(width, height, name, fps, update_command)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
| 参数 | 说明 |
|
|
95
|
+
|------|------|
|
|
96
|
+
| `width` / `height` | 窗口像素尺寸 |
|
|
97
|
+
| `name` | 窗口标题 |
|
|
98
|
+
| `fps` | 每帧更新频率 |
|
|
99
|
+
| `update_command` | 每帧回调,签名 `func(window, dt)` |
|
|
100
|
+
|
|
101
|
+
内部状态:
|
|
102
|
+
|
|
103
|
+
- `role_dict`:所有控件,按名字索引
|
|
104
|
+
- `last_text` / `last_key` / `last_mouse`:当前帧输入状态
|
|
105
|
+
|
|
106
|
+
方法:
|
|
107
|
+
|
|
108
|
+
- `run()`:启动主循环
|
|
109
|
+
|
|
110
|
+
### Button
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
create_Button(name, x, y, width, height, text, window, color,
|
|
114
|
+
command=None, font_size=1)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
| 参数 | 说明 |
|
|
118
|
+
|------|------|
|
|
119
|
+
| `name` | 控件名,用于 `role_dict` 索引 |
|
|
120
|
+
| `x`, `y` | 中心点逻辑坐标 |
|
|
121
|
+
| `width`, `height` | 逻辑尺寸 |
|
|
122
|
+
| `text` | 按钮文字 |
|
|
123
|
+
| `window` | 所属窗口 |
|
|
124
|
+
| `color` | 背景色 `(r, g, b, a)`,取值 `0~255` |
|
|
125
|
+
| `command` | 点击回调,无参函数 |
|
|
126
|
+
| `font_size` | 字号 |
|
|
127
|
+
|
|
128
|
+
### Entry
|
|
129
|
+
|
|
130
|
+
```python
|
|
131
|
+
create_Entry(name, x, y, width, height, window, color,
|
|
132
|
+
init_text="", font_size=1)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
点击切换输入状态,回车结束输入,退格删除字符。当前内容存于 `entry.result`。
|
|
136
|
+
|
|
137
|
+
### Text
|
|
138
|
+
|
|
139
|
+
```python
|
|
140
|
+
create_Text(name, x, y, text, window, font_size=1)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
显示文本,使用内置字体 `STSONG.TTF`,居中锚点。
|
|
144
|
+
|
|
145
|
+
### Frame
|
|
146
|
+
|
|
147
|
+
```python
|
|
148
|
+
create_Frame(name, x, y, width, height, window, color)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
纯色矩形区域。
|
|
152
|
+
|
|
153
|
+
### Table
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
create_Table(name, x, y, width, height, text, window,
|
|
157
|
+
frame_color=Color_V, font_size=1)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
带背景的文字块。`Color_V` 默认为不透明白 `(255, 255, 255, 255)`。
|
|
161
|
+
|
|
162
|
+
## 颜色
|
|
163
|
+
|
|
164
|
+
所有颜色均为 `(R, G, B, A)` 四元组,取值范围 `0 ~ 255`。
|
|
165
|
+
|
|
166
|
+
- `A = 0`:完全透明
|
|
167
|
+
- `A = 255`:完全不透明
|
|
168
|
+
|
|
169
|
+
示例:
|
|
170
|
+
|
|
171
|
+
```python
|
|
172
|
+
(255, 0, 0, 255) # 不透明红
|
|
173
|
+
(0, 255, 0, 128) # 半透明绿
|
|
174
|
+
(0, 0, 0, 0) # 全透明
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
`rouwan_gui.Color_V` 是默认颜色常量。
|
|
178
|
+
|
|
179
|
+
## 项目结构
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
PyUI/
|
|
183
|
+
├── src/
|
|
184
|
+
│ └── rouwan_gui/
|
|
185
|
+
│ ├── __init__.py
|
|
186
|
+
│ ├── Window.py
|
|
187
|
+
│ ├── Frame.py
|
|
188
|
+
│ ├── Button.py
|
|
189
|
+
│ ├── Entry.py
|
|
190
|
+
│ ├── Text.py
|
|
191
|
+
│ ├── Table.py
|
|
192
|
+
│ └── STSONG.TTF
|
|
193
|
+
├── tests/
|
|
194
|
+
├── pyproject.toml
|
|
195
|
+
└── README.md
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## 开发
|
|
199
|
+
|
|
200
|
+
安装开发依赖:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
pip install -e ".[dev]"
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
运行测试:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
python -m pytest
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
打包:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
python -m build
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
生成的文件位于 `dist/` 目录下。
|
|
219
|
+
|
|
220
|
+
## 字体说明
|
|
221
|
+
|
|
222
|
+
本库自带 `STSONG.TTF` 字体文件,随代码一起打包。若需替换字体,修改 `Text.py` 中的 `FONT` 常量即可。
|
|
223
|
+
|
|
224
|
+
## 版本历史
|
|
225
|
+
|
|
226
|
+
- **0.2.2** — 当前版本,修复各种bug,统一风格
|
|
227
|
+
- **0.2.1** — 修复打包时文件名改动的遗留问题
|
|
228
|
+
- **0.2.0** — 首个可打包版本
|
|
229
|
+
|
|
230
|
+
## License
|
|
231
|
+
|
|
232
|
+
MIT
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# rouwan-gui
|
|
2
|
+
|
|
3
|
+
一个基于 [pyglet](https://pyglet.org/) 的轻量级 Python GUI 库。
|
|
4
|
+
|
|
5
|
+
## 简介
|
|
6
|
+
|
|
7
|
+
`rouwan-gui` 提供窗口、按钮、输入框、文本、容器、表格等常用控件,采用固定的逻辑坐标系,纯 Python 实现,跨平台运行。
|
|
8
|
+
|
|
9
|
+
## 坐标约定
|
|
10
|
+
|
|
11
|
+
- 逻辑分辨率固定为 `1920 x 1080`
|
|
12
|
+
- 屏幕中心为 `(0, 0)`
|
|
13
|
+
- 横向范围 `-960 ~ +960`,纵向范围 `-540 ~ +540`
|
|
14
|
+
- 右上为正方向,左下为负方向
|
|
15
|
+
- **所有控件以自身中心点作为位置参考点**
|
|
16
|
+
|
|
17
|
+
实际像素位置会按窗口真实尺寸自动换算,无需手动处理。
|
|
18
|
+
|
|
19
|
+
## 安装
|
|
20
|
+
|
|
21
|
+
从 whl 安装:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install E:\PycharmProject\rouwan_gui-0.2.2-py3-none-any.whl
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
从源码可编辑安装(开发用):
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
cd PyUI
|
|
31
|
+
pip install -e .
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
依赖 `pyglet`,安装时会自动拉取。
|
|
35
|
+
|
|
36
|
+
## 快速开始
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
import rouwan_gui as rwg
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def update(window, dt):
|
|
43
|
+
"""每帧调用一次。"""
|
|
44
|
+
pass
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# 创建窗口:宽、高、标题、帧率、每帧回调
|
|
48
|
+
win = rwg.Window(800, 600, "我的应用", 60, update)
|
|
49
|
+
|
|
50
|
+
# 创建按钮:名称, x, y, 宽, 高, 文本, 窗口, 颜色, 回调, 字号
|
|
51
|
+
rwg.create_Button(
|
|
52
|
+
"btn1", 0, 0, 200, 60, "点我", win, (0, 255, 0, 255),
|
|
53
|
+
command=lambda: print("clicked"),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
# 创建输入框:名称, x, y, 宽, 高, 窗口, 颜色, 初始文本, 字号
|
|
57
|
+
rwg.create_Entry(
|
|
58
|
+
"input1", 0, -100, 300, 40, win, (60, 60, 60, 255),
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
# 创建文本:名称, x, y, 文本, 窗口, 字号
|
|
62
|
+
rwg.create_Text("title", 0, 200, "标题", win, font_size=24)
|
|
63
|
+
|
|
64
|
+
# 启动主循环
|
|
65
|
+
win.run()
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## API
|
|
69
|
+
|
|
70
|
+
### Window
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
Window(width, height, name, fps, update_command)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
| 参数 | 说明 |
|
|
77
|
+
|------|------|
|
|
78
|
+
| `width` / `height` | 窗口像素尺寸 |
|
|
79
|
+
| `name` | 窗口标题 |
|
|
80
|
+
| `fps` | 每帧更新频率 |
|
|
81
|
+
| `update_command` | 每帧回调,签名 `func(window, dt)` |
|
|
82
|
+
|
|
83
|
+
内部状态:
|
|
84
|
+
|
|
85
|
+
- `role_dict`:所有控件,按名字索引
|
|
86
|
+
- `last_text` / `last_key` / `last_mouse`:当前帧输入状态
|
|
87
|
+
|
|
88
|
+
方法:
|
|
89
|
+
|
|
90
|
+
- `run()`:启动主循环
|
|
91
|
+
|
|
92
|
+
### Button
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
create_Button(name, x, y, width, height, text, window, color,
|
|
96
|
+
command=None, font_size=1)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
| 参数 | 说明 |
|
|
100
|
+
|------|------|
|
|
101
|
+
| `name` | 控件名,用于 `role_dict` 索引 |
|
|
102
|
+
| `x`, `y` | 中心点逻辑坐标 |
|
|
103
|
+
| `width`, `height` | 逻辑尺寸 |
|
|
104
|
+
| `text` | 按钮文字 |
|
|
105
|
+
| `window` | 所属窗口 |
|
|
106
|
+
| `color` | 背景色 `(r, g, b, a)`,取值 `0~255` |
|
|
107
|
+
| `command` | 点击回调,无参函数 |
|
|
108
|
+
| `font_size` | 字号 |
|
|
109
|
+
|
|
110
|
+
### Entry
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
create_Entry(name, x, y, width, height, window, color,
|
|
114
|
+
init_text="", font_size=1)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
点击切换输入状态,回车结束输入,退格删除字符。当前内容存于 `entry.result`。
|
|
118
|
+
|
|
119
|
+
### Text
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
create_Text(name, x, y, text, window, font_size=1)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
显示文本,使用内置字体 `STSONG.TTF`,居中锚点。
|
|
126
|
+
|
|
127
|
+
### Frame
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
create_Frame(name, x, y, width, height, window, color)
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
纯色矩形区域。
|
|
134
|
+
|
|
135
|
+
### Table
|
|
136
|
+
|
|
137
|
+
```python
|
|
138
|
+
create_Table(name, x, y, width, height, text, window,
|
|
139
|
+
frame_color=Color_V, font_size=1)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
带背景的文字块。`Color_V` 默认为不透明白 `(255, 255, 255, 255)`。
|
|
143
|
+
|
|
144
|
+
## 颜色
|
|
145
|
+
|
|
146
|
+
所有颜色均为 `(R, G, B, A)` 四元组,取值范围 `0 ~ 255`。
|
|
147
|
+
|
|
148
|
+
- `A = 0`:完全透明
|
|
149
|
+
- `A = 255`:完全不透明
|
|
150
|
+
|
|
151
|
+
示例:
|
|
152
|
+
|
|
153
|
+
```python
|
|
154
|
+
(255, 0, 0, 255) # 不透明红
|
|
155
|
+
(0, 255, 0, 128) # 半透明绿
|
|
156
|
+
(0, 0, 0, 0) # 全透明
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
`rouwan_gui.Color_V` 是默认颜色常量。
|
|
160
|
+
|
|
161
|
+
## 项目结构
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
PyUI/
|
|
165
|
+
├── src/
|
|
166
|
+
│ └── rouwan_gui/
|
|
167
|
+
│ ├── __init__.py
|
|
168
|
+
│ ├── Window.py
|
|
169
|
+
│ ├── Frame.py
|
|
170
|
+
│ ├── Button.py
|
|
171
|
+
│ ├── Entry.py
|
|
172
|
+
│ ├── Text.py
|
|
173
|
+
│ ├── Table.py
|
|
174
|
+
│ └── STSONG.TTF
|
|
175
|
+
├── tests/
|
|
176
|
+
├── pyproject.toml
|
|
177
|
+
└── README.md
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## 开发
|
|
181
|
+
|
|
182
|
+
安装开发依赖:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
pip install -e ".[dev]"
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
运行测试:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
python -m pytest
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
打包:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
python -m build
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
生成的文件位于 `dist/` 目录下。
|
|
201
|
+
|
|
202
|
+
## 字体说明
|
|
203
|
+
|
|
204
|
+
本库自带 `STSONG.TTF` 字体文件,随代码一起打包。若需替换字体,修改 `Text.py` 中的 `FONT` 常量即可。
|
|
205
|
+
|
|
206
|
+
## 版本历史
|
|
207
|
+
|
|
208
|
+
- **0.2.2** — 当前版本,修复各种bug,统一风格
|
|
209
|
+
- **0.2.1** — 修复打包时文件名改动的遗留问题
|
|
210
|
+
- **0.2.0** — 首个可打包版本
|
|
211
|
+
|
|
212
|
+
## License
|
|
213
|
+
|
|
214
|
+
MIT
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=84.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "rouwan-gui"
|
|
7
|
+
version = "0.2.2"
|
|
8
|
+
readme="README.md"
|
|
9
|
+
description = "这是一个Python的GUI库。"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "肥美入类", email = "ydx20140606@qq.com" },
|
|
14
|
+
]
|
|
15
|
+
keywords = ["gui", "demo"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Operating System :: OS Independent",
|
|
19
|
+
]
|
|
20
|
+
dependencies = [
|
|
21
|
+
"pyglet>=2.0"
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
[project.optional-dependencies]
|
|
25
|
+
dev = ["pytest", "build"]
|
|
26
|
+
|
|
27
|
+
[project.urls]
|
|
28
|
+
Homepage = "https://github.com/you/pygui"
|
|
29
|
+
Repository = "https://github.com/you/pygui"
|
|
30
|
+
|
|
31
|
+
[tool.setuptools.packages.find]
|
|
32
|
+
where = ["src"]
|
|
33
|
+
|
|
34
|
+
[tool.pytest.ini_options]
|
|
35
|
+
testpaths = ["tests"]
|
|
36
|
+
|
|
37
|
+
[tool.setuptools.package-data]
|
|
38
|
+
rouwan_gui = ["*.TTF", "*.ttf"]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import rouwan_gui as rwg
|
|
2
|
+
|
|
3
|
+
class Button:
|
|
4
|
+
|
|
5
|
+
def __init__(self, x, y, width, height,text,window, color,command=None,font_size=1):
|
|
6
|
+
self.frame= rwg.Frame(x, y, width, height, window, color)
|
|
7
|
+
self.frame_text= rwg.Text(x, y, text, window, font_size=font_size)
|
|
8
|
+
self.window=window
|
|
9
|
+
self.command=command
|
|
10
|
+
|
|
11
|
+
def draw(self):
|
|
12
|
+
self.frame.draw()
|
|
13
|
+
self.frame_text.draw()
|
|
14
|
+
|
|
15
|
+
def is_clicked(self):
|
|
16
|
+
if self.window.last_mouse is not None:
|
|
17
|
+
pos=self.window.last_mouse[0]
|
|
18
|
+
con_x=pos[0]>=self.frame.left and pos[0]<=self.frame.right
|
|
19
|
+
con_y=pos[1]>=self.frame.bottom and pos[1]<=self.frame.top
|
|
20
|
+
if con_x and con_y:
|
|
21
|
+
return True
|
|
22
|
+
return False
|
|
23
|
+
|
|
24
|
+
def update(self):
|
|
25
|
+
if (self.command is not None) and self.is_clicked():
|
|
26
|
+
self.command()
|
|
27
|
+
|
|
28
|
+
def create_Button(name,x,y,width,height,text,window,color,command=None,font_size=1):
|
|
29
|
+
window.role_dict[name]=Button(x,y,width,height,text,window,color,command=command,font_size=font_size)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import pyglet as pg
|
|
2
|
+
import rouwan_gui as rwg
|
|
3
|
+
|
|
4
|
+
class Entry:
|
|
5
|
+
|
|
6
|
+
def __init__(self,x, y, width, height, window, color,init_text="",font_size=1):
|
|
7
|
+
self.size=font_size
|
|
8
|
+
self.button= rwg.Button(x, y, width, height, init_text, window, color, font_size=font_size)
|
|
9
|
+
self.result=""
|
|
10
|
+
self.window=window
|
|
11
|
+
self.state=False
|
|
12
|
+
|
|
13
|
+
def draw(self):
|
|
14
|
+
self.button.draw()
|
|
15
|
+
|
|
16
|
+
def update(self):
|
|
17
|
+
try:
|
|
18
|
+
if self.button.is_clicked():
|
|
19
|
+
self.state=not self.state
|
|
20
|
+
inputs=self.window.last_text
|
|
21
|
+
symbol=self.window.last_key[0]
|
|
22
|
+
if self.state and (symbol is not None):
|
|
23
|
+
if symbol==pg.window.key.RETURN or symbol==pg.window.key.ENTER:
|
|
24
|
+
self.state=False
|
|
25
|
+
elif symbol==pg.window.key.BACKSPACE:
|
|
26
|
+
self.result=self.result[:-1]
|
|
27
|
+
else:
|
|
28
|
+
self.result+=inputs
|
|
29
|
+
self.button.frame_text.change_text(self.result,self.size)
|
|
30
|
+
|
|
31
|
+
except:
|
|
32
|
+
pass
|
|
33
|
+
|
|
34
|
+
def create_Entry(name,x,y,width,height,window,color,init_text="",font_size=1):
|
|
35
|
+
window.role_dict[name]=Entry(x,y,width,height,window,color,init_text=init_text,font_size=font_size)
|
|
36
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import pyglet as pg
|
|
2
|
+
|
|
3
|
+
class Frame:
|
|
4
|
+
def __init__(self,x,y,width,height,window,color):
|
|
5
|
+
self.width=window.w_to_num(width)
|
|
6
|
+
self.height=window.h_to_num(height)
|
|
7
|
+
self.top=window.y_to_num(height/2+y)
|
|
8
|
+
self.bottom=window.y_to_num(y-height/2)
|
|
9
|
+
self.left=window.x_to_num(x-width/2)
|
|
10
|
+
self.right=window.x_to_num(x+width/2)
|
|
11
|
+
self.x=window.x_to_num(x)
|
|
12
|
+
self.y=window.y_to_num(y)
|
|
13
|
+
self.window=window
|
|
14
|
+
self.color=color
|
|
15
|
+
self.core=pg.shapes.Rectangle(
|
|
16
|
+
self.left,
|
|
17
|
+
self.bottom,
|
|
18
|
+
self.width,
|
|
19
|
+
self.height,
|
|
20
|
+
color=color
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
def draw(self):
|
|
24
|
+
self.core.draw()
|
|
25
|
+
|
|
26
|
+
def create_Frame(name,x,y,width,height,window,color):
|
|
27
|
+
window.role_dict[name]=Frame(x,y,width,height,window,color)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import rouwan_gui as rwg
|
|
2
|
+
|
|
3
|
+
class Table:
|
|
4
|
+
def __init__(self,x,y,width,height,text,window,frame_color=rwg.Color_V,font_size=1):
|
|
5
|
+
self.frame= rwg.Frame(x, y, width, height, window,frame_color)
|
|
6
|
+
self.text= rwg.Text(x, y, text, window, font_size=font_size)
|
|
7
|
+
|
|
8
|
+
def draw(self):
|
|
9
|
+
self.frame.draw()
|
|
10
|
+
self.text.draw()
|
|
11
|
+
|
|
12
|
+
def change_text(self,new_text):
|
|
13
|
+
self.text.change_text(new_text,self.text.font_size)
|
|
14
|
+
|
|
15
|
+
def create_Table(name,x,y,width,height,text,window,frame_color=rwg.Color_V,font_size=1):
|
|
16
|
+
window.role_dict[name]=Table(x,y,width,height,text,window,frame_color=frame_color,font_size=font_size)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import pyglet as pg
|
|
2
|
+
|
|
3
|
+
FONT="STSONG.TTF"
|
|
4
|
+
|
|
5
|
+
class Text:
|
|
6
|
+
def __init__(self,x,y,text,window,font_size=1):
|
|
7
|
+
global FONT
|
|
8
|
+
self.x=window.x_to_num(x)
|
|
9
|
+
self.y=window.y_to_num(y)
|
|
10
|
+
self.text=text
|
|
11
|
+
self.window=window
|
|
12
|
+
self.font_size=font_size
|
|
13
|
+
self.core=pg.text.Label(
|
|
14
|
+
self.text,
|
|
15
|
+
font_name=FONT,
|
|
16
|
+
font_size=font_size,
|
|
17
|
+
x=self.x,
|
|
18
|
+
y=self.y,
|
|
19
|
+
anchor_x="center",
|
|
20
|
+
anchor_y="center"
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
def draw(self):
|
|
24
|
+
self.core.draw()
|
|
25
|
+
|
|
26
|
+
def change_text(self,new_text,new_size):
|
|
27
|
+
self.text=new_text
|
|
28
|
+
self.font_size=new_size
|
|
29
|
+
self.core=pg.text.Label(
|
|
30
|
+
self.text,
|
|
31
|
+
font_name=FONT,
|
|
32
|
+
font_size=self.font_size,
|
|
33
|
+
x=self.x,
|
|
34
|
+
y=self.y,
|
|
35
|
+
anchor_x="center",
|
|
36
|
+
anchor_y="center"
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
def create_Text(name,x,y,text,window,font_size=1):
|
|
40
|
+
window.role_dict[name]=Text(x,y,text,window,font_size=font_size)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import pyglet as pg
|
|
2
|
+
|
|
3
|
+
class Window:
|
|
4
|
+
#坐标标准:中心点为(0,0),横向±960,纵向±540,右上正,左下负
|
|
5
|
+
def __init__(self,width,height,name,fps,update_command):
|
|
6
|
+
self.core=pg.window.Window(width,height,name)
|
|
7
|
+
self.width=width
|
|
8
|
+
self.height=height
|
|
9
|
+
self.name=name
|
|
10
|
+
self.fps=fps
|
|
11
|
+
self.role_dict={}
|
|
12
|
+
self.update_command=update_command
|
|
13
|
+
self.last_text=""
|
|
14
|
+
self.last_key=None
|
|
15
|
+
self.last_mouse=None
|
|
16
|
+
self.core.push_handlers(
|
|
17
|
+
on_text=self._get_text,
|
|
18
|
+
on_key_press=self._get_key,
|
|
19
|
+
on_mouse_press=self._get_mouse,
|
|
20
|
+
on_draw=self._draw
|
|
21
|
+
)
|
|
22
|
+
pg.clock.schedule_interval(self.update,1/self.fps)
|
|
23
|
+
|
|
24
|
+
def w_to_num(self,width):
|
|
25
|
+
return (width/1920)*self.width
|
|
26
|
+
|
|
27
|
+
def h_to_num(self,height):
|
|
28
|
+
return (height/1080)*self.height
|
|
29
|
+
|
|
30
|
+
def x_to_num(self,x):
|
|
31
|
+
return ((x+960)/1920)*self.width
|
|
32
|
+
|
|
33
|
+
def y_to_num(self,y):
|
|
34
|
+
return ((y+540)/1080)*self.height
|
|
35
|
+
|
|
36
|
+
def _get_text(self,text):
|
|
37
|
+
self.last_text=text
|
|
38
|
+
|
|
39
|
+
def _get_key(self,symbol,modifiers):
|
|
40
|
+
self.last_key=(symbol,modifiers)
|
|
41
|
+
|
|
42
|
+
def _get_mouse(self,x,y,button,modifiers):
|
|
43
|
+
self.last_mouse=((x,y),(button,modifiers))
|
|
44
|
+
|
|
45
|
+
def _draw(self):
|
|
46
|
+
for obj in self.role_dict.values():
|
|
47
|
+
obj.draw()
|
|
48
|
+
|
|
49
|
+
def update(self,dt):
|
|
50
|
+
self.update_command(self, dt)
|
|
51
|
+
self.last_text=""
|
|
52
|
+
self.last_key=None
|
|
53
|
+
self.last_mouse=None
|
|
54
|
+
|
|
55
|
+
def run(self):
|
|
56
|
+
pg.app.run()
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Color_V=(255,255,255,255)
|
|
2
|
+
|
|
3
|
+
from rouwan_gui.Button import *
|
|
4
|
+
from rouwan_gui.Entry import *
|
|
5
|
+
from rouwan_gui.Frame import *
|
|
6
|
+
from rouwan_gui.Table import *
|
|
7
|
+
from rouwan_gui.Text import *
|
|
8
|
+
from rouwan_gui.Window import *
|
|
9
|
+
|
|
10
|
+
__version__="0.2.2"
|
|
11
|
+
#该库的输入均为将屏幕逻辑分辨率定为(1920,1080),且屏幕中间点为(0,0),且任意控件均是以中心点作为位置参考点
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rouwan-gui
|
|
3
|
+
Version: 0.2.2
|
|
4
|
+
Summary: 这是一个Python的GUI库。
|
|
5
|
+
Author-email: 肥美入类 <ydx20140606@qq.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/you/pygui
|
|
8
|
+
Project-URL: Repository, https://github.com/you/pygui
|
|
9
|
+
Keywords: gui,demo
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.9
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
Requires-Dist: pyglet>=2.0
|
|
15
|
+
Provides-Extra: dev
|
|
16
|
+
Requires-Dist: pytest; extra == "dev"
|
|
17
|
+
Requires-Dist: build; extra == "dev"
|
|
18
|
+
|
|
19
|
+
# rouwan-gui
|
|
20
|
+
|
|
21
|
+
一个基于 [pyglet](https://pyglet.org/) 的轻量级 Python GUI 库。
|
|
22
|
+
|
|
23
|
+
## 简介
|
|
24
|
+
|
|
25
|
+
`rouwan-gui` 提供窗口、按钮、输入框、文本、容器、表格等常用控件,采用固定的逻辑坐标系,纯 Python 实现,跨平台运行。
|
|
26
|
+
|
|
27
|
+
## 坐标约定
|
|
28
|
+
|
|
29
|
+
- 逻辑分辨率固定为 `1920 x 1080`
|
|
30
|
+
- 屏幕中心为 `(0, 0)`
|
|
31
|
+
- 横向范围 `-960 ~ +960`,纵向范围 `-540 ~ +540`
|
|
32
|
+
- 右上为正方向,左下为负方向
|
|
33
|
+
- **所有控件以自身中心点作为位置参考点**
|
|
34
|
+
|
|
35
|
+
实际像素位置会按窗口真实尺寸自动换算,无需手动处理。
|
|
36
|
+
|
|
37
|
+
## 安装
|
|
38
|
+
|
|
39
|
+
从 whl 安装:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install E:\PycharmProject\rouwan_gui-0.2.2-py3-none-any.whl
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
从源码可编辑安装(开发用):
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
cd PyUI
|
|
49
|
+
pip install -e .
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
依赖 `pyglet`,安装时会自动拉取。
|
|
53
|
+
|
|
54
|
+
## 快速开始
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
import rouwan_gui as rwg
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def update(window, dt):
|
|
61
|
+
"""每帧调用一次。"""
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# 创建窗口:宽、高、标题、帧率、每帧回调
|
|
66
|
+
win = rwg.Window(800, 600, "我的应用", 60, update)
|
|
67
|
+
|
|
68
|
+
# 创建按钮:名称, x, y, 宽, 高, 文本, 窗口, 颜色, 回调, 字号
|
|
69
|
+
rwg.create_Button(
|
|
70
|
+
"btn1", 0, 0, 200, 60, "点我", win, (0, 255, 0, 255),
|
|
71
|
+
command=lambda: print("clicked"),
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# 创建输入框:名称, x, y, 宽, 高, 窗口, 颜色, 初始文本, 字号
|
|
75
|
+
rwg.create_Entry(
|
|
76
|
+
"input1", 0, -100, 300, 40, win, (60, 60, 60, 255),
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
# 创建文本:名称, x, y, 文本, 窗口, 字号
|
|
80
|
+
rwg.create_Text("title", 0, 200, "标题", win, font_size=24)
|
|
81
|
+
|
|
82
|
+
# 启动主循环
|
|
83
|
+
win.run()
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## API
|
|
87
|
+
|
|
88
|
+
### Window
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
Window(width, height, name, fps, update_command)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
| 参数 | 说明 |
|
|
95
|
+
|------|------|
|
|
96
|
+
| `width` / `height` | 窗口像素尺寸 |
|
|
97
|
+
| `name` | 窗口标题 |
|
|
98
|
+
| `fps` | 每帧更新频率 |
|
|
99
|
+
| `update_command` | 每帧回调,签名 `func(window, dt)` |
|
|
100
|
+
|
|
101
|
+
内部状态:
|
|
102
|
+
|
|
103
|
+
- `role_dict`:所有控件,按名字索引
|
|
104
|
+
- `last_text` / `last_key` / `last_mouse`:当前帧输入状态
|
|
105
|
+
|
|
106
|
+
方法:
|
|
107
|
+
|
|
108
|
+
- `run()`:启动主循环
|
|
109
|
+
|
|
110
|
+
### Button
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
create_Button(name, x, y, width, height, text, window, color,
|
|
114
|
+
command=None, font_size=1)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
| 参数 | 说明 |
|
|
118
|
+
|------|------|
|
|
119
|
+
| `name` | 控件名,用于 `role_dict` 索引 |
|
|
120
|
+
| `x`, `y` | 中心点逻辑坐标 |
|
|
121
|
+
| `width`, `height` | 逻辑尺寸 |
|
|
122
|
+
| `text` | 按钮文字 |
|
|
123
|
+
| `window` | 所属窗口 |
|
|
124
|
+
| `color` | 背景色 `(r, g, b, a)`,取值 `0~255` |
|
|
125
|
+
| `command` | 点击回调,无参函数 |
|
|
126
|
+
| `font_size` | 字号 |
|
|
127
|
+
|
|
128
|
+
### Entry
|
|
129
|
+
|
|
130
|
+
```python
|
|
131
|
+
create_Entry(name, x, y, width, height, window, color,
|
|
132
|
+
init_text="", font_size=1)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
点击切换输入状态,回车结束输入,退格删除字符。当前内容存于 `entry.result`。
|
|
136
|
+
|
|
137
|
+
### Text
|
|
138
|
+
|
|
139
|
+
```python
|
|
140
|
+
create_Text(name, x, y, text, window, font_size=1)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
显示文本,使用内置字体 `STSONG.TTF`,居中锚点。
|
|
144
|
+
|
|
145
|
+
### Frame
|
|
146
|
+
|
|
147
|
+
```python
|
|
148
|
+
create_Frame(name, x, y, width, height, window, color)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
纯色矩形区域。
|
|
152
|
+
|
|
153
|
+
### Table
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
create_Table(name, x, y, width, height, text, window,
|
|
157
|
+
frame_color=Color_V, font_size=1)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
带背景的文字块。`Color_V` 默认为不透明白 `(255, 255, 255, 255)`。
|
|
161
|
+
|
|
162
|
+
## 颜色
|
|
163
|
+
|
|
164
|
+
所有颜色均为 `(R, G, B, A)` 四元组,取值范围 `0 ~ 255`。
|
|
165
|
+
|
|
166
|
+
- `A = 0`:完全透明
|
|
167
|
+
- `A = 255`:完全不透明
|
|
168
|
+
|
|
169
|
+
示例:
|
|
170
|
+
|
|
171
|
+
```python
|
|
172
|
+
(255, 0, 0, 255) # 不透明红
|
|
173
|
+
(0, 255, 0, 128) # 半透明绿
|
|
174
|
+
(0, 0, 0, 0) # 全透明
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
`rouwan_gui.Color_V` 是默认颜色常量。
|
|
178
|
+
|
|
179
|
+
## 项目结构
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
PyUI/
|
|
183
|
+
├── src/
|
|
184
|
+
│ └── rouwan_gui/
|
|
185
|
+
│ ├── __init__.py
|
|
186
|
+
│ ├── Window.py
|
|
187
|
+
│ ├── Frame.py
|
|
188
|
+
│ ├── Button.py
|
|
189
|
+
│ ├── Entry.py
|
|
190
|
+
│ ├── Text.py
|
|
191
|
+
│ ├── Table.py
|
|
192
|
+
│ └── STSONG.TTF
|
|
193
|
+
├── tests/
|
|
194
|
+
├── pyproject.toml
|
|
195
|
+
└── README.md
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## 开发
|
|
199
|
+
|
|
200
|
+
安装开发依赖:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
pip install -e ".[dev]"
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
运行测试:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
python -m pytest
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
打包:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
python -m build
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
生成的文件位于 `dist/` 目录下。
|
|
219
|
+
|
|
220
|
+
## 字体说明
|
|
221
|
+
|
|
222
|
+
本库自带 `STSONG.TTF` 字体文件,随代码一起打包。若需替换字体,修改 `Text.py` 中的 `FONT` 常量即可。
|
|
223
|
+
|
|
224
|
+
## 版本历史
|
|
225
|
+
|
|
226
|
+
- **0.2.2** — 当前版本,修复各种bug,统一风格
|
|
227
|
+
- **0.2.1** — 修复打包时文件名改动的遗留问题
|
|
228
|
+
- **0.2.0** — 首个可打包版本
|
|
229
|
+
|
|
230
|
+
## License
|
|
231
|
+
|
|
232
|
+
MIT
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
src/rouwan_gui/Button.py
|
|
4
|
+
src/rouwan_gui/Entry.py
|
|
5
|
+
src/rouwan_gui/Frame.py
|
|
6
|
+
src/rouwan_gui/STSONG.TTF
|
|
7
|
+
src/rouwan_gui/Table.py
|
|
8
|
+
src/rouwan_gui/Text.py
|
|
9
|
+
src/rouwan_gui/Window.py
|
|
10
|
+
src/rouwan_gui/__init__.py
|
|
11
|
+
src/rouwan_gui.egg-info/PKG-INFO
|
|
12
|
+
src/rouwan_gui.egg-info/SOURCES.txt
|
|
13
|
+
src/rouwan_gui.egg-info/dependency_links.txt
|
|
14
|
+
src/rouwan_gui.egg-info/requires.txt
|
|
15
|
+
src/rouwan_gui.egg-info/top_level.txt
|
|
16
|
+
tests/test1.py
|
|
17
|
+
tests/test2.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
rouwan_gui
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import rouwan_gui as rwg
|
|
2
|
+
def win_update(obj,dt):
|
|
3
|
+
obj.role_dict["c1"].update()
|
|
4
|
+
obj.role_dict["b1"].update()
|
|
5
|
+
def k():
|
|
6
|
+
print("yes!")
|
|
7
|
+
win=rwg.Window(1400,800,"测试1",40,win_update)
|
|
8
|
+
rwg.create_Button("b1",0,0,240,40,"我是入类!",win,(0,255,0,255),font_size=20,command=k)
|
|
9
|
+
rwg.create_Table("a1",0,-200,300,50,"你好!",win,(0,0,255,255),font_size=25)
|
|
10
|
+
rwg.create_Entry("c1",0,-300,500,80,win,(255,0,0,255),font_size=20,init_text="djejje")
|
|
11
|
+
win.run()
|