Commit Graph

322 Commits

Author SHA1 Message Date
335fb87e51 Store custom graphics classifications as symbols instead of integers 2020-02-09 12:10:52 -05:00
0bf41cb172 Centre dialogs above their parent window 2020-02-05 22:46:17 -05:00
f9f4d5671c Factor out the framerate limiter into a class
Patch from @x-qq
2020-02-01 21:03:56 -05:00
d530abe00b Make use of the new resource manager's purgeable flag 2020-01-26 16:14:39 -05:00
14e2597108 Expose the shared pointer instead of the raw pointer in the resource manager and rewrite the custom sheets list to use a vector instead of manual memory management
In particular, this should fix a segmentation fault in the sound system caused by the resource manager pulling a resource that's in use.
2020-01-26 15:10:57 -05:00
542c037342 Integrate a new resource manager which should have better performance 2020-01-26 11:53:19 -05:00
1fcbd8e922 Rearrange the dialog event loop a little
This patch is contributed by @x-qq
and should improve CPU usage on Linux.
2020-01-20 19:47:09 -05:00
6f96222c37 Remove the 30-item limit in shops 2019-12-02 01:16:34 -05:00
9073063423 Merge branch 'merge_linux' of https://github.com/murlock/cboe 2018-03-03 17:52:59 -05:00
8759aad90a Move Xcode project to a separate tree parallel to src 2018-02-19 02:11:29 -05:00
Michael Bonfils
d940f2c39d Merge branch 'linux' into merge_linux 2018-02-08 20:36:46 +01:00
39f11dddb5 Fix scons+cl build 2017-09-16 13:12:36 -04:00
beadb49217 Fix scons build
Tested on Mac only, but probably also works on Windows/Linux
2017-09-04 20:45:45 -04:00
9c69e006d8 Refactor rendering to use an SFML view for placing the main UI within the overall interface 2017-09-04 14:36:55 -04:00
7e7f3d2b81 Merge mac into windows 2017-08-27 23:37:37 -04:00
a31797582a Some fixups, mainly to support MinGW builds 2017-08-27 23:29:00 -04:00
c2ce2a2cd1 Split up the graphtool files 2017-04-14 15:43:07 -04:00
82abdab695 Major code reorganization
This commit only updates the XCode project for the changes.
A later commit each will update it for scons and MSVC.

A few actual changes are mixed in:
- Add a prefix header for a handful of common definitions
- Moved current_cursor into the Cursor class as a static member
- Removed the make_cursor_sword and make_cursor_watch functions
- Include tests in the All target
- Remove redundant -l flags for Common and Common-Party (since they're included in the Link phases anyway)
2017-04-14 00:24:29 -04:00
4f91f6a679 Make undo system a little safer, and improve docs 2017-04-11 15:00:22 -04:00
683ab805ec Initial framework for scenario editor undo/redo
In addition to the framework, this enables undo/redo of one action - adding a new town
2017-02-12 18:27:01 -05:00
ed0c41c3ce Fix misleading error message for validating unsigned fields 2017-02-07 20:08:53 -05:00
73cfe2bd24 Merge branch 'master' into linux 2017-01-30 14:02:41 -05:00
37d2e5f06b Additional minor fixes to Linux build 2017-01-26 17:18:01 -05:00
ultra
ffa2d0e950 Hacked scons scripts and got it building on Ubuntu with clang.
Minor changes to support building on recent clang
Addition of some headers for non-compiling files
2017-01-26 17:16:38 -05:00
15637c763b Fix showing a fixed graphic for invisible monsters in Scry Monster
Also fix dialogs never showing a frame around blank graphics
2017-01-22 11:10:40 -05:00
Ben Scott
ddfe50298a added override annotations to various UI functions in src/dialogxml/ 2015-12-22 02:22:15 -05:00
168e4c5e52 Fix missing default button in some custom choice dialogs 2015-10-06 22:17:28 -04:00
d19880a463 Stop storing preferences and legacy flags in the saved game
- Nuke global preference variables (they're now fetched with get_xxx_pref whenever needed)
- Nuke magic SDFs that store preferences and other info
- The only preferences now stored in the saved game are those related to difficulty
- play_sound no longer takes an option repeat parameter, but instead takes a delay which will be used if sounds are disabled
- SDF array increased to 350x50
- When saving a legacy scenario, a dialog is shown to remind you to update and to allow you to clear the legacy flag
2015-10-06 22:17:25 -04:00
7f00d0c775 Change image resource type from sf::Image to sf::Texture
This includes an added optimization to the resource manager - it now uses unordered (hash) maps instead of ordered (tree) maps to keep track of loaded resources and paths, for the average constant lookup time.
2015-10-05 23:57:42 -04:00
1b95f06207 Split dlogutil.hpp into separate headers for each dialog 2015-10-04 22:45:01 -04:00
177a38d171 Make list of basic buttons a source file instead of a header. 2015-10-04 21:15:28 -04:00
cae5fc3140 Rearrange the basic_buttons array to avoid the extra indirection step
- All buttons from the array that were strictly related to UI have been removed.
- Some new buttons have been added. The duplicate Leave button has been removed.
2015-10-04 21:11:16 -04:00
28a513a4a0 Fix the red push button when used in dialogs 2015-10-04 00:36:16 -04:00
8afd3825b0 Refactor the dialog engine's event handling to make it easier to add new events in the future
- Focus event split into focus and defocus
- Scroll event added but not yet properly implemented

Also:
- Remove the useless (and ignored) clickable attributes from the schema
- Pave the way for controls other than fields to be able to recieve keyboard focus
2015-10-03 19:49:33 -04:00
8b90fa614b Make stack control a real container instead of a controller
- Also add framed/outlined attributes to it and to LED groups
2015-10-03 12:30:26 -04:00
b176918dda DialogXML: Make the frame style format parameter a first-class citizen
- It's now exposed in the schema with a new attribute, outline, on all elements that accept framed
- It now has four possible values: solid, outset, inset, double. Dashed or dotted may be added later; they're a lot harder.
- Second make scenario dialog uses a custom frame style
2015-10-03 11:13:33 -04:00
967f24a83b Fix dialog frames not using the inset style
The framestyle format parameter now does nothing. This is temporary.
2015-10-03 10:28:42 -04:00
8b5396c980 Remove all def-key='enter' in favour of defbtn attribute
In addition, the default button is finally properly outlined when specified with the defbtn attribute.
(It would also be outlined if specified with def-key='enter'.)
The following preset buttons (available to special nodes) now respond to the enter key:
- "Leave", "Done", "OK"
2015-10-03 03:40:48 -04:00
03bc3d05e6 Remove key-mod attribute from dialog schema
- Modifiers are now given in the def-key attribute, as originally intended
- Dialogs that have a help button now assign F1 to that button (replacing shift+/ in some cases)
- F1 also brings up help in the main game (in addition to shift+/)
2015-10-03 00:53:32 -04:00
edaf3baa2d Formatting 2015-10-03 00:35:33 -04:00
2645818aeb Fix two minor graphical glitches in alternate scrollbar style 2015-10-03 00:02:26 -04:00
b39ac35298 New alternate scrollbar style, used by default in dialogs 2015-10-02 23:31:01 -04:00
4aea031914 Add linked element to scrollbars
The linked element will be updated dynamically as the scrollbar's value changes.
Also: Added long-missing hasControl() method to cDialog
2015-10-02 22:59:04 -04:00
f7daba4ead Scrollbars are finally a first-class citizen in the dialog engine.
- Add <slider> tag to put an unbound scrollbar in the dialog
- Add support for horizontal scrollbars
2015-10-02 21:44:17 -04:00
5f7654046d Update About Blades of Exile dialog
- Some text in this update contributed by ADoS

Also:
- Make scroll panes scroll 5 pixels per click instead of 1
- Make scroll pane page size depend on the height
2015-10-02 18:46:21 -04:00
a455941d92 New scroll pane control in the dialog engine
Also:
- Use a scroll pane for the credits in the about dialog, so that new credits can be added without altering other elements
- Use a scroll pane for the list of sections to be deleted in the resize outdoors dialog
- New cContainer superclass for controls that contain other controls
- Scrollbars consider their maximum as part of their state
2015-10-02 17:03:25 -04:00
22e63d898f Refactor dialog parsing so each control knows how to parse itself 2015-10-02 15:20:32 -04:00
66f84ef396 Fix several little issues with cursors
- Sometimes they didn't reappear when the program was reactivated
- Watch is now used in more places
2015-09-24 19:12:12 -04:00
a778d25cdc Fix crash in dialogs that start with no editable fields but gain them later
Crash occurred if you try to edit a field in such dialogs
2015-09-15 00:05:34 -04:00
780b413d0c Mass replace NULL --> nullptr
(Except one instance was instead replaced with nil)
2015-09-13 10:50:21 -04:00