2020-01-02 02:41:43 +00:00
|
|
|
//
|
|
|
|
// File: foldhaus_text_entry.h
|
|
|
|
// Author: Peter Slattery
|
|
|
|
// Creation Date: 2020-01-01
|
|
|
|
//
|
|
|
|
#ifndef FOLDHAUS_TEXT_ENTRY_H
|
|
|
|
|
2019-09-02 06:03:38 +00:00
|
|
|
enum text_translation_type
|
|
|
|
{
|
|
|
|
TextTranslateTo_String,
|
|
|
|
TextTranslateTo_R32,
|
|
|
|
TextTranslateTo_S32,
|
|
|
|
TextTranslateTo_U32,
|
|
|
|
};
|
|
|
|
|
2019-09-21 20:19:02 +00:00
|
|
|
struct text_entry_destination
|
2019-09-02 06:03:38 +00:00
|
|
|
{
|
|
|
|
text_translation_type Type;
|
|
|
|
union {
|
|
|
|
string* StringDest;
|
|
|
|
r32* FloatDest;
|
|
|
|
s32* SignedIntDest;
|
|
|
|
u32* UnsignedIntDest;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-09-21 20:19:02 +00:00
|
|
|
struct text_entry
|
2019-08-18 12:56:18 +00:00
|
|
|
{
|
|
|
|
string Buffer;
|
|
|
|
s32 CursorPosition;
|
2019-09-02 06:03:38 +00:00
|
|
|
|
2019-09-21 20:19:02 +00:00
|
|
|
text_entry_destination Destination;
|
2020-01-02 02:41:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#define FOLDHAUS_TEXT_ENTRY_H
|
|
|
|
#endif // FOLDHAUS_TEXT_ENTRY_H
|