Skip to content

Commit

Permalink
Merge pull request #20 from RealDoigt/dub
Browse files Browse the repository at this point in the history
Dub
  • Loading branch information
RealDoigt authored Nov 26, 2024
2 parents 0a3d3b6 + 2f4b1c6 commit f58a01f
Show file tree
Hide file tree
Showing 36 changed files with 50 additions and 15 deletions.
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.dub
docs.json
__dummy.html
docs/
/door
door.so
door.dylib
door.dll
door.a
door.lib
door-test-*
*.exe
*.o
*.obj
*.lst
libdoor.a
6 changes: 6 additions & 0 deletions dub.sdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name "door"
description "D Object Oriented Raylib. A high level, object oriented wrapper for raylib-d and useful extras."
authors "Doigt"
copyright "Copyright © 2024, Doigt"
license "MIT"
dependency "raylib-d" version="~>4.0.0"
10 changes: 10 additions & 0 deletions dub.selections.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"fileVersion": 1,
"versions": {
"ddmp": "0.0.1-0.dev.3",
"fluent-asserts": "0.13.3",
"libdparse": "0.14.0",
"raylib-d": "4.0.2",
"stdx-allocator": "2.77.5"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 12 additions & 10 deletions lib/core/window.d → source/core/window.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module door.core.window;
import raylib;
import std.string;
import door.images.image;

__gshared class Window
{
Expand Down Expand Up @@ -51,29 +53,29 @@ __gshared class Window
return IsWindowMinimized;
}

auto isMaximised()
auto isMaximized()
{
return IsWindowMaximised;
return IsWindowMaximized;
}

void toggleFullscreen()
{
ToggleFullscreen;
}

void toggleBorderlessWindowed()
{
ToggleBorderlessWindowed;
}
//void toggleBorderless()
//{
// ToggleBorderlessWindowed;
//} Not sure why that won't compile, maybe it doesn't exist in 4.0? I'll have to check later

void maximise()
void maximize()
{
MaximiseWindow;
MaximizeWindow;
}

void minimise()
void minimize()
{
MinimiseWindow;
MinimizeWindow;
}

void restore()
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/images/image.d → source/images/image.d
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class FileDataIsNullException : Exception

class Img
{
package(door.images) Image image;
package(door) Image image;
alias image this;

this(string fileName)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 5 additions & 4 deletions lib/shapes/rectcut.d → source/shapes/rectcut.d
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module door.shapes.rectcut;
import raylib;
import door.shapes.rectangle;
import door.colors.web;
import std.algorithm;
Expand Down Expand Up @@ -110,15 +111,15 @@ class RectCut : Rect
{
x -= toCut;
y -= toCut;
maxX += toCut;
maxY += toCut;
width += toCut - x;
height += toCut - y;
}

void selfcontract(int toCut)
{
x += toCut;
y += toCut;
maxX -= toCut;
maxY -= toCut;
width -= toCut - x;
height -= toCut - y;
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f58a01f

Please sign in to comment.