fix UINode function typedefs naming
This commit is contained in:
parent
7abe552e3c
commit
f9bab5a5cf
@ -31,7 +31,7 @@ Button::Button(
|
||||
GUI& gui,
|
||||
const std::wstring& text,
|
||||
glm::vec4 padding,
|
||||
const onaction& action,
|
||||
const OnAction& action,
|
||||
glm::vec2 size
|
||||
)
|
||||
: Panel(gui, size, padding, 0.0f) {
|
||||
|
||||
@ -19,7 +19,7 @@ namespace gui {
|
||||
GUI& gui,
|
||||
const std::wstring& text,
|
||||
glm::vec4 padding,
|
||||
const onaction& action,
|
||||
const OnAction& action,
|
||||
glm::vec2 size = glm::vec2(-1)
|
||||
);
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ SelectBox::SelectBox(
|
||||
});
|
||||
}
|
||||
|
||||
void SelectBox::listenChange(onstringchange&& callback) {
|
||||
void SelectBox::listenChange(OnStringChange&& callback) {
|
||||
changeCallbacks.listen(std::move(callback));
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ namespace gui {
|
||||
const glm::vec4& padding
|
||||
);
|
||||
|
||||
void listenChange(onstringchange&& callback);
|
||||
void listenChange(OnStringChange&& callback);
|
||||
|
||||
void setSelected(const Option& selected);
|
||||
|
||||
|
||||
@ -64,22 +64,22 @@ UINode* UINode::getParent() const {
|
||||
return parent;
|
||||
}
|
||||
|
||||
UINode* UINode::listenAction(const onaction& action) {
|
||||
UINode* UINode::listenAction(const OnAction& action) {
|
||||
actions.listen(action);
|
||||
return this;
|
||||
}
|
||||
|
||||
UINode* UINode::listenDoubleClick(const onaction& action) {
|
||||
UINode* UINode::listenDoubleClick(const OnAction& action) {
|
||||
doubleClickCallbacks.listen(action);
|
||||
return this;
|
||||
}
|
||||
|
||||
UINode* UINode::listenFocus(const onaction& action) {
|
||||
UINode* UINode::listenFocus(const OnAction& action) {
|
||||
focusCallbacks.listen(action);
|
||||
return this;
|
||||
}
|
||||
|
||||
UINode* UINode::listenDefocus(const onaction& action) {
|
||||
UINode* UINode::listenDefocus(const OnAction& action) {
|
||||
defocusCallbacks.listen(action);
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -19,9 +19,9 @@ namespace gui {
|
||||
class GUI;
|
||||
class Container;
|
||||
|
||||
using onaction = std::function<void(GUI&)>;
|
||||
using onnumberchange = std::function<void(GUI&, double)>;
|
||||
using onstringchange = std::function<void(GUI&, const std::string&)>;
|
||||
using OnAction = std::function<void(GUI&)>;
|
||||
using OnNumberChange = std::function<void(GUI&, double)>;
|
||||
using OnStringChange = std::function<void(GUI&, const std::string&)>;
|
||||
|
||||
template<typename... Args>
|
||||
class CallbacksSet {
|
||||
@ -187,10 +187,10 @@ namespace gui {
|
||||
/// @brief Get element z-index
|
||||
int getZIndex() const;
|
||||
|
||||
virtual UINode* listenAction(const onaction& action);
|
||||
virtual UINode* listenDoubleClick(const onaction& action);
|
||||
virtual UINode* listenFocus(const onaction& action);
|
||||
virtual UINode* listenDefocus(const onaction& action);
|
||||
virtual UINode* listenAction(const OnAction& action);
|
||||
virtual UINode* listenDoubleClick(const OnAction& action);
|
||||
virtual UINode* listenFocus(const OnAction& action);
|
||||
virtual UINode* listenDefocus(const OnAction& action);
|
||||
|
||||
virtual void onFocus();
|
||||
virtual void doubleClick(int x, int y);
|
||||
|
||||
@ -73,7 +73,7 @@ static runnable create_runnable(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static onaction create_action(
|
||||
static OnAction create_action(
|
||||
const UiXmlReader& reader,
|
||||
const xml::xmlelement& element,
|
||||
const std::string& name
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user