This commit is contained in:
2025-04-12 12:46:38 -05:00
parent 8d90f990f0
commit b7ab9a8780
7 changed files with 45 additions and 7 deletions

View File

@@ -26,7 +26,9 @@ if (UNIX)
endif()
if (WIN32)
add_library(JUI STATIC ${JUI_SRC})
add_library(JUI STATIC ${JUI_SRC}
include/JUI/Mixins/DragAndDropReceiver.hpp
include/JUI/Widgets/RadioButtonSet.hpp)
endif()
set_target_properties(JUI PROPERTIES LINKER_LANGUAGE CXX)

View File

@@ -317,6 +317,10 @@ namespace JUI {
/// The user should call this on their Scene instances only. JUI will handle the rest.
virtual void Update(float delta);
virtual bool OnClick();
virtual bool OnRelease();
/// Informs a widget that the mouse has been moved to a new location.
/// This is designed in such a way that the end-user can plug this into their existing code.
/// The user should call this on their Scene instances only. JUI will handle the rest.
@@ -325,6 +329,7 @@ namespace JUI {
/// meaning it no longer needs to be passed to the next widgets in the hierarchy.
/// @note It is acceptable for a widget to "observe" the input event, but not "consume" it.
virtual bool ObserveMouseMovement(const Vector2& latest_known_pos);
/// Informs a widget that a mouse button has pressed or released.
/// This is designed in such a way that the end-user can plug this into their existing code.
/// The user should call this on their Scene instances only. JUI will handle the rest.

View File

@@ -20,6 +20,7 @@ namespace JUI
class Clickable
{
public:
Event<Vector2, MouseButton> OnClickEvent;
Event<Vector2, MouseButton, bool> OnReleaseEvent;
public:

View File

@@ -0,0 +1,8 @@
//
// Created by josh on 4/11/25.
//
#ifndef DRAGANDDROPRECEIVER_HPP
#define DRAGANDDROPRECEIVER_HPP
#endif //DRAGANDDROPRECEIVER_HPP

View File

@@ -0,0 +1,8 @@
//
// Created by josh on 4/11/25.
//
#ifndef DRAGANDDROPSOURCE_HPP
#define DRAGANDDROPSOURCE_HPP
#endif //DRAGANDDROPSOURCE_HPP

View File

@@ -1,8 +1,14 @@
//
// Created by dawsh on 11/24/24.
//
#pragma once
#ifndef LISTBOX_HPP
#define LISTBOX_HPP
#endif //LISTBOX_HPP
#include <JUI/Widgets/ScrollingRect.hpp>
namespace JUI {
class ListBox : public ScrollingRect
{
ListBox();
explicit ListBox(Widget* widget);
};
}

View File

@@ -0,0 +1,8 @@
#pragma once
namespace JUI {
class RadioButtonSet : public W
}