geode/loader/include/Geode/ui/InputNode.hpp
HJfod 71bd0fec83 now with a settings value getter in Mod so settings are actually usable
+ more settings UI stuff, preliminary control parsing (no UI for them
yet though) + fix InputNode not working
2022-09-14 19:21:35 +03:00

55 lines
1.4 KiB
C++

#pragma once
#include <Geode/Bindings.hpp>
namespace geode {
class GEODE_DLL InputNode : public cocos2d::CCMenuItem {
protected:
cocos2d::extension::CCScale9Sprite* m_bgSprite;
CCTextInputNode* m_input;
bool init(float, float, const char*, const char*, std::string const&, int);
bool init(float, const char*, const char*, std::string const&, int);
public:
static InputNode* create(
float width,
const char* placeholder,
const char* fontFile,
std::string const& filter,
int limit
);
static InputNode* create(
float width,
const char* placeholder,
std::string const& filter,
int limit
);
static InputNode* create(
float width,
const char* placeholder,
std::string const& filter
);
static InputNode* create(
float width,
const char* placeholder,
const char* fontFile
);
static InputNode* create(
float width,
const char* placeholder
);
void activate() override;
CCTextInputNode* getInput() const;
cocos2d::extension::CCScale9Sprite* getBG() const;
void setEnabled(bool);
void setString(std::string const&);
const char* getString();
};
}