Commit graph

490 commits

Author SHA1 Message Date
Aloshi 2862171dab Fix creating default theme when default theme file is not present. 2014-01-10 14:58:03 -06:00
Aloshi 330f20f375 Added Ctrl-R shortcut to reload current gamelist view if in debug mode. 2014-01-10 14:41:23 -06:00
Aloshi b7b2998720 Added center theme option for TextListComponent. 2014-01-10 14:24:07 -06:00
Aloshi 997751f56a Fixed draw order for extra elements. 2014-01-09 17:13:52 -06:00
Aloshi 81a9941645 Added an error if the <systemList> tag is missing.
Made SystemView more themable (added a ThemeExtras component, made theming on pre-existing elements less restrictive).
2014-01-07 16:57:30 -06:00
Aloshi 5a84bc03ea Rewrote the theming documentation. 2014-01-06 13:27:34 -06:00
Aloshi 8d1ac3087e Changed the sound cache to be part of the Sound class instead of
ThemeData.
2014-01-03 10:48:34 -06:00
Aloshi 8a52866ca6 Added support for theme "extras".
Fixed a few crashes (e.g. TextListComponent::applyTheme).
2014-01-03 08:26:39 -06:00
Aloshi e6d0da998b Theme applicators have become the virtual method
GuiComponent::applyTheme(theme, view, element, properties).
Applying fonts works now.
2013-12-31 23:39:22 -06:00
Aloshi 8bc33ce309 Better "common" view.
Added <include> tag.
2013-12-30 21:48:28 -06:00
Aloshi 7f46e50688 First part of the theming system rewrite. 2013-12-30 17:23:34 -06:00
Aloshi 6f442556c0 Refactored SystemListView directly into ViewController.
Made system views match up with their gamelist views.
Pressing "back" on a gamelist view now takes you to the correct system view.
2013-12-24 11:50:26 -06:00
Aloshi b6577e630d Hopefully fixed the "black screen" bug.
At least for input configuration.
2013-12-23 20:22:15 -06:00
Aloshi 120f9a4e7b Fix accidentally making the grid view the default (woops) 2013-12-23 18:31:37 -06:00
Aloshi 4df8fc9af0 Fix bad dimming during sleep (again...) 2013-12-22 19:42:10 -06:00
Aloshi 93f850df75 Maybe fix the Linux compile errors 2013-12-22 16:56:11 -06:00
Aloshi 12ee215873 Refactored duplicate functionality in GridGameList and BasicGameList into
ISimpleGameList.
BasicGameList and DetailedGameList now automatically switch as metadata
changes.
2013-12-22 16:16:01 -06:00
N1xx1 b8d44be6c2 Segmentation Fault for pointer being null. 2013-12-22 14:08:20 +01:00
N1xx1 05948e9302 Segmentation Fault for pointer being null. 2013-12-22 14:03:05 +01:00
Aloshi 4b6f8d9007 Move menu open code to ViewController so you can open it in the system
select
2013-12-20 15:47:21 -06:00
Aloshi bce46cb925 Fixed sleep mode dimming not working 2013-12-20 15:44:12 -06:00
Aloshi bec3a2599a Only run input code when input is pressed, not released. 2013-12-20 15:09:35 -06:00
Aloshi 1398785468 Lock input during launch animation. 2013-12-13 14:38:34 -06:00
Aloshi 7e9b20fac5 Added a fade in from black for ViewController.
Added LambdaAnimation (which lets you use a lambda for the apply method).
Useful for simple one-off animations.
Added animation slots - only one animation can play per slot.  This way
you can have two animations run at the same time.
2013-12-12 21:17:59 -06:00
Aloshi 67818d5727 Don't create gamelist folders even if their parent directory is valid. 2013-12-12 16:08:52 -06:00
Aloshi 0423dc03dd Added folder metadata loading/saving.
Rewrote a lot of the gamelist reading/saving code, let me know if I broke
it.
2013-12-12 16:04:15 -06:00
Aloshi ccea2a7e04 Removed some old effects code from Window.
Added a simple "LOADING" screen when ES starts up.
ViewController now preloads GameListViews so there's no lag when browsing
to a system for the first time.
2013-12-12 13:48:29 -06:00
Aloshi 3fb06d1833 Better positioning for system images. 2013-12-12 13:17:03 -06:00
Aloshi 7152ca6246 First version of the system select menu. 2013-12-10 21:23:47 -06:00
Aloshi abb568aa6e Don't scrape systems without a platform ID set by default. 2013-12-10 13:07:50 -06:00
Aloshi aad80b73fd Made ViewController's launch animation to add current view's position to
center point.
Fixed clipping with a scaled camera matrix.
2013-12-08 19:22:21 -06:00
Aloshi 5aeb2bc87f Fixed a bug with empty font paths not resolving correctly. 2013-12-08 20:00:53 +00:00
Aloshi 886bf7b00b Fixed ImageGridComponent 2013-12-08 19:33:43 +00:00
Aloshi a13ed11ead Added a simple Animation system.
Launch/return effect reimplemented.
ViewController's scrolling camera reimplemented as an Animation.
2013-12-08 11:35:43 -06:00
Aloshi 9875a59549 Added GridGameListView.
Currently no way to enable it and no way to switch systems with it.
2013-11-30 19:04:46 -06:00
Aloshi 25a4c8a2e5 Added fastSelectBackgroundImage and menuCloseSound to ThemeData, implemented some missing sounds. 2013-11-28 13:52:21 -06:00
Aloshi 0cfa38fcf9 Mostly reimplemented the fast select GUI.
Still not sure how I want to store sort state. I'd kind of like to move
sorting out of the FileData tree altogether and into the display classes.
2013-11-25 14:49:02 -06:00
Aloshi 94ca712759 Redid GuiMenu. 2013-11-23 14:04:11 -06:00
Aloshi cad914ab01 Added verticalDividerImage to themes/detailedgamelistview. 2013-11-21 19:52:09 -06:00
Aloshi 4b4fff39ef Optimized the hell out of TextListComponent (and TextComponent a bit) 2013-11-21 16:47:35 -06:00
Aloshi 87137df51e Added infoBackgroundImage 2013-11-21 16:47:35 -06:00
Aloshi a7359a2d08 Themes mostly stable, documentation updated 2013-11-21 16:47:26 -06:00
Aloshi 8bfde96966 Added missing sorts. 2013-11-05 20:31:52 -06:00
Aloshi 3a3471cfe8 Combined FolderData and GameData into one class, FileData.
You don't need to dynamic_cast everywhere to check things anymore.
Folders can have metadata now (currently not set up).
Metadata is now a public member variable instead of a function that
returns a pointer to make actually using const possible.
2013-11-05 19:41:49 -06:00
Aloshi 5c65747551 Moved metadata type declarations more behind-the-scenes.
The original plan was to allow each system to have customizable lists of
metadata, which made constructing metadata really painful (the declaration
list isn't stored on the metadata instance because that's pretty wasteful
for 2,000 games).  Now they're constructed by passing a MetaDataListType
enum in the constructor.
Declaration lists are now managed by const globals passed by reference
through getMDDByType(MetaDataListType).
2013-11-03 19:54:13 -06:00
Aloshi 626a2692e5 Removed an unnecessary path.string() during folder population. 2013-10-27 11:18:38 -05:00
Aloshi fb55b1cd91 Limit OptionListComponent to 5 entries on screen.
Can now hold up/down to scroll OptionListComponent.
2013-10-26 15:57:46 -05:00
Aloshi 68841aa654 SystemData now stores extension lists as a vector internally.
Don't write gamelist.xml changes if IGNOREGAMELIST is true.
2013-10-26 14:08:53 -05:00
Aloshi 20c367daa7 Fix DateTimeComponent not consuming input when leaving edit mode. 2013-10-24 11:48:29 -05:00
Aloshi a666415302 I forgot how to #ifdef apparently 2013-10-24 11:47:09 -05:00
Aloshi 81e2f2d783 Specify for SDL to use OpenGL ES 1.x 2013-10-24 16:43:54 +00:00
Aloshi afdd5f2862 Fixed building on Linux. 2013-10-18 14:53:14 -05:00
Aloshi a554fea973 Fixed memory leak with FolderData::removeFileRecursive.
Made "DELETE" actually work in GuiMetaDataEd.
"DELETE" option also now asks if you're sure.
GuiMetaDataEd can be closed with the "b" button now.
GuiGameScraper now tries to put the cursor on the first game if there is
one when a search completes.
2013-10-16 18:46:05 -05:00
Aloshi 9867e902de Fixed a Settings loading bug that would cause values from other types to
get loaded into a map.
Added a "Released:" label for release date on GuiGameList.
2013-10-16 18:20:21 -05:00
Aloshi 36ecb83d8d Added color/font settings for DateTimeComponent.
Added "release date" entry to GuiGameList.
2013-10-16 18:11:43 -05:00
Aloshi 89fca2b875 Create folders when writing a new gamelist.xml if necessary. 2013-10-16 17:49:43 -05:00
Aloshi bff7920f14 Added "Scrape Ratings" option to settings menu.
Finally changed the stupid "SAVE" label hack to an actual ButtonComponent.
2013-10-16 17:14:50 -05:00
Aloshi 56b04aec4c updateGamelist now creates a gamelist.xml if one does not exist.
Added GuiMsgBoxOk and GuiMsgBoxYesNo, basic message boxes.
Added rating scraping to TheGamesDB scraper.
Added warning if platform ID is not set for a system the user has selected
to scrape.
2013-10-16 17:05:02 -05:00
Aloshi 12dd8b028d Disable sleep mode while scraping.
Fix to actually update metadata.
Write changes to gamelist.xml after each game is done.
2013-10-13 16:40:36 -05:00
Aloshi 69852af751 Multi-game scraper seems to be functional! 2013-10-13 14:07:48 -05:00
Aloshi d419bb368a Added GuiMsgBoxOk. 2013-10-12 15:08:27 -05:00
Aloshi 9b1ba71fa3 Reworked OptionListComponent to push a second component when editing the
list to fix the "draw order" problem.
2013-10-12 14:03:32 -05:00
Aloshi ff85f971b2 More work on multi-game scraping UI. 2013-10-10 19:55:57 -05:00
Aloshi f3695a7545 Started work on "scrape multiple games" UI. 2013-10-10 16:49:59 -05:00
Aloshi e247326b51 Better opacity support for TextComponent 2013-10-10 16:14:33 -05:00
Aloshi 2aad9cbdeb Fix building on Linux 2013-10-10 15:55:54 -05:00
Aloshi dca5467f7b Boost.Asio -> libcurl to hopefully fix the Linux bugs. 2013-10-10 13:11:01 -05:00
Aloshi 4e2b57c001 Image downloading is now async for GuiMetaDataEd.
GamesDBScraper now uses system->getPlatformId() if set.
2013-10-09 19:50:42 -05:00
Aloshi 0fa4cf527b Fixed SDL2 warnings on Linux (-W-no-attributes).
Fixed #include for old Font.h location in Renderer_init_sdlgl.cpp.
2013-10-08 16:31:29 -05:00
Aloshi 5d6192613c You can now choose a scraper in the Settings menu. 2013-10-05 21:56:06 -05:00
Aloshi 63d8908061 Synchronous scraper image downloading.
Code is there for async, just not hooked up to the UI yet.
2013-10-05 15:28:59 -05:00
Aloshi a6dbaa2dea Moved Font.h/.cpp to the "resources" directory (since it's a Reloadable). 2013-10-04 18:24:41 -05:00
Aloshi b510aa8cd4 Moved ResourceManager to be a singleton.
The character count of the average Font::get decreased by 310%...
2013-10-04 18:10:39 -05:00
Aloshi a4185176da OptionListComponent 2013-10-03 16:50:40 -05:00
Aloshi 6956211ff0 Started on OptionListComponent. 2013-10-01 16:52:30 -05:00
Aloshi e7135d869c Updated README.md and --help command. 2013-09-30 14:34:22 -05:00
Aloshi bbc387ce8a Initial command-line scraper. 2013-09-28 21:54:15 -05:00
Aloshi 838b8ee422 DateTimeComponent.
Can display dates, date + times, and an english description of a time
relative to now ("2 secs ago", "1 day ago", etc.).
Supports editing dates (including day-of-month validation).
This took a lot longer than I thought.
2013-09-28 17:35:38 -05:00
Aloshi 7db0100edd Use boost::posix_time::ptime internally for times and dates. 2013-09-28 12:51:16 -05:00
Aloshi 7bd34ec62a Added "isStatistic" property to MDDs.
If true, ignore scraper values for this value.
This keeps scraping from overwriting playcount and lastplaytime.
2013-09-28 11:38:31 -05:00
Aloshi cfd63c74db Refactored GameData to be completely independent of SystemData. 2013-09-28 11:18:44 -05:00
Aloshi c5d772657b Added PlatformId to SystemData. 2013-09-28 11:10:06 -05:00
Aloshi 10ed603f27 Unified renderer initialization on RPi and other platforms! Woo, SDL2! 2013-09-28 01:17:41 +00:00
Aloshi 71f0dbf7e5 Revert "Merge pull request #134 from elpendor/unstable"
This reverts commit 896e0f460b, reversing
changes made to 56b5127200.
2013-09-25 14:38:53 -05:00
Juan Pablo 8c768e057d Replaced boost's regex with std's regex 2013-09-25 01:07:11 -03:00
Aloshi 56b5127200 Fix HttpReq destructor freeze on Linux 2013-09-24 16:35:48 -05:00
Aloshi 69ef41a49f Add boost-regex to required libs.
Added PlatformId.h.
2013-09-24 16:27:20 -05:00
Aloshi 153aee5040 Use RatingComponent in the metadata editor. 2013-09-24 14:44:18 -05:00
Aloshi fb8bfc9486 Added "releasedate" to the MetaDataDecl list. 2013-09-24 13:41:19 -05:00
Aloshi b2f615347e IScraper renamed to Scraper.
Scraper now contains a partial implementation since almost all scrapers
will follow the pattern of create HttpReq -> create and wait for
AsyncReqComponent -> parse HttpReq contents.
2013-09-24 13:06:13 -05:00
Juan Pablo a8427d33a6 Partial implementation for The Archive scraper. 2013-09-24 04:26:33 -03:00
Juan Pablo 2999a8068a Properly encoded parameters. Otherwise the query gets truncated. 2013-09-24 04:02:14 -03:00
Juan Pablo 3e1ecb4a84 Added a method to clean filenames before scraping 2013-09-24 02:20:53 -03:00
Juan Pablo 57eb9849ff Renamed/moved maximum scraper results constant to be used in scraper 2013-09-24 01:58:59 -03:00
Aloshi 51e797bbd0 RatingComponent mostly working. 2013-09-23 21:02:41 -05:00
Aloshi 964d5afc56 Work on RatingComponent 2013-09-23 14:58:47 -05:00
Aloshi e65d94fe54 Initialize std::functions with nullptr instead of NULL. 2013-09-22 19:40:51 -05:00
Aloshi 8a0eff8ef6 Fix wrapping text that ends with a newline. 2013-09-20 22:06:50 -05:00
Aloshi a3a4636fd5 Search for box hooked up.
Display thumbnails for results.
Still need to resolve boxart.
2013-09-20 18:55:05 -05:00
Aloshi 9ce511cc71 Partial implementation for TheGamesDB scraper.
Still needs a way to display error messages.
2013-09-20 14:55:44 -05:00
Aloshi 3105073e50 Work on scraper UI integration (about there, just need a real scraper
now).
2013-09-19 18:41:14 -05:00
Aloshi 5dfaeeabb4 More infastructure for scrapers (starting to hook into GuiMetaDataEd). 2013-09-17 16:50:49 -05:00
Aloshi fe991e1b86 Skeleton for scrapers. 2013-09-16 14:53:24 -05:00
Aloshi e823592660 Added AsyncReqComponent for easy asynchronous, cancelable HTTP requests with a nice loading icon. 2013-09-15 14:11:39 -05:00
Aloshi c807c98b4a Added HttpReq class based on Boost.Asio. 2013-09-15 12:56:47 -05:00
Aloshi 8e12ff9506 Completely removed GuiBox. 2013-09-14 12:51:13 -05:00
Aloshi d7a6cae4ce Moved the fast select GUI to nine patches.
Luckily, no one ever used it anyway.
2013-09-14 12:32:21 -05:00
Aloshi b0d156d6bd Move GuiSettingsMenu to use NinePatch. 2013-09-14 11:14:21 -05:00
Aloshi 74e8c40d67 Moved TextEditComponent to use NinePatchComponent.
Enable key repeat while text editing.
2013-09-14 10:58:34 -05:00
Aloshi 861a61cb3a Set *all* the vertex data to zero for newlines. 2013-09-13 14:01:39 -05:00
Aloshi 376d746686 Fix newlines not initializing font vertices. 2013-09-12 16:56:42 -05:00
Aloshi 8bd5966f87 Added single-line edit + view mode to TextEditComponent.
Used automatically if component height <= font height.
2013-09-12 16:35:44 -05:00
Aloshi f9571b9389 TextEditComponent is now fixed-height and supports cursor-based editing.
Fixed a text-wrapping bug with consecutive newlines in Font::wrapText.
2013-09-07 17:46:26 -05:00
Aloshi 044619a2d3 Add ALSA package to dependency list.
Change name of example config from "NES" to "nes".
2013-08-28 14:39:29 -05:00
Aloshi 268b918c46 Changed GuiGameEd to GuiMetaDataEd.
Now accepts std::functions for save/delete.
2013-08-23 17:15:00 -05:00
Aloshi e55e0f3da7 Added FolderData::removeFileRecursive(FileData* f).
Fixed ButtonComponent crashing when pressed with no press func set.
2013-08-23 12:21:22 -05:00
Aloshi f2689f49a6 Merge branch 'master' into unstable 2013-08-23 11:28:45 -05:00
Aloshi b76413137e Hopefully fix trying to showing too many entries in TextListComponent. 2013-08-23 11:21:00 -05:00
Aloshi f89a418b5c Moving from GuiBox to simple mobile-style Nine Patches. 2013-08-23 09:53:48 -05:00
Aloshi 77fb840a4b Added a basic ButtonComponent class. 2013-08-22 15:29:50 -05:00
Aloshi df897c0b5a Finally implemented TextCaches for TextComponent and TextEditComponent.
Huge boost in performance with rendering game descriptions.
(It's About Damn Time (TM))
2013-08-21 20:08:36 -05:00
Aloshi 11f774e019 Cache the result of Font::getDefaultPath().
(According to Very Sleepy, this was taking up 39% of render time :))
2013-08-21 16:18:20 -05:00
Aloshi bde5b6888f Properly fill in display_width and display_height for 0 now. 2013-08-21 15:59:11 -05:00
Aloshi bed9c1fbb5 TextEditComponents now resize vertically as needed. 2013-08-21 14:49:33 -05:00
Aloshi 7cb3cc09ee Fixed a long-standing invalid OpenGL disable in drawRect.
Fixed a really strange bug in ComponentList vertical centering
that was causing TextEditComponent to render the top GuiBox border
incorrectly with odd sizes.
2013-08-21 12:40:39 -05:00
Aloshi 7c2e7f9069 Basic text editing support. 2013-08-19 10:36:48 -05:00
Aloshi 1418f85ba7 Fixed some subtle bugs with SDL2 joystick changes.
Removed platform-specific input device list polling.
Now we use SDL2's handy SDL_JOYDEVICEADDED event.
2013-08-19 09:05:30 -05:00
Aloshi 5b1cd8fbf8 Renderer compiles on the Pi again.
For some reason SDL2 won't initialize on the terminal though.
Works fine under X, though that isn't an acceptable solution.
2013-08-18 19:31:35 +00:00
Aloshi 09726348b3 Moved to SDL2.
Renderer on the Pi doesn't work at the moment.
2013-08-18 12:17:52 -05:00
Aloshi b5fe2cc8fc Began work on the metadata editor. 2013-08-18 09:16:11 -05:00
Aloshi 421797929d New generic metadata backend. 2013-08-14 07:16:49 -05:00
Aloshi dbcb9aed37 Moved es_systems.cfg to use XML.
Updated README.md to reflect new format.
"descname" has been renamed to "fullname".
2013-08-13 01:56:10 -05:00
Aloshi c7a150046a Re-added the old fix for the "automatically starting emulator" bug that
got removed during refactoring.
2013-08-08 19:15:50 -05:00
Aloshi 60adf05077 Use res2h-generated files for embedded resources.
You do not need res2h to build ES, only if you wish to modify resource
files.
Added a simple corner.png and bar.png for a border in the settings menu.
Added ImageComponent::setColorShift(unsigned int color) to change the
OpenGL color array.
2013-08-07 17:40:27 -05:00
Aloshi 4f416d13a0 Add a "disable sounds" option to the settings menu. 2013-08-07 00:41:55 -05:00
Aloshi eb2481ca19 Remove debug text. 2013-08-06 23:46:43 -05:00
Aloshi 92adc41cd6 Fixed really sneaky texture deallocation bug.
Textures allocated with no path (e.g. the transition image which uses
copyScreen()) weren't being deinitialized with the renderer.  Which meant
something else could take the old texture ID, and when the no-path texture
got destroyed, it would take a texture along with it.
2013-08-06 23:35:06 -05:00
Aloshi 55b71fab49 Fixed ScrollableContainer clipping.
Changed game select effect to interpolate more interestingly.
2013-08-06 22:46:25 -05:00
Aloshi 541d9a62d1 Fix vertical and horizontal GuiBox images being flipped. 2013-08-06 19:03:40 -05:00
Aloshi bd940c56b4 Added new game launch/return effect. 2013-08-06 08:15:20 -05:00
Aloshi 04ffc7447c Fix mis-declared render methods for input setup GUIs. 2013-07-26 18:28:51 -05:00
Aloshi a82684ec1a Remove GuiComponent::init, deinit, and getGlobalPosition. 2013-07-23 06:15:10 -05:00
Aloshi 8d78052808 Finally use parenting in GuiGameList.
Added setCentered(bool) to TextComponent.
Fixed Font::sizeWrappedText to return an accurate width.
2013-07-23 01:27:28 -05:00
Aloshi e2c30a568d Added a Window::normalizeNextUpdate() method.
If you know something is about to cause the framerate to tank (e.g. theme
loading), you can tell the next update to be, at maximum, the average of
the previous five seconds of frames.
The framerate drawing code has also been moved to Window.
2013-07-17 01:47:02 -05:00
Aloshi 7698c8fe74 Increment version number. 2013-07-17 00:56:10 -05:00
Aloshi 9fe6ca7506 Fix projection matrix on the Raspberry Pi. 2013-07-17 00:50:38 -05:00
Aloshi 28f7a9c6e1 Fix Settings menu and associated components. 2013-07-16 23:18:30 -05:00
Aloshi 8bd87e162c Stop including Eigen directly in the project.
Update README.md for information on installing Eigen.
2013-07-16 22:41:39 -05:00
Aloshi 19c585ec22 Fix font texture filter (to be GL_NEAREST). 2013-07-15 22:57:50 -05:00
Aloshi 542d41c682 Move from homegrown Vector2 class to Eigen.
Pass a matrix (Eigen::Affine3f) in GuiComponent::render instead of doing
glTranslate behind the scenes.
2013-07-10 06:29:43 -05:00