feat: add a new awesome feature
This commit is contained in:
@@ -30,6 +30,14 @@
|
||||
|
||||
---
|
||||
|
||||
## ==公告==
|
||||
|
||||
### 关于获取对话框TextBox返回值的问题
|
||||
|
||||
在TextBox的实现里把保存文本的std::string.c_str()强转变成可写,这会导致调用getText()无法获取文本框的内容,需要使用getText().c_str()来获取,这个问题目前已经修复,感谢用户反馈特此公告
|
||||
|
||||
---
|
||||
|
||||
## 🆕V2.3.0——重要更新
|
||||
|
||||
**本版本是一次重大更新,增加了响应式布局系统,由静态布局转变为动态布局,并且彻底修复了之前存在的由重入重绘导致的概率出现的渲染错乱问题**
|
||||
|
||||
@@ -43,9 +43,9 @@ protected:
|
||||
bool show = true; // 是否显示
|
||||
|
||||
/* == 布局模式 == */
|
||||
StellarX::LayoutMode layoutMode = StellarX::LayoutMode::Fixed; // 布局模式
|
||||
StellarX::Anchor anchor_1 = StellarX::Anchor::Top; // 锚点
|
||||
StellarX::Anchor anchor_2 = StellarX::Anchor::Left; // 锚点
|
||||
StellarX::LayoutMode layoutMode = StellarX::LayoutMode::AnchorToEdges; // 布局模式
|
||||
StellarX::Anchor anchor_1 = StellarX::Anchor::Left; // 锚点
|
||||
StellarX::Anchor anchor_2 = StellarX::Anchor::Right; // 锚点
|
||||
|
||||
/* == 背景快照 == */
|
||||
IMAGE* saveBkImage = nullptr;
|
||||
|
||||
@@ -79,8 +79,12 @@ bool TextBox::handleEvent(const ExMessage& msg)
|
||||
click = true;
|
||||
if(StellarX::TextBoxmode::INPUT_MODE == mode)
|
||||
{
|
||||
dirty = InputBox(LPTSTR(text.c_str()), (int)maxCharLen, "输入框", NULL, text.c_str(), NULL, NULL, false);
|
||||
consume = true;
|
||||
char* temp = new char[maxCharLen + 1];
|
||||
dirty = InputBox(temp, (int)maxCharLen, "输入框", NULL, text.c_str(), NULL, NULL, false);
|
||||
if(dirty)text = temp;
|
||||
delete[] temp;
|
||||
temp = nullptr;
|
||||
consume = true;
|
||||
}
|
||||
else if (StellarX::TextBoxmode::READONLY_MODE == mode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user