summaryrefslogtreecommitdiff
path: root/src/gui/viewport.h
AgeCommit message (Collapse)AuthorFilesLines
2024-10-08Restore the screen shake effectThorbjørn Lindeijer1-0/+1
Now the experience mightes better with what it was before the logic update change (59a7d5c58f8b3af21b3e19d4e78f5653bf011bfb). The per-frame effect is reduced and less constant, based on a sine wave. The effect is no longer applied directly to the mPixelViewX/Y values, but is rather only taken into account when rendering the view.
2024-10-08Added convenient and efficient Timer classThorbjørn Lindeijer1-3/+5
The Timer is efficient because it does not depend on incrementing a counter to keep track of time, nor does it call SDL_GetTicks every time its state is checked (this happens once per frame instead). Along with global functions Time::absoluteTimeMs() and Time::deltaTimeMs(), this replaces previous globals tick_time, cur_time and get_elapsed_time(). For now, there is still a fixed 100 times per second logic call rate, but the new Time::deltaTimeMs() function should allow getting rid of this.
2024-04-08Added UI debug drawingThorbjørn Lindeijer1-2/+2
Shows outlines of visible widgets as well as highlighting modal focus, modal mouse focus and regular focus. Can currently only be toggled in the Debug window, so needs source code modification to be used during login sequence for now.
2024-03-12General code cleanupsThorbjørn Lindeijer1-2/+1
* Use default member initializers * Use range-based for loops * Avoid needless pointer references for ShopItem::mDuplicates * Removed type aliases that are only used once or twice * Removed more unused includes * Removed some unused functions * Removed superfluous .c_str() * Rely on default copy and assignment operators for Vector class * Use std::unique_ptr in some places * Removed duplicated mPlayerMoney updating in SellDialog * Removed duplicated Game::handleInput call * Removed unused SDLInput::mMouseInWindow * Removed remnant of manual widget positioning in HelpWindow * Removed superfluous initialization of static pointers
2024-02-09C++11: Use default member initializersThorbjørn Lindeijer1-11/+11
This patch is not exhaustive.
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-9/+9
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2011-08-30Made the popup-menu work again for equip/unequip processes.Yohann Ferreira1-1/+1
I disabled the drop from equipment window since it was more simple to implement, and because it seemed useless or even bad for the user experience to me.
2011-05-25Refining switches in the debug viewStefan Dombrowski1-1/+1
Reviewed-by: Bjorn
2011-05-20Removing KEY_PATHFIND and moving its function into the debug windowStefan Dombrowski1-2/+2
* The f-key is no longer used. That means new players are less likely to get into trouble by accidentally activating the debug mode. * The debug mode can now be activated in a new tab in the debug window. * The main advantage of using a gui is its extensibility. At the moment the debug mode does show too much information at once. In a follow-up patch the user should get more choices. Reviewed-by: Bjorn
2011-04-09Removed a lot of useless "documentation"Thorbjørn Lindeijer1-6/+0
I have to admit I contributed a large part of these. Sorry for that. Less empty space, more attention to the code. Acked-by: Jared Adams
2011-04-09Renamed Listener to EventListenerThorbjørn Lindeijer1-2/+2
Makes it clear what kind of listener it is, since there are other listener classes as well. Acked-by: Jared Adams
2011-04-09Removed the Mana namespaceThorbjørn Lindeijer1-2/+2
It's just an annoyance when it's only applied to a few classes. Either we place everything in this namespace or nothing, and at the moment I don't see any rationale for placing everything in a Mana namespace. Acked-by: Jared Adams
2011-04-09Moved Channels to Mana::Event::ChannelThorbjørn Lindeijer1-1/+1
Acked-by: Jared Adams
2011-03-15Implemented a screen shake effect system in the viewport class.Philipp Sehmisch1-0/+28
The screen can either be "nudged" in a random direction with a specific intensity or you can define an exact x and y intensity, decay factor and duration. On a tmwAthena server an effect is triggered when the player character dies. A method for stopping all shake effects is also implemented, but not used yet. I added a netcode message for Manaserv to trigger an effect server-sided. Because our protocol has currently no way to transport floating point values, the decay is transported as a fixed point value with 4 decimals which is entirely sufficient for this purpose.
2010-12-06Removed superfluous #includes taken from checkheaders list.Yohann Ferreira1-1/+0
Resolves: Mana-Mantis #265. Trivial fix.
2010-11-13Replace config listeners with the event systemChuck Miller1-7/+1
Reviewed-by: Jared Adams
2010-11-11Have the event system channels use enums instead of stringsChuck Miller1-1/+1
Reviewed-by: Freeyorp
2010-11-01Merge branch '0.5' of gitorious.org:mana/manaYohann Ferreira1-0/+5
Conflicts: src/being.cpp src/client.cpp src/commandhandler.cpp src/gui/setup_video.cpp src/gui/socialwindow.cpp src/gui/viewport.cpp src/gui/widgets/browserbox.cpp src/gui/widgets/itemcontainer.cpp src/imageparticle.cpp src/localplayer.cpp src/localplayer.h src/map.cpp src/net/tmwa/beinghandler.cpp src/particle.cpp src/particle.h src/player.cpp src/player.h
2010-10-03Fixing segmentation fault and updating the cursor type after mouse pressStefan Dombrowski1-0/+5
Until now the being was only set after a mouse move. If the mouse was pressed after the being was out of sight or dead, then a segmentation fault happened. Furthermore, pressing the mouse now updates the cursor type and sets the being popup invisible. Reviewed-by: Thorbjorn
2010-08-16Move more to the event systemJared Adams1-3/+3
Most of Net::InventoryHandler is now done through events. The ActorSpriteManager was also replaced by events. A few odds and ends were taken care of too. Reviewed-by: Bertram
2010-08-02Remove non-GUI references to MiniStatusWindowJared Adams1-6/+3
Reviewed-by: Freeyorp
2010-06-10Merge BeingManager and FloorItemManager as ActorSpriteManagerJared Adams1-4/+5
No need for two different classes to manage ActorSprites. Reviewed-by: Chuck Miller
2010-04-12Added a more trusty path debug view for ManaServ.Bertram1-1/+2
2010-03-12Fix some issues with Being deletionJared Adams1-0/+7
Clear the Viewport's hover being when it gets removed and make sure LocalPlayer's target pointer get's cleared. Reviewed-by: Freeyorp
2010-03-02Remove some unused membersJared Adams1-5/+2
Reviewed-by: Chuck Miller
2010-03-02Revert "Merge WindowContainer into Viewport and remove extra members"Jared Adams1-17/+7
This reverts commit 67e678094b9fddd21fb3c690130e772937ab2746. Conflicts: src/gui/gui.cpp src/gui/viewport.cpp
2010-03-01Merge WindowContainer into Viewport and remove extra membersJared Adams1-7/+17
Reviewed-by: Chuck Miller
2010-03-01Hide BeingPopup when mouseover WindowsJared Adams1-0/+5
Reviewed-by: Thorbjørn Lindeijer Reviewed-by: Chuck Miller
2010-02-28Add some new mousers and simplify related codeidiomatic1-1/+2
Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2010-02-24Move StorageWindow to instancing intead of globalJared Adams1-2/+4
Also make storage under eAthena more flexible. Reviewed-by: Dennis Friis
2010-02-21Handle packet 0x0195, and shows player's party name in a popupChuck Miller1-0/+2
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
2010-02-09Pushed away some 32 hardcoded values.Bertram1-0/+5
2010-02-07Updated Copyright year to 2010!Bertram1-1/+1
Also added the update copyright tool from the Wormux Team. ( And not forgetting credit's due. :P )
2010-01-25Finished Freeyorp's ViewPort bug fixing commit:Bertram1-4/+1
http://gitorious.org/mana/mana/commit/58149dca937410826971f99b72e304121e61abb7 by merging ViewPort::mLocalWalkTime and ::mLocalWalktime into the first one, removing ifdefs, and making sure the setDestination() calls aren't done each ticks by setting the mLocalWalkTime equal to player->mWalkTime while Mouse Left Dragging, I also set it back to -1 when stop walking to avoid the bug where you have to start walking using the keyboard before being able to walk dragging the mouse under eAthena.
2010-01-12Standardize header orderJared Adams1-2/+2
Also remove some extra new lines and fix eAthena's PartyTab define guards.
2010-01-09Add special map mode.Andrei Karas1-2/+2
This mode hide big map objects and show collisions.
2009-10-29Cleaned up the viewport code, when dealing with mouse movement.Bertram1-2/+7
Now, both eAthena and ManaServ clients follow the mouse correctly when it is dragged.
2009-10-24REplace instances of TMW with ManaJared Adams1-1/+1
2009-05-05Fix the context menu for the storage windowJared Adams1-1/+1
2009-04-15Some PopupMenu cleanups/fixes and additions.Tametomo1-0/+6
Signed-off-by: Tametomo <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
2009-04-07Moved basic widgets into the gui/widgets directoryBjørn Lindeijer1-4/+4
In an attempt to make the GUI code a little more structured, basic widgets are now put in gui/widgets. Many includes were also cleaned up.
2009-03-25Merge branch 'eathena/master'Bjørn Lindeijer1-9/+20
Conflicts: A lot of files.
2009-03-22Merged the tmwserv client with the eAthena clientBjørn Lindeijer1-0/+27
This merge involved major changes on both sides, and as such took several weeks. Lots of things are expected to be broken now, however, we now have a single code base to improve and extend, which can be compiled to support either eAthena or tmwserv. In the coming months, the plan is to work towards a client that supports both eAthena and tmwserv, without needing to be recompiled. Conflicts: Everywhere!
2009-03-06Merge branch 'aethyra/master'Bjørn Lindeijer1-6/+18
Conflicts: src/being.cpp src/being.h src/floor_item.cpp src/floor_item.h src/flooritemmanager.cpp src/gui/inventorywindow.cpp src/gui/inventorywindow.h src/gui/itemcontainer.cpp src/gui/popupmenu.cpp src/net/beinghandler.cpp src/npc.cpp
2009-03-05Made some optimizations based on some profiling done by Octalot, as wellIra Rice1-6/+18
as some other optimizations that I could see that cut down on some unneeded redraws, which in turn improved frame rates slightly. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-10Fixed header files, as well as removed the unused buddy list class (notIra Rice1-2/+3
useful since buddy lists are tracked through the player relation interface instead) Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-07Some more include cleanups.Ira Rice1-2/+5
Signed-off-by: Ira Rice <irarice@gmail.com>