Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed incorrect position of the GuiWindowBox closing icon with the de… #318

Merged
merged 1 commit into from Aug 4, 2023
Merged

Conversation

akimky
Copy link
Contributor

@akimky akimky commented Jul 30, 2023

…fined RAYGUI_NO_ICONS macro.

In the absence of the added check, and disabled icons, the closing icon of the Gui Window Box was to the left of the center, although it should be strictly centered.

…fined RAYGUI_NO_ICONS macro.

In the absence of the added check, and disabled icons, the closing icon of the Gui Window Box was to the left of the center, although it should be strictly centered.
@raysan5
Copy link
Owner

raysan5 commented Aug 2, 2023

@Akimpaus Please, could you provide some images illustrating the change?

@akimky
Copy link
Contributor Author

akimky commented Aug 3, 2023

@raysan5 In fact, it's not just about GuiWindowBox. Pay attention to the positioning of the icon substitutes.
image

@akimky
Copy link
Contributor Author

akimky commented Aug 3, 2023

Example code

#include <raylib.h>
#define RAYGUI_IMPLEMENTATION
#define RAYGUI_NO_ICONS
#include <raygui.h>

int main() {

    InitWindow(800, 600, "Test");

    const Rectangle windowBoxBounds = {
        300,
        50,
        100,
        100
    };

    const Rectangle spinnerBounds = {
        300,
        160,
        200,
        25
    };
    int spinnerValue = 0;
    bool spinnerEdit = false;

    while (!WindowShouldClose()) {

        BeginDrawing();
        ClearBackground(BLACK);

        GuiWindowBox(windowBoxBounds, "test");
        spinnerEdit = GuiSpinner(spinnerBounds, "test", &spinnerValue, 0, 100, spinnerEdit);

        EndDrawing();
    }

    CloseWindow();
    return 0;
}

@raysan5 raysan5 merged commit f896640 into raysan5:master Aug 4, 2023
@raysan5
Copy link
Owner

raysan5 commented Aug 4, 2023

@Akimpaus Thanks for the details and the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants