summaryrefslogtreecommitdiff
path: root/Games
AgeCommit message (Collapse)Author
2020-05-14Build: Switch to CMake :^)Sergey Bugaev
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-05-12LibGUI: Include keyboard modifier state with button on_click callsAndreas Kling
This will allow you us to implement special behavior when Ctrl+clicking a button.
2020-04-21LibGUI: Make it easier to create checkable GUI::ActionsAndreas Kling
This patch adds GUI::Action::create_checkable() helpers that work just like the existing create() helpers, but the actions become checkable(!) Clients are no longer required to manage the checked state of their actions manually, but instead they will be checked/unchecked as needed by GUI::Action itself before the activation hook is fired.
2020-04-21LibGUI: Make MenuBar a Core::ObjectAndreas Kling
This makes it show up in Inspector with all the menus inside it. :^)
2020-04-20Solitaire: Use a pre-scaled buggie image for the back of cardsAndreas Kling
Instead of scaling on the fly, which is not super aesthetic yet.
2020-04-15LibGfx: Don't allow creating bitmaps whose sizes would overflowAndreas Kling
If the area or size_in_bytes calculation for a Gfx::Bitmap would overflow, we now refuse to create such a bitmap and return nullptr. Thanks to @itamar8910 for finding this! :^)
2020-04-04LibGUI: Add MenuBar::add_menu(name)Andreas Kling
This allows us to construct menus in a more natural way: auto& file_menu = menubar->add_menu("File"); file_menu.add_action(...); Instead of the old way: auto file_menu = GUI::Menu::construct(); file_menu->add_action(...); menubar->add_menu(file_menu);
2020-03-30Solitaire: Set parent window for AboutDialogTibor Nagy
2020-03-19Solitaire: Use dark green for empty stack outlinesTibor Nagy
Looks nicer than using dark gray. Derived from the background color.
2020-03-13Applications: Use "Document - AppName" window title formatTibor Nagy
Fixes #1444
2020-03-13Solitaire: Fix automatic moving of cardsTill Mayer
A previous change trying to fix an assertion error completely broke the automatic moving of cards, this commit will fix this problem
2020-03-13Solitaire: Minor tweaks to animation x_velocity and bouncynessTill Mayer
2020-03-13Solitaire: Add about dialog and 32x32 iconTill Mayer
2020-03-11Solitaire: Remove redundant check and fix formatting mistakesTill Mayer
2020-03-11Solitaire: Make sure to not add card twice to m_focused_cardsTill Mayer
There is a possibility that the same card gets added twice to m_focused_cards when first mousedown_event fires and then doubleclick_event, without the cards redrawing first. This would cause mouseup_event to try to pop too many cards from the stack, causing an assertion to fail. When the system is laggy there is also a high possibility that mousedown_event would fire twice without redrawing the cards first, causing another assertion to fail. Addditional mousedown_events will just be ignored now.
2020-03-09Games: Added solitaireTill Mayer
Added a solitaire game. Currently there are graphics missing on some of the cards, but the game is fully functional. Press F12 to show the game-over animation manually.
2020-03-07LibGUI: Move Icon and FontDatabase into the GUI namespaceShannon Booth
We also clean up some old references to the old G prefixed GUI classes This also fixes a potential bug with using: C_OBJECT_ABSTRACT(GAbstractButton) instead of C_OBJECT_ABSTRACT(AbstractButton)
2020-03-04LibCore: Make Core::Object::add<ChildType> return a ChildType&Andreas Kling
Since the returned object is now owned by the callee object, we can simply vend a ChildType&. This allows us to use "." instead of "->" at the call site, which is quite nice. :^)
2020-03-04LibGUI: Use GUI::Window::set_main_widget<WidgetType>() in clientsAndreas Kling
2020-03-04LibGUI: Use set_layout<LayoutType>() in lots of client codeAndreas Kling
2020-03-03LibGUI: Remove Button& parameter from Button::on_click hookAndreas Kling
There was but a single user of this parameter and it's a bit tedious to write it out every time, so let's get rid of it.
2020-02-26Minesweeper: Perform sanity check on configuration (#1300)Jesse
This addresses the issue found in #1261. Previously we weren't doing any form of sanity checking on the values in the configuration file, meaning that a user could input a ridiculous number of mines such that the number of mines is larger than the number of squares on the field.
2020-02-25Snake: Persist high scoreTibor Nagy
2020-02-25Build: Only look at SUBDIRS with Makefilesjoshua stein
If a directory is renamed or deleted before 'make clean', git will delete the Makefile but leave all of the object and dependency files around. When make would try to recurse into that directory from the wildcard, it would error out since there is no Makefile.
2020-02-25AK: Make Vector use size_t for its size and capacityAndreas Kling
2020-02-24AK: Make HashTable and HashMap use size_t for size and capacityAndreas Kling
2020-02-23LibGUI: Remove parent parameter to GUI::Widget constructorAndreas Kling
2020-02-23LibGUI: Make GUI::Frame have the 2px sunken container look by defaultAndreas Kling
The overwhelming majority of GUI::Frame users set the same appearance, so let's just make it the default.
2020-02-23Userspace: Use Core::Object::add() when building interfacesAndreas Kling
2020-02-20Minesweeper: Use system theme colors for empty square bordersTibor Nagy
2020-02-16LibGUI: Add forwarding headerAndreas Kling
This patch adds <LibGUI/Forward.h> and uses it a bunch. It also dragged various header dependency reduction changes into it.
2020-02-14LibGUI: Remove some header dependencies from Widget.hAndreas Kling
2020-02-06LibGUI: Remove leading G from filenamesAndreas Kling
2020-02-06LibCore: Remove leading C from filenamesAndreas Kling
2020-02-06LibGUI: Rename {H,V}BoxLayout => {Horizontal,Vertical}BoxLayoutAndreas Kling
2020-02-06LibGfx: Prefer using Gfx::Bitmap::load_from_file instead of load_png()Andreas Kling
Code that just wants to open a Gfx::Bitmap from a file should not be calling the PNG codec directly.
2020-02-06LibGfx: Unpublish Gfx::Size from the global namespaceAndreas Kling
2020-02-06LibGfx: Unpublish Gfx::Point from global namespaceAndreas Kling
2020-02-06LibGfx: Unpublish Gfx::Rect from global namespaceAndreas Kling
2020-02-06LibGfx: Rename GraphicsBitmap.{cpp,h} => Bitmap.{cpp,h}Andreas Kling
2020-02-06LibGfx: Rename from LibDraw :^)Andreas Kling
2020-02-06LibDraw: Put all classes in the Gfx namespaceAndreas Kling
I started adding things to a Draw namespace, but it somehow felt really wrong seeing Draw::Rect and Draw::Bitmap, etc. So instead, let's rename the library to LibGfx. :^)
2020-02-02LibGUI: Put all classes in the GUI namespace and remove the leading GAndreas Kling
This took me a moment. Welcome to the new world of GUI::Widget! :^)
2020-02-02LibCore: Put all classes in the Core namespace and remove the leading CAndreas Kling
I've been wanting to do this for a long time. It's time we start being consistent about how this stuff works. The new convention is: - "LibFoo" is a userspace library that provides the "Foo" namespace. That's it :^) This was pretty tedious to convert and I didn't even start on LibGUI yet. But it's coming up next.
2020-02-02LibGUI: Add GHBoxLayout and GVBoxLayout convenience classesAndreas Kling
2020-02-02Minesweeper: Make sure first tile revealed is always blank (#1164)pfg
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2020-01-17Kernel: Add "accept" pledge promise for accepting incoming connectionsAndreas Kling
This patch adds a new "accept" promise that allows you to call accept() on an already listening socket. This lets programs set up a socket for for listening and then dropping "inet" and/or "unix" so that only incoming (and existing) connections are allowed from that point on. No new outgoing connections or listening server sockets can be created. In addition to accept() it also allows getsockopt() with SOL_SOCKET and SO_PEERCRED, which is used to find the PID/UID/GID of the socket peer. This is used by our IPC library when creating shared buffers that should only be accessible to a specific peer process. This allows us to drop "unix" in WindowServer and LookupServer. :^) It also makes the debugging/introspection RPC sockets in CEventLoop based programs work again.
2020-01-12Games: Use pledge()Andreas Kling
2019-12-31Applications: Implement some missing MenuBars & AboutDialogsJami Kettunen