summaryrefslogtreecommitdiff
path: root/include/d
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2025-07-26 15:43:48 +0200
committerGitHub <noreply@github.com>2025-07-26 15:43:48 +0200
commit4ec5128eb4f6cdc8985f83f4c8b540115daf47fb (patch)
tree9b243377f73f9da40ee9854918485af84e3bb562 /include/d
parent01d7ad1b4f77bc2952aa3803a8d290a49c6ac5e6 (diff)
parent0aaeb4123d09bd112a2a0b742a1bd60e236669b1 (diff)
Merge pull request #223 from robojumper/d_lyt_cursor_stick
d_lyt_cursor_stick OK
Diffstat (limited to 'include/d')
-rw-r--r--include/d/d_cs_base.h2
-rw-r--r--include/d/lyt/d_lyt_cursor_stick.h27
2 files changed, 23 insertions, 6 deletions
diff --git a/include/d/d_cs_base.h b/include/d/d_cs_base.h
index 5f39ad67..2279d268 100644
--- a/include/d/d_cs_base.h
+++ b/include/d/d_cs_base.h
@@ -19,7 +19,7 @@ public:
virtual int execute() override;
int update();
- int similarToDraw();
+ bool drawDirectly();
void setField703(bool val) {
field_0x703 = val;
diff --git a/include/d/lyt/d_lyt_cursor_stick.h b/include/d/lyt/d_lyt_cursor_stick.h
index 83836c0c..cf5703ac 100644
--- a/include/d/lyt/d_lyt_cursor_stick.h
+++ b/include/d/lyt/d_lyt_cursor_stick.h
@@ -3,9 +3,10 @@
#include "common.h"
#include "d/lyt/d2d.h"
+#include "nw4r/lyt/lyt_pane.h"
#include "s/s_State.hpp"
-#include "s/s_StateMgr.hpp"
+/** 2D UI - element outline when selecting with cursor */
class dLytCursorStick_c {
public:
dLytCursorStick_c() : mStateMgr(*this, sStateID::null) {
@@ -15,19 +16,35 @@ public:
sInstance = nullptr;
}
- static dLytCursorStick_c *sInstance;
+ static bool build();
+ static bool remove();
+ static bool execute();
static bool draw();
- static bool similarToDraw();
+ static bool drawDirectly();
+
+ bool setPriority(u8 priority);
+ void setTargetPane(nw4r::lyt::Pane *pane);
private:
+ bool build_();
+ bool remove_();
+ bool execute_();
+ bool draw_();
+ bool drawDirectly_();
+ static dLytCursorStick_c *sInstance;
+
STATE_FUNC_DECLARE(dLytCursorStick_c, Off);
STATE_FUNC_DECLARE(dLytCursorStick_c, On);
+ void positionToTarget();
+
/* 0x000 */ UI_STATE_MGR_DECLARE(dLytCursorStick_c);
/* 0x03C */ d2d::ResAccIf_c mResAcc;
/* 0x3AC */ d2d::dLytSub mLyt;
- /* 0x440 */ d2d::AnmGroup_c mAnmGroups[1];
- /* 0x480 */ u8 field_0x480[0x49C - 0x480];
+ /* 0x440 */ d2d::AnmGroup_c mAnm[1];
+ /* 0x480 */ nw4r::lyt::Pane *mpPanes[5];
+ /* 0x494 */ nw4r::lyt::Pane *mpTargetPane;
+ /* 0x498 */ bool mShouldBeOn;
};
#endif