mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-19 05:02:12 -04:00
JAHostIO and friends (#3131)
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#ifndef JOREVENT_H
|
||||
#define JOREVENT_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
class JORReflexible;
|
||||
|
||||
struct JOREvent {};
|
||||
|
||||
struct JORPropertyEvent : JOREvent {
|
||||
enum EKind {
|
||||
EKind_HasListener = (1 << 30),
|
||||
EKind_ValueID = (1 << 29),
|
||||
EKind_FloatValue = (1 << 9),
|
||||
};
|
||||
|
||||
/* 0x00 */ u8 field_0x0[0x4 - 0x0];
|
||||
/* 0x04 */ u32 type;
|
||||
/* 0x08 */ u32 kind;
|
||||
/* 0x0C */ char* id; // id?
|
||||
/* 0x10 */ JORReflexible* field_0x10; // ?
|
||||
/* 0x14 */ u32 field_0x14;
|
||||
union {
|
||||
u32 U32;
|
||||
u16 U16[2];
|
||||
}
|
||||
/* 0x18 */ field_0x18;
|
||||
};
|
||||
|
||||
struct JORGenEvent : JOREvent {};
|
||||
|
||||
struct JORNodeEvent : JOREvent {
|
||||
/* 0x00 */ u32 field_0x0;
|
||||
};
|
||||
|
||||
#endif /* JOREVENT_H */
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
/* 0x08 */ u32 m_fileAttribute;
|
||||
/* 0x0C */ u32 m_lowDateTime;
|
||||
/* 0x10 */ u32 m_highDateTime;
|
||||
/* 0x14 */ char* m_filename;
|
||||
/* 0x14 */ char m_filename[];
|
||||
};
|
||||
|
||||
class JORFile {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <dolphin.h>
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
#include "JSystem/JHostIO/JOREvent.h"
|
||||
#include "JSystem/JSupport/JSUMemoryStream.h"
|
||||
|
||||
#define MCTX_MSG_RESET 0
|
||||
@@ -194,9 +194,7 @@ public:
|
||||
void startUpdateNode(JORReflexible* obj) { putNode(obj); }
|
||||
|
||||
void genNodeSub(const char* label, JORReflexible* i_node, u32, u32);
|
||||
void putNode(JORReflexible* obj) {
|
||||
mOutputStream << (uintptr_t)obj;
|
||||
}
|
||||
void putNode(JORReflexible* obj) { mOutputStream << (uintptr_t)obj; }
|
||||
void invalidNode(JORReflexible* i_node, u32);
|
||||
|
||||
void genControl(u32 type, u32 kind, const char* label, u32 style, u32 id,
|
||||
@@ -221,6 +219,10 @@ public:
|
||||
u16 posX = -1, u16 posY = -1, u16 width = JORM_DEFAULT_WIDTH,
|
||||
u16 height = JORM_DEFAULT_HEIGHT);
|
||||
|
||||
void updateButton(u32 param_1, u32 param_2, u32 param_3) {
|
||||
updateControl(param_1, param_2, param_3);
|
||||
}
|
||||
|
||||
void genLabel(const char* label, u32 id, u32 style = 0, JOREventListener* pListener = NULL,
|
||||
u16 posX = -1, u16 posY = -1, u16 width = JORM_DEFAULT_WIDTH,
|
||||
u16 height = JORM_DEFAULT_HEIGHT);
|
||||
@@ -270,6 +272,7 @@ public:
|
||||
DEFINE_START_COMBO_BOX_ID(s32, JORPropertyEvent::EKind_ValueID)
|
||||
|
||||
DEFINE_UPDATE_COMBO_BOX(u8)
|
||||
DEFINE_UPDATE_COMBO_BOX(s32)
|
||||
|
||||
DEFINE_UPDATE_COMBO_BOX_ID(s32)
|
||||
|
||||
@@ -279,6 +282,16 @@ public:
|
||||
genSelectorItemSub(label, itemNo, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
void editComboBoxItem(u32 param_0, u32 param_1, const char* param_2, s32 param_3, u32 param_4);
|
||||
|
||||
void addComboBoxItem(u32 param_1, s32* param_2, const char* param_3, s32 param_4, u32 param_5) {
|
||||
editComboBoxItem(param_1, (uintptr_t)param_2, param_3, param_4, param_5);
|
||||
}
|
||||
|
||||
void removeComboBoxItem(u32 param_1, s32* param_2, u32 param_3) {
|
||||
editComboBoxItem(param_1, (uintptr_t)param_2, NULL, 0, param_3);
|
||||
}
|
||||
|
||||
/**
|
||||
* === RADIO BUTTON ===
|
||||
*/
|
||||
@@ -313,8 +326,6 @@ public:
|
||||
updateSelectorSub(mode, (uintptr_t)pSrc, *pSrc, param_3);
|
||||
}
|
||||
|
||||
void editComboBoxItem(u32 param_0, u32 param_1, const char* param_2, s32 param_3, u32 param_4);
|
||||
|
||||
void openMessageBox(void* param_0, u32 style, const char* message, const char* title);
|
||||
|
||||
/* 0x00000 */ u8 mBuffer[0x10000];
|
||||
|
||||
@@ -2,36 +2,12 @@
|
||||
#define JORREFLEXIBLE_H
|
||||
|
||||
#include <types.h>
|
||||
#include "JSystem/JHostIO/JORServer.h"
|
||||
|
||||
class JORReflexible;
|
||||
|
||||
struct JOREvent {};
|
||||
|
||||
struct JORPropertyEvent : JOREvent {
|
||||
enum EKind {
|
||||
EKind_HasListener = (1 << 30),
|
||||
EKind_ValueID = (1 << 29),
|
||||
EKind_FloatValue = (1 << 9),
|
||||
};
|
||||
|
||||
/* 0x00 */ u8 field_0x0[0x4 - 0x0];
|
||||
/* 0x04 */ u32 type;
|
||||
/* 0x08 */ u32 kind;
|
||||
/* 0x0C */ char* id; // id?
|
||||
/* 0x10 */ JORReflexible* field_0x10; // ?
|
||||
/* 0x14 */ u32 field_0x14;
|
||||
union {
|
||||
u32 U32;
|
||||
u16 U16[2];
|
||||
}
|
||||
/* 0x18 */ field_0x18;
|
||||
};
|
||||
|
||||
struct JORGenEvent : JOREvent {};
|
||||
|
||||
struct JORNodeEvent : JOREvent {
|
||||
/* 0x00 */ u32 field_0x0;
|
||||
};
|
||||
struct JOREvent;
|
||||
struct JORPropertyEvent;
|
||||
struct JORGenEvent;
|
||||
struct JORNodeEvent;
|
||||
|
||||
class JORMContext;
|
||||
class JORServer;
|
||||
@@ -48,8 +24,8 @@ class JORReflexible : public JOREventListener {
|
||||
public:
|
||||
#if DEBUG
|
||||
JORReflexible() {}
|
||||
static JORServer* getJORServer();
|
||||
|
||||
static JORServer* getJORServer() { return JORServer::getInstance(); }
|
||||
|
||||
virtual void listenPropertyEvent(const JORPropertyEvent*);
|
||||
virtual void listen(u32, const JOREvent*);
|
||||
virtual void genObjectInfo(const JORGenEvent*);
|
||||
|
||||
Reference in New Issue
Block a user