geode/loader/include/Geode/ui/InputNode.hpp

39 lines
1.3 KiB
C++
Raw Normal View History

#pragma once
#include <Geode/DefaultInclude.hpp>
2023-03-08 12:31:07 -05:00
#include <Geode/binding/CCTextInputNode.hpp>
2022-10-13 05:56:23 -04:00
#include <cocos2d.h>
namespace geode {
class GEODE_DLL InputNode : public cocos2d::CCMenuItem {
protected:
cocos2d::extension::CCScale9Sprite* m_bgSprite;
CCTextInputNode* m_input;
2022-10-30 14:59:20 -04:00
bool init(float, float, char const*, char const*, std::string const&, int);
bool init(float, char const*, char const*, std::string const&, int);
public:
static InputNode* create(
2022-10-30 14:59:20 -04:00
float width, char const* placeholder, char const* fontFile, std::string const& filter,
int limit
);
static InputNode* create(
2022-10-30 14:59:20 -04:00
float width, char const* placeholder, std::string const& filter, int limit
);
2022-10-30 14:59:20 -04:00
static InputNode* create(float width, char const* placeholder, std::string const& filter);
static InputNode* create(float width, char const* placeholder, char const* fontFile);
static InputNode* create(float width, char const* placeholder);
void activate() override;
CCTextInputNode* getInput() const;
cocos2d::extension::CCScale9Sprite* getBG() const;
2022-09-28 09:21:05 -04:00
void setEnabled(bool enabled) override;
void setString(std::string const&);
2024-01-16 11:58:31 -05:00
std::string getString();
};
}