Explorar o código

WindowServer+LibGUI: Add "help" cursor

Linus Groh %!s(int64=5) %!d(string=hai) anos
pai
achega
b8a8e417f1

+ 1 - 0
Base/etc/WindowServer/WindowServer.ini

@@ -17,6 +17,7 @@ IBeam=/res/cursors/i-beam.png
 Disallowed=/res/cursors/disallowed.png
 Move=/res/cursors/move.png
 Hand=/res/cursors/hand.png
+Help=/res/cursors/help.png
 Drag=/res/cursors/drag.png
 
 [Input]

BIN=BIN
Base/res/cursors/help.png


+ 1 - 0
Libraries/LibGUI/Window.h

@@ -49,6 +49,7 @@ enum class StandardCursor {
     ResizeColumn,
     ResizeRow,
     Hand,
+    Help,
     Drag,
     Move,
 };

+ 2 - 0
Services/WindowServer/Cursor.cpp

@@ -72,6 +72,8 @@ RefPtr<Cursor> Cursor::create(StandardCursor standard_cursor)
         return WindowManager::the().resize_row_cursor();
     case StandardCursor::Hand:
         return WindowManager::the().hand_cursor();
+    case StandardCursor::Help:
+        return WindowManager::the().help_cursor();
     case StandardCursor::Drag:
         return WindowManager::the().drag_cursor();
     case StandardCursor::Move:

+ 1 - 0
Services/WindowServer/Cursor.h

@@ -41,6 +41,7 @@ enum class StandardCursor {
     ResizeColumn,
     ResizeRow,
     Hand,
+    Help,
     Drag,
     Move,
 };

+ 1 - 0
Services/WindowServer/WindowManager.cpp

@@ -113,6 +113,7 @@ void WindowManager::reload_config(bool set_screen)
 
     m_arrow_cursor = get_cursor("Arrow", { 2, 2 });
     m_hand_cursor = get_cursor("Hand", { 8, 4 });
+    m_help_cursor = get_cursor("Help", { 1, 1 });
     m_resize_horizontally_cursor = get_cursor("ResizeH");
     m_resize_vertically_cursor = get_cursor("ResizeV");
     m_resize_diagonally_tlbr_cursor = get_cursor("ResizeDTLBR");

+ 2 - 0
Services/WindowServer/WindowManager.h

@@ -122,6 +122,7 @@ public:
     const Cursor& active_cursor() const;
     const Cursor& arrow_cursor() const { return *m_arrow_cursor; }
     const Cursor& hand_cursor() const { return *m_hand_cursor; }
+    const Cursor& help_cursor() const { return *m_help_cursor; }
     const Cursor& resize_horizontally_cursor() const { return *m_resize_horizontally_cursor; }
     const Cursor& resize_vertically_cursor() const { return *m_resize_vertically_cursor; }
     const Cursor& resize_diagonally_tlbr_cursor() const { return *m_resize_diagonally_tlbr_cursor; }
@@ -204,6 +205,7 @@ private:
 
     RefPtr<Cursor> m_arrow_cursor;
     RefPtr<Cursor> m_hand_cursor;
+    RefPtr<Cursor> m_help_cursor;
     RefPtr<Cursor> m_resize_horizontally_cursor;
     RefPtr<Cursor> m_resize_vertically_cursor;
     RefPtr<Cursor> m_resize_diagonally_tlbr_cursor;