Commit Graph

308 Commits

Author SHA1 Message Date
3bdcf02be0 Handle modifier keys differently to avoid Apple flagging us as wishing to monitor input from other applications
Fixes #291
2023-01-12 21:43:45 -05:00
e212e99794 Fix buffer overrun if apply/removeShift is called with an unknown character 2023-01-12 20:24:35 -05:00
729ccfe765 Fix missing include 2023-01-07 12:01:10 -05:00
e3d6a4748e Dialog XML definitions are now loaded thru the resource manager 2023-01-07 11:59:42 -05:00
c3dd886783 Fix LED text colour and correct width attribute validation 2023-01-07 01:23:07 -05:00
c4d7fc6b99 Make dialogs iterable 2023-01-07 01:21:42 -05:00
0714004f1c Fix a few compiler warnings 2023-01-06 22:02:05 -05:00
ALONSO Laurent
ca74661801 button.cpp: try to make tiny buttons work... 2023-01-06 20:49:08 -05:00
ALONSO Laurent
f2584f4133 try to remove some "flickering" by using setActive(false)/setActive() and adding
a glFlush...
2023-01-06 13:46:21 -05:00
b03a200f8a Labelled buttons should only require a width if they actually HAVE a label 2023-01-06 02:59:21 -05:00
9b8c35489b Fix key descriptions using alt being rendered as just # 2023-01-06 02:44:28 -05:00
e7ae84ee2a Fix large string dialogs not wrapping text and expanding to crazy widths 2023-01-04 20:52:11 -05:00
fea9cfb0c8 call redraw_everything() when cDialogs move 2023-01-04 15:27:33 -07:00
5b2561d034 Disable header maps in Xcode 12 2022-07-12 20:35:41 -04:00
f5be1d9706 Fix missing override annotations 2022-07-05 09:28:41 -04:00
8d31c27d11 Fix unused element and unhandled switch case warnings 2022-07-05 09:19:32 -04:00
ee5e7fd48c Various fixes to make the project build in Xcode 12 on Catalina
This now requires Boost to be installed by MacPorts. However, we could add the standard Homebrew path to the include path as well to support both.

This also requires SFML and its dependencies to be installed in /Library/Frameworks; it's unclear whether this is reasonable.

Code signing is completely disabled, and Zlib is now loaded as a tbd instead of a dylib. This will probably break for some older computers, but hopefully they can just use the Xcode 4 project instead.

Boost is forcing -mt suffixes on all its libraries. Whatever. We'll just roll with that.
This makes the script work both with and without the suffixes.

Using parentheses instead of braces silences the stupid narrowing warning, so yay.
2022-07-05 00:17:52 -04:00
x-qq
55a105a0f6 make the game buildable on linux (#283)
- Scons -> python3
- include issues
2022-03-13 15:38:22 -04:00
af8f30aaf2 Fix duplicate function definitions 2022-03-13 11:14:08 -04:00
f14c99f14b Split out cContainer, cLed, and cLedGroup into their own files 2020-12-21 17:16:15 -05:00
81c2a084e3 Allow automatically calculating both the width and height of a text label
This fixes welcome dialog links triggering when you hit OK in the right place
2020-12-19 18:10:25 -05:00
27f687806f Implement automatic height calculation for text labels 2020-12-19 17:36:03 -05:00
d7ddaa7cd8 Fix broken colour= in DialogXML and add special link colour 2020-02-26 01:47:32 -05:00
7f12c6eea4 Support underlined text in DialogXML 2020-02-26 01:20:11 -05:00
49d88c76e2 Add page definition facility to the DialogXML <stack> widget
- New <page> element in <stack>
- Visibility of elements is now remembered when switching pages
- Unstoring a <pict> on a stack page no longer resets default values
- Documentation updated for new features
2020-02-25 21:05:59 -05:00
f0f789913f parseChildControl now returns the control's ID if successful 2020-02-24 00:13:37 -05:00
8f81a3504d Deduplicate child element parsing in DialogXML 2020-02-24 00:07:45 -05:00
c8549ca680 DialogXML: Support <key> in <text> with optional ref= 2020-02-23 23:02:16 -05:00
5b5bda1435 Fix DialogXML crash when parsing <stack> 2020-02-23 22:21:03 -05:00
c65bac2a8f Implement relative positioning system for DialogXML
This allows widgets to be positioned relative to other widgets.

Two dialogs have been converted to use relative positioning.

Also fix some issues with calculating the dialog rect.
2020-02-23 22:00:01 -05:00
9f60f7e378 Implement <key> tag in DialogXML which substitutes a buttons key shortcut into its label 2020-02-21 22:25:48 -05:00
12bde373b1 Refactor dialog parsing to reduce code duplication
- Refactor dialog format parameter management to use a single protected control function
- Format parameters "frame" and "frame style" merged
- Colour is now a first-class format parameter (though it still has a separate setter)
2020-02-20 23:41:40 -05:00
e7a264bb90 Remove non-empty exception specifications, which have been deprecated for nearly ten years now 2020-02-10 22:36:36 -05:00
53925c9d3c For now, revert to the deprecated SFML scroll event 2020-02-09 19:56:15 -05:00
760a172526 Some style tweaks 2020-02-09 18:24:09 -05:00
deac7b0cb6 Merge pull request #251 from x-qq/fix_scrollbar_segfaults
fix for scrollbar segfaults

* fixes #206
* fixes broken mousewheel scrolling of the scenedit palette
* removed boost threads dependency
* added foundation for further refactoring of the drawing and event handling code: interfaces and drawable manager with layering
* removed a bunch of unneeded redraw calls
* removed some repeated recalculation of effectively constant values (boe.actions)
* removed recalculation of effectively constant scrollbar and button positions (boe.graphics)

Closes #251
2020-02-09 15:55:51 -05:00
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