Pressing enter on textbox creates a new grid/bookmark
This commit is contained in:
parent
1849ffc730
commit
06ef26a1e9
4 changed files with 30 additions and 24 deletions
|
|
@ -6,7 +6,7 @@ namespace GUIStuff {
|
|||
|
||||
template <typename T> class TextBox : public Element {
|
||||
public:
|
||||
void update(UpdateInputData& io, T* newData, const std::function<std::optional<T>(const std::string&)>& newFromStr, const std::function<std::string(const T&)> newToStr, bool newSingleLine, bool updateEveryEdit, const std::function<void()>& elemUpdate) {
|
||||
void update(UpdateInputData& io, T* newData, const std::function<std::optional<T>(const std::string&)>& newFromStr, const std::function<std::string(const T&)> newToStr, bool newSingleLine, bool updateEveryEdit, const std::function<void(SelectionHelper&)>& elemUpdate) {
|
||||
data = newData;
|
||||
fromStr = newFromStr;
|
||||
toStr = newToStr;
|
||||
|
|
@ -129,7 +129,7 @@ template <typename T> class TextBox : public Element {
|
|||
force_update_textbox(true);
|
||||
}
|
||||
if(elemUpdate)
|
||||
elemUpdate();
|
||||
elemUpdate(selection);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue