premake5.lua: replaced includedirs with sysincludedirs that should work better in some cases.

Reformated README.md.
Docs improvements.
This commit is contained in:
Martín Lucas Golini
2020-01-18 05:37:52 -03:00
parent e686320e1f
commit 89df736630
6 changed files with 356 additions and 316 deletions

567
README.md
View File

@@ -1,243 +1,234 @@
eepp - Entropia Engine++
========================
# eepp - Entropia Engine++
**eepp** is an open source cross-platform game and application development
framework heavily focused on the development of rich graphical user interfaces.
**eepp provides:**
[![Linux status](https://img.shields.io/github/workflow/status/SpartanJ/eepp/Linux/develop?label=Linux)](https://github.com/SpartanJ/eepp/actions?query=workflow%3ALinux)
[![Windows status](https://img.shields.io/github/workflow/status/SpartanJ/eepp/Windows/develop?label=Windows)](https://github.com/SpartanJ/eepp/actions?query=workflow%3AWindows)
[![macOS status](https://img.shields.io/github/workflow/status/SpartanJ/eepp/macOS/develop?label=macOS)](https://github.com/SpartanJ/eepp/actions?query=workflow%3AmacOS)
## Features
Cross platform functionality
----------------------------
### Cross platform functionality
* Official support for Linux, Windows, Mac OS X, iOS and Android.
* Official support for Linux, Windows, Mac OS X, iOS and Android.
* Exports to HTML5 using emscripten with some limitations.
* Exports to HTML5 using emscripten with some limitations.
* It should work on FreeBSD, Solaris and Haiku.
* It should work on FreeBSD and Haiku.
### UI Module
Graphics Module
---------------
* Base widgets to manage the app/game objects as nodes, with all basic input interaction events ( clicks, keypress, mouser over, focus, etc ).
* Renderers for OpenGL 2 ( fixed-pipeline ), OpenGL 3 ( programmable-pipeline ), OpenGL ES 2, OpenGL ES 1, and OpenGL Core Profile.
* Fully featured UI system, animation support, scaling, rotating, clipping, events, messages, etc.
* Batch Renderer ( all the rendering is automatically batched by the engine ).
* Themes and skins/decorations support.
* Full fonts support. True Type, BMFont and XNA Fonts.
* Pixel density support ( scaling of UI elements defined by the pixel density of the screen ).
* Frame Buffer support.
* All the basic widgets are implemented ( button, textbox, combobox, inputbox, menu, listbox, scrollbars, etc ).
* Shaders support ( with automatic fixed pipeline shaders to programmable conversor ).
* Draw invalidation support. It can be used to make real apps, with low resource usage ( only redraws when is needed ).
* Vertex Buffer Object support.
* Layout system similar to Android layouts ( LinearLayout, RelativeLayout, GridLayout ).
* Particle System.
* Advanced features as text selection, copy and paste, and key bindings.
* Extendable Console.
* Load and style layouts from XMLs
* Animated Sprites.
* Styling with Cascading Style Sheets
* Texture Atlas support ( automatic creation and update of the texture atlas, editor included ).
### Graphics Module
* Clipping Masks ( stencil, scissors, planes )
* Renderers for OpenGL 2 ( fixed-pipeline ), OpenGL 3 ( programmable-pipeline ), OpenGL ES 2, OpenGL ES 1, and OpenGL Core Profile.
* Nine Patch resizable bitmaps support.
* Batch Renderer ( all the rendering is automatically batched by the engine ).
* Primitives drawables.
* Fonts support ( TrueType, BMFont and XNA Fonts ).
* Many image formats supported ( included rasterized SVG ), compressed textures support ( direct upload to the GPU when possible ).
* Frame Buffer support.
* Shaders support ( with automatic fixed pipeline shaders to programmable conversor ).
Window Module
-------------
* Vertex Buffer Object support.
* Backend based module, this means that you can easily create a backend for the window/input handling.
* Particle System.
* Currently supports SDL 2 as backend.
* Extendable Console.
* Clipboard support.
* Animated Sprites.
* Hardware cursors.
* Texture Atlas support ( automatic creation and update of the texture atlas, editor included ).
* Display Manager
* Clipping Masks ( stencil, scissors, planes )
* Joystick support.
* Nine Patch resizable bitmaps support.
* Primitives drawables.
Audio Module
------------
* Many image formats supported ( included rasterized SVG ), compressed textures support ( direct upload to the GPU when possible ).
* OpenAL audio engine with extendable file format support. Read and write support for OGG and Wav, and read support for MP3 and FLAC. Audio module is based on an old version of the SFML Audio module.
### Window Module
* Backend based module, this means that you can easily create a backend for the window/input handling.
Physics Module
--------------
* Currently supports SDL 2 as backend.
* Full OOP chipmunk physics wrapper.
* Clipboard support.
* Hardware cursors.
System Module
-------------
* Display Manager
* Provides all the basics stuffs for the full multi-threading support of the library, file formats support for packing, clocks, resource manager, translator, and much more.
* Joystick support.
* Virtual File System class ( abstract assets providers into a single virtual file system, abstracting zip files and local file system into one for transparent load of resources, similar to PhysicsFS ).
### Audio Module
* OpenAL audio engine with extendable file format support. Read and write support for OGG and Wav, and read support for MP3 and FLAC.
Core Module
-----------
### Physics Module
* Customizable Memory Manager. Used by default in debug mode to track memory leaks.
* Full OOP chipmunk physics wrapper.
* UTF8, UTF-16, UTF-32, Ansi, Wide Char support.
### System Module
* String class using UTF-32 chars internally.
* Provides all the basics stuffs for the full multi-threading support of the library, file formats support for packing, clocks, resource manager, translator, and much more.
* Debug macros
* Virtual File System class ( abstract assets providers into a single virtual file system, abstracting zip files and local file system into one for transparent load of resources, similar to [PhysicsFS](https://www.icculus.org/physfs/) ).
### Core Module
Math Module
-----------
* Customizable Memory Manager. Used by default in debug mode to track memory leaks.
* General purpose functions and templates ( vector, quad, polygon, etc ).
* UTF8, UTF-16, UTF-32, Ansi, Wide Char support.
* Interpolation classes with easing.
* String class using UTF-32 chars internally.
* Some minor math utilities, include Mersenne Twister random number generator implementation, perlin noise and more.
* Debug macros
### Math Module
Network Module
--------------
* Web Requests with HTTP client, with **TLS support** ( provided by mbedtls or openssl ).
* General purpose functions and templates ( vector, quad, polygon, etc ).
* Asynchronous HTTP requests.
* Interpolation classes with easing.
* File Transfers with FTP client and FTPS client ( FTP with explicit TLS ).
* Some minor math utilities, include Mersenne Twister random number generator implementation, perlin noise and more.
* TCP and UDP sockets.
### Network Module
* HTTP Content-Encoding and Transfer-Encoding support.
* Web Requests with HTTP client, with **TLS support** ( provided by mbedtls or openssl ).
* HTTP Proxy Support.
* Asynchronous HTTP requests.
* HTTP Compressed response support.
* File Transfers with FTP client and FTPS client ( FTP with explicit TLS ).
* Also HTTP resume/continue download support and automatic follow redirects.
* TCP and UDP sockets.
Module was originally based on the SFML Network module implementation, though currently differs a lot from it.
* HTTP Content-Encoding and Transfer-Encoding support.
* HTTP Proxy Support.
Scene Module
------------
* Node based system for easy management of scenes.
* HTTP Compressed response support.
* Full control of node events ( clicks, mouse over, focus, etc ).
* Also HTTP resume/continue download support and automatic follow redirects.
* Event system.
### Scene Module
* Node Message system.
* Node based system for easy management of scenes.
* Programmable actions for nodes ( fade, rotate, move, scale, etc ).
* Full control of node events ( clicks, mouse over, focus, etc ).
* Event system.
UI Module
---------
* Node Message system.
* Base controls to manage the game objects as nodes, with all basic input interaction events ( clicks, keypress, mouser over, focus, etc ).
* Programmable actions for nodes ( fade, rotate, move, scale, etc ).
* Fully featured UI system, animation support, scaling, rotating, clipping, events, messages, etc.
### Maps Module
* Themes and skins support.
* Tiled Maps with software dynamic lights.
* Pixel density support ( scaling of UI elements defined by the pixel density of the screen ).
* Full featured map editor.
* All the basic controls are implemented ( button, textbox, combobox, inputbox, menu, listbox, scrollbars, etc ).
### Tools
* Draw invalidation support. It can be used to make real apps, with low resource usage ( only redraws when needed ).
* Very simple UI Editor. Load layouts from an XML file and see the changes being made in real time.
* Layout system similar to Android layouts ( LinearLayout, RelativeLayout, GridLayout ).
* Texture Atlas Editor. A very simple tool to allow the developer to create and edit texture atlases.
* Advanced features as text selection and key bindings.
* Map Editor: A advanced but simple map editor for the game engine. It lacks several features since I didn't have the time to work on it, this particular tool will probably die in favor of TMX map support in the near future ( but i'm not a fan of TMX maps, so there's no decision for the moment ).
* Load layouts from XMLs
### General Features
* Styling with CSS like format
* Support for multi-threaded resource loading ( textures, sounds, fonts, etc ).
## Documentation
Maps Module
-----------
Documentation is located [here](https://eepp.ensoft.dev). I'm currently working
on improving it. About 50% of the project is currently documented so still needs
a lot of work. Please check the code examples located in `src/examples` and you
can also check out the test ( `src/test` ) and tools ( `src/tools` ).
* Tiled Maps with software dynamic lights.
I'm putting my efforts on improving the documentation on the UI module since
currently is the most important and complex module but lacks of proper
documentation. If you have any question you can contact me anytime.
* Full featured map editor.
## Getting the code
The repository uses git submodules so you'll need to clone the repository and
its submodules, in order to achieve this easily you can simply clone with:
Tools
-----
* Very simple UI Editor. Load layouts from an XML file and see the changes being made in real time.
`git clone --recurse-submodules https://github.com/SpartanJ/eepp.git`
* Texture Atlas Editor. A very simple tool to allow the developer to create and edit texture atlases.
## UI Screenshots
* Map Editor: A advanced but simple map editor for the game engine. It lacks several features since I didn't have the time to work on it, this particular tool will probably die in favor of TMX map support in the near future ( but i'm not a fan of TMX maps, so there's no decision for the moment ).
General Features
----------------
* Support for multi-threaded resource loading ( textures, sounds, fonts, etc ).
UI Screenshots
--------------
![Map Editor](https://web.ensoft.dev/eepp/screenshots/eepp1.png)
![UI Elements with 2x pixel density](https://web.ensoft.dev/eepp/screenshots/eepp2.png)
![Texture Atlas Editor with 1.5x pixel density](https://web.ensoft.dev/eepp/screenshots/eepp3.png)
## UI Layout XML example
UI Layout XML example
---------------------
It should look really familiar to any Android developer. This is a window with
the most basic controls in a vertical linear layout display.
```xml
<window layout_width="300dp" layout_height="300dp" winflags="default|maximize">
<LinearLayout id="testlayout" orientation="vertical" layout_width="match_parent" layout_height="match_parent" layout_margin="8dp">
<TextView text="Hello World!" gravity="center" layout_gravity="center_horizontal" layout_width="match_parent" layout_height="wrap_content" backgroundColor="black" />
<PushButton text="OK!" textSize="16dp" icon="ok" gravity="center" layout_gravity="center_horizontal" layout_width="match_parent" layout_height="wrap_content" />
<Image src="thecircle" layout_width="match_parent" layout_height="32dp" flags="clip" />
<Sprite src="gn" />
<TextInput text="test" layout_width="match_parent" layout_height="wrap_content" />
<DropDownList layout_width="match_parent" layout_height="wrap_content" selectedIndex="0">
<item>Test Item</item>
<item>@string/test_item</item>
</DropDownList>
<ListBox layout_width="match_parent" layout_height="match_parent" layout_weight="1">
<item>Hello!</item>
<item>World!</item>
</ListBox>
</LinearLayout>
<LinearLayout id="testlayout" orientation="vertical" layout_width="match_parent" layout_height="match_parent" layout_margin="8dp">
<TextView text="Hello World!" gravity="center" layout_gravity="center_horizontal" layout_width="match_parent" layout_height="wrap_content" backgroundColor="black" />
<PushButton text="OK!" textSize="16dp" icon="ok" gravity="center" layout_gravity="center_horizontal" layout_width="match_parent" layout_height="wrap_content" />
<Image src="thecircle" layout_width="match_parent" layout_height="32dp" flags="clip" />
<Sprite src="gn" />
<TextInput text="test" layout_width="match_parent" layout_height="wrap_content" />
<DropDownList layout_width="match_parent" layout_height="wrap_content" selectedIndex="0">
<item>Test Item</item>
<item>@string/test_item</item>
</DropDownList>
<ListBox layout_width="match_parent" layout_height="match_parent" layout_weight="1">
<item>Hello!</item>
<item>World!</item>
</ListBox>
</LinearLayout>
</window>
```
## UI Widgets with C++ example
UI Widgets with C++ example
---------------------------
How does it look with real code?
```cpp
UITextView::New()->setText( "Text on test 1" )
->setCharacterSize( 12 )
->setLayoutMargin( Rect( 10, 10, 10, 10 ) )
->setLayoutSizeRules( LayoutSizeRule::MatchParent, LayoutSizeRule::WrapContent )
->setParent( layout );
->setCharacterSize( 12 )
->setLayoutMargin( Rect( 10, 10, 10, 10 ) )
->setLayoutSizeRules( LayoutSizeRule::MatchParent, LayoutSizeRule::WrapContent )
->setParent( layout );
```
UI Styling
----------
## UI Styling
Element styling can be done with a custom implementation of Cascading Style
Sheets, most common CSS2 rules are available, plus several CSS3 rules (some
examples: [transitions](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Transitions),
@@ -249,190 +240,225 @@ Here is a small example on how the CSS looks like:
```css
@font-face {
font-family: "OpenSans Regular";
src: url("https://raw.githubusercontent.com/SpartanJ/eepp/develop/bin/assets/fonts/OpenSans-Regular.ttf");
font-family: "OpenSans Regular";
src: url("https://raw.githubusercontent.com/SpartanJ/eepp/develop/bin/assets/fonts/OpenSans-Regular.ttf");
}
@import url("assets/layouts/imported.css") screen and (min-width: 800px);
:root {
--font-color: black;
--background-input-color: rgba(255, 255, 255, 0.7);
--border-color: black;
--border-width: 1dp;
--font-color: black;
--background-input-color: rgba(255, 255, 255, 0.7);
--border-color: black;
--border-width: 1dp;
}
.screen TextView {
color: var(--font-color);
color: var(--font-color);
}
.form {
background-image: @drawable/back;
background-repeat: no-repeat;
background-size: cover;
background-image: @drawable/back;
background-repeat: no-repeat;
background-size: cover;
}
.form .form_inputs {
background-color: var(--non-existent, var(--background-input-color));
margin-left: 100dp;
margin-right: 100dp;
padding-top: 72dp;
padding-left: 57dp;
padding-right: 57dp;
padding-bottom: 115dp;
background-color: var(--non-existent, var(--background-input-color));
margin-left: 100dp;
margin-right: 100dp;
padding-top: 72dp;
padding-left: 57dp;
padding-right: 57dp;
padding-bottom: 115dp;
}
.screen TextView.input,
.screen TextInput.input {
font-family: AkzidenzGroteskBQ-Cnd;
layout-width: match_parent;
layout-height: 80dp;
border-color: var(--border-color);
border-width: var(--border-width);
color: var(--font-color);
padding-left: 40dp;
padding-right: 40dp;
margin-bottom: 32dp;
skin: none;
hint-font-family: AkzidenzGroteskBQ-Cnd;
hint-font-size: 46dp;
hint-color: #818285;
background-color: #FFFFFF00;
transition: all 0.125s;
font-family: AkzidenzGroteskBQ-Cnd;
layout-width: match_parent;
layout-height: 80dp;
border-color: var(--border-color);
border-width: var(--border-width);
color: var(--font-color);
padding-left: 40dp;
padding-right: 40dp;
margin-bottom: 32dp;
skin: none;
hint-font-family: AkzidenzGroteskBQ-Cnd;
hint-font-size: 46dp;
hint-color: #818285;
background-color: #FFFFFF00;
transition: all 0.125s;
}
.screen TextInput.input:focus {
background-color: #FFFFFF66;
border-color: #796500;
background-color: #FFFFFF66;
border-color: #796500;
}
.screen TextInput.input:hover {
background-color: #FFFFFF66;
background-color: #FFFFFF66;
}
@media screen and (max-width: 1024px) {
.form .form_inputs {
background-color: red;
background-color: red;
}
}
```
Documentation
-------------
Documentation is located [here](https://eepp.ensoft.dev). I'm currently working
on improving it. About 50% of the project is currently documented so still needs
a lot of work. Please check the code examples located in `src/examples` and you
can also check out the test ( `src/test` ) and tools ( `src/tools` ).
I'm putting my efforts on improving the documentation on the UI module since
currently is the most important and complex module but lacks of proper
documentation. If you have any question you can contact me anytime.
Getting the code
----------------
The repository uses git submodules so you'll need to clone the repository and
its submodules, in order to achieve this easily you can simply clone with:
`git clone --recurse-submodules https://github.com/SpartanJ/eepp.git`
How to build it?
----------------
## How to build it
The library has very few external dependencies. Most of the time you will only
need SDL2 and OpenAL libraries with the headers installed. Also **premake4** or
**premake5** is needed to generate the Makefiles or project files to build the
library. I will assume that you know what you are doing and skip the basics.
need **SDL2** and **OpenAL** libraries with the headers installed. Also
**premake4** or **premake5** is needed to generate the Makefiles or project
files to build the library. I will assume that you know what you are doing and
skip the basics.
_**GNU/Linux**_
Notice: OpenAL is not strictly necessary. If you want to avoid it, you
have the alternative to use [mojoAL](https://icculus.org/mojoAL/). The latter
is already integrated to the library but not enabled by default. To enable it
and disable the OpenAL dependency you need to add the parameter `--with-mojoal`
to any `premake` call ( ex: `premake5 --with-mojoal gmake2` ).
In a Ubuntu system it would be something like ( also you will need gcc and freetype,
but it will be installed anyways ):
### GNU/Linux
In a Ubuntu system it would be something like ( also you will need gcc but it
will be installed anyways ):
`sudo apt-get install premake4 libsdl2-2.0-0 libsdl2-dev libopenal1 libopenal-dev`
Clone the repository and on the repository root directory run:
Clone the repository and run on the repository root directory:
`premake4 gmake`
or if you have premake5 installed you can run:
`premake5 gmake2`
Then just build the library:
`cd make/linux`
`make`
`make -C make/linux`
That's it. That will build the whole project.
### Windows
_**Windows**_
You have two options: build with [Visual Studio](https://visualstudio.microsoft.com/)
or with [MinGW](https://sourceforge.net/projects/mingw-w64/).
To be able to build the project with any of these options first you will need to
generate the project files with [premake4 or premake5](https://premake.github.io/download.html).
Then you will need to add the binary file to any of the executable paths defined
in `PATH` ( or add one, or use it from a local path ). Also you will need to
install the prebuild binaries and development libraries of [SDL2](http://libsdl.org/download-2.0.php)
and [openal-soft](http://kcat.strangesoft.net/openal.html#download).
Download *Visual Studio* or *MinGW* files depending on your needs.
You have two options: build with *Visual Studio* or with *mingw*.
To build with any of both options first you will need to build the project files
with [premake4](https://premake.github.io/download.html). Then add the
premake4.exe file to any of the executable paths defined in `PATH` ( or add one ).
#### Visual Studio
You will need to use premake5 and run:
For *Visual Studio*:
`premake5.exe vs2019`
or
`premake4.exe vs2010`
For *mingw*:
Then the project files should be found in `make/windows/`. A complete solution
and all the project will be available. Having installed everything, you'll be
able to build the *Visual Studio* solution as any other project.
If you are very new to programming there's an alternative to build the project
without external dependencies, in order to do that you need to generate the
project files with the command:
`premake5.exe --windows-vc-build --with-mojoal vs2019`
Then just build the solution in Visual Studio or run `MSBuild` manually in a
console:
`"%MSBUILD_PATH%\MSBuild.exe" .\make\windows\eepp.sln -m`
Where `%MSBUILD_PATH%` is the MSBuild.exe Visual Studio path, for example for
_VS2019 Community Edition_ the path usually is:
`C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\`
#### MinGW
`premake4.exe gmake`
Then you will need the prebuild binaries and development libraries of
[SDL2](http://libsdl.org/download-2.0.php) and
[openal-soft](http://kcat.strangesoft.net/openal.html#download).
Download the ones needed ( *VS* or *mingw* ).
Then just build the project located in `make/windows/` with `mingw32-make.exe`
or any equivalent:
Then the project files should be found in `make/windows/`. A solution (sln) for
*Visual Studio* or the corresponding `Makefiles` for *mingw*.
`mingw32-make.exe -C make\windows`
Having installed everything, you'll be able to build for *Visual Studio* as any
other project.
And for *mingw* just make the project with: `mingw32-make` or any equivalent.
### macOS
_**macOS**_
You have two options to build the project: with XCode or with gcc/clang manually.
To build with any of both options first you will also need to build the project
files with [premake4](https://premake.github.io/download.html).
Then you will need the prebuild binaries and development libraries of
You will need the prebuild binaries and development libraries of
[SDL2](http://libsdl.org/download-2.0.php), OpenAL is included with the OS.
Install the *SDL2* framework and you should be able to build the project.
Install the SDL2 framework and you should be able to build the project.
For a CLI build you can use the `projects/osx/make.sh` script, that generates
the *Makefiles* and builds the project, also fix the dylibs generated.
You have two options to build the project: with *XCode* or with *Makefiles*.
To build with any of both options first you will also need to build the project
files with [premake4 or premake5](https://premake.github.io/download.html).
For *XCode* :
`premake4 xcode4`
#### Makefiles
And open the XCode project generated in `make/osx/`
##### Using premake5
Generate the project:
_**Android**_
`premake5 --use-frameworks gmake2`
And build it:
`make -C make/macosx`
##### Using premake4
You can use the `projects/osx/make.sh` script, that generates the *Makefiles*
and builds the project.
#### XCode
Run:
`premake5 --use-frameworks xcode4`
And open the XCode project generated at `make/macosx/` or simply build from the
command line with:
`xcodebuild -project make/macosx/project-name.xcodeproj`
### Android
There's a gradle project in `projects/android-project/`. It will build the
library with all the dependencies included. Use the example project as a base
for your project. Notice that there's a `eepp.mk` project file that builds the
library. That can be used in you projects.
library. That file can be used in you projects.
_**iOS**_
### iOS
I've compiled the project for *iOS* many times in the past but there's not a
I've compiled the project for **iOS** many times in the past but there's not a
recent build of it, so it might fail. But you can get the scripts to build it in
`projects/ios/`. You'll need some inspiration to make this work, but i promise
that i'll work on make this easier in the near future.
`projects/ios/`. You can use `compile-all.sh` to generate a static build of eepp
( but you will need to update the `libs/ios/libSDL2.a` build with a more recent
one ).
You'll need some inspiration to make this work, but I promise that I'll work on
make this easier in the near future.
You can also try to build the project with
`premake5 --use-frameworks --os=ios xcode4`. That should give you a good
starting point, but won't build, it will need some minor tweaks.
_**emscripten**_
### emscripten
There's a script for building the *emscripten* project in
`projects/emscripten/make.sh`. That should be enough in *GNU/Linux* or *macOS*
( only tested this on *Linux* ).
You will first need to [download and install emscripten](https://emscripten.org/docs/getting_started/downloads.html).
Then there's a script for building the **emscripten** project in
`projects/emscripten/make.sh`. That should be enough in **GNU/Linux** or
**macOS** ( only tested this on GNU/Linux ).
## Author comment
Author comment
--------------
The library has been being developed for several years, it suffered many changes
since its beginnings, I'm making any changes that I find necessary to improve
it, so the API is still not totally stable (but close to be).
@@ -458,7 +484,7 @@ views on how to implement some things I prefer to take the code, to have full
control over it.
Also many ideas were/are taken from other projects. Some I can think about:
*cocos2d-x*, *raylib*, *Android SDK*, *libgdx*, *Godot*, *XNA*, *LÖVE*, and many
*cocos2d-x*, *raylib*, *Android SDK*, *libGDX*, *Godot*, *XNA*, *LÖVE*, and many
other projects.
If all this sounds interesting to you for some crazy reason, contact me and let
@@ -472,8 +498,8 @@ course of the support+community that you can get from *Godot* or *cocos2d-x* to
mention a couple.
The main idea of this library is to focus on a better general approach to
develop heavily UI based apps ands games than the other options, with cleaner code
and implementation.
develop heavily UI based apps ands games than the other options, with cleaner
code and implementation.
The main reason I developed the library is for _fun_ and to _learn_ new
technologies. I love spending time working on the library, but I know there's
@@ -488,10 +514,9 @@ overhauling them would take too much time to justify the effort. I'm working on
"modernizing" some parts of the code, and new code usually tend to look more
modern.
### Plans/ideas for the future
_**Plans/ideas for the future:**_
Keep improving the UI system, adding new widgets and improving the CSS support.
Keep improving the UI system, adding new widgets and layouts and improving the CSS support.
Simplify and improve the UI widgets skinning/theming support.
@@ -499,62 +524,62 @@ Add [CSS animations](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Animat
Improve/create documentation for the UI module.
Add more examples and also some tools.
Add more examples and some tools.
Add Scripting support ( first i would like to stabilize the library, but i'm getting there ).
Add Scripting support ( first I would like to stabilize the library, but I'm getting there ).
Add 2D skeletal animations support ( probably Spine2D, shouldn't be much work to implement ).
Probably deprecate the Maps module, since i will focus my efforts on the UI system.
## Acknowledgements
Acknowledgements
----------------
_**Special thanks to:**_
### Special thanks to
* Sean Barrett for stb_image and all the [stb](https://github.com/nothings/stb) libraries.
* Sean Barrett for stb_image and all the [stb](https://github.com/nothings/stb) libraries.
* Sam Latinga for [Simple DirectMedia Layer](https://www.libsdl.org/).
* Sam Latinga for [Simple DirectMedia Layer](https://www.libsdl.org/).
* Jonathan Dummer for the [Simple OpenGL Image Library](https://www.lonesock.net/soil.html).
* Jonathan Dummer for the [Simple OpenGL Image Library](https://www.lonesock.net/soil.html).
* Laurent Gomila for [SFML](https://www.sfml-dev.org/)
* Laurent Gomila for [SFML](https://www.sfml-dev.org/)
* Yuri Kobets for [litehtml](https://github.com/litehtml/litehtml)
* Yuri Kobets for [litehtml](https://github.com/litehtml/litehtml)
* Lewis Van Winkle for [PlusCallback](https://github.com/codeplea/pluscallback)
* Ryan C. Gordon for [mojoAL](https://icculus.org/mojoAL/)
* Dieter Baron and Thomas Klausner for [libbzip](https://libzip.org/)
* Lewis Van Winkle for [PlusCallback](https://github.com/codeplea/pluscallback)
* Jean-loup Gailly and Mark Adler for [zlib](https://zlib.net/)
* Dieter Baron and Thomas Klausner for [libbzip](https://libzip.org/)
* Milan Ikits and Marcelo Magallon for [GLEW](http://glew.sourceforge.net/)
* Jean-loup Gailly and Mark Adler for [zlib](https://zlib.net/)
* Mikko Mononen for [nanosvg](https://github.com/memononen/nanosvg)
* Milan Ikits and Marcelo Magallon for [GLEW](http://glew.sourceforge.net/)
* Scott Lembcke for [Chipmunk2D](https://github.com/slembcke/Chipmunk2D)
* Mikko Mononen for [nanosvg](https://github.com/memononen/nanosvg)
* Christophe Riccio for [glm](https://github.com/g-truc/glm)
* Scott Lembcke for [Chipmunk2D](https://github.com/slembcke/Chipmunk2D)
* Rich Geldreich for [imageresampler](https://github.com/richgel999/imageresampler) and [jpeg-compressor](https://github.com/richgel999/jpeg-compressor)
* Christophe Riccio for [glm](https://github.com/g-truc/glm)
* Arseny Kapoulkine for [pugixml](https://github.com/zeux/pugixml)
* Rich Geldreich for [imageresampler](https://github.com/richgel999/imageresampler) and [jpeg-compressor](https://github.com/richgel999/jpeg-compressor)
* Jason Perkins for [premake](https://premake.github.io/)
* Arseny Kapoulkine for [pugixml](https://github.com/zeux/pugixml)
* Martín Lucas Golini ( me ) and all the several contributors for [SOIL2](https://github.com/SpartanJ/SOIL2) and [efsw](https://github.com/SpartanJ/efsw)
* Jason Perkins for [premake](https://premake.github.io/)
* The Xiph open source community for [libogg](https://xiph.org/ogg/) and [libvorbis](https://xiph.org/vorbis/)
* Martín Lucas Golini ( me ) and all the several contributors for [SOIL2](https://github.com/SpartanJ/SOIL2) and [efsw](https://github.com/SpartanJ/efsw)
* The [ARMmbed](https://github.com/ARMmbed) community for [mbed TLS](https://tls.mbed.org/)
* The Xiph open source community for [libogg](https://xiph.org/ogg/) and [libvorbis](https://xiph.org/vorbis/)
* [kcat](https://github.com/kcat) for [openal-soft](http://kcat.strangesoft.net/openal.html)
* The [ARMmbed](https://github.com/ARMmbed) community for [mbed TLS](https://tls.mbed.org/)
* The [FreeType Project](https://www.freetype.org/freetype2/docsindex.html)
* [kcat](https://github.com/kcat) for [openal-soft](http://kcat.strangesoft.net/openal.html)
* And a **lot** more people!
* The [FreeType Project](https://www.freetype.org/freetype2/docsindex.html)
* And a **lot** more people!
## Code License
Code License
------------
[MIT License](http://www.opensource.org/licenses/mit-license.php)

View File

@@ -11,6 +11,10 @@ doxygen:
doxyrest: doxygen
doxyrest -c doxyrest-config.lua
perl -i -p0e 's/`(.*?)OS>`__//se' ../rst/page_index.rst
perl -i -p0e 's/image:: (?!http)/image:: https:\/\/web.ensoft.dev\/eepp\/screenshots\//g' ../rst/page_index.rst
perl -i -p0e 's/`https:\/\/github.com\/SpartanJ\/eepp.git <https:\/\/github.com\/SpartanJ\/eepp.git>`__`/https:\/\/github.com\/SpartanJ\/eepp.git/g' ../rst/page_index.rst
perl -i -p0e 's/``git/`git/g' ../rst/page_index.rst
sphinx: doxyrest
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

View File

@@ -35,6 +35,17 @@ td {
100% { box-shadow: none; }
}
a:hover {
color: #33AEFF;
}
a,
a:visited {
color: #3E9DDD;
}
@media (prefers-color-scheme: dark) {
pre.doxyrest-overview-code-block {
background-color: #201f1f !important;
}
@@ -79,14 +90,6 @@ pre {
color: #ffcd8b;
}
a:hover {
color: #70c6ff;
}
a {
color: #33AEFF;
}
.highlight .cpf {
color: #ffcd8b;
}
@@ -100,16 +103,6 @@ body,
background: #272b30;
}
@media screen and (min-width: 1100px) {
.wy-nav-top {
background: transparent;
}
.wy-nav-content {
background: #272b30;
}
}
a:visited {
color: #50a6df;
}
@@ -127,7 +120,8 @@ pre.doxyrest-title-code-block {
background-color: #363b42 !important;
}
a {
a,
a:visited {
color: #70c6ff;
}
@@ -276,3 +270,15 @@ code, .rst-content tt, .rst-content code {
border-bottom: solid 1px #666;
border-top: solid 1px #666;
}
}
@media screen and (min-width: 1100px) and (prefers-color-scheme: dark) {
.wy-nav-top {
background: transparent;
}
.wy-nav-content {
background: #272b30;
}
}

View File

@@ -129,14 +129,14 @@ function download_and_extract_dependencies()
end
function build_base_configuration( package_name )
includedirs { "src/thirdparty/zlib" }
sysincludedirs { "src/thirdparty/zlib" }
if not os.istarget("windows") then
buildoptions{ "-fPIC" }
end
if is_vs() then
includedirs { "src/thirdparty/libzip/vs" }
sysincludedirs { "src/thirdparty/libzip/vs" }
end
set_ios_config()
@@ -207,7 +207,7 @@ function fix_shared_lib_linking_path( package_name, libname )
end
function build_link_configuration( package_name, use_ee_icon )
includedirs { "include" }
sysincludedirs { "include" }
local extension = "";
@@ -415,7 +415,7 @@ end
function set_xcode_config()
if is_xcode() or _OPTIONS["use-frameworks"] then
linkoptions { "-F /Library/Frameworks" }
includedirs { "/Library/Frameworks/SDL2.framework/Headers" }
sysincludedirs { "/Library/Frameworks/SDL2.framework/Headers" }
defines { "EE_SDL2_FROM_ROOTPATH" }
end
end
@@ -455,11 +455,11 @@ function set_ios_config()
linkoptions { sysroot_ver }
libdirs { framework_libs_path }
linkoptions { " -F" .. framework_path .. " -L" .. framework_libs_path .. " -isysroot " .. sysroot_path }
includedirs { "src/thirdparty/SDL2/include" }
sysincludedirs { "src/thirdparty/SDL2/include" }
end
if _OPTIONS.platform == "ios-cross-arm7" or _OPTIONS.platform == "ios-cross-x86" then
includedirs { "src/thirdparty/SDL2/include" }
sysincludedirs { "src/thirdparty/SDL2/include" }
end
end
@@ -537,15 +537,15 @@ function set_macos_and_ios_config()
end
function build_eepp( build_name )
includedirs { "include", "src", "src/thirdparty", "include/eepp/thirdparty", "src/thirdparty/freetype2/include", "src/thirdparty/zlib", "src/thirdparty/libogg/include", "src/thirdparty/libvorbis/include", "src/thirdparty/mbedtls/include" }
sysincludedirs { "include", "src", "src/thirdparty", "include/eepp/thirdparty", "src/thirdparty/freetype2/include", "src/thirdparty/zlib", "src/thirdparty/libogg/include", "src/thirdparty/libvorbis/include", "src/thirdparty/mbedtls/include" }
if _OPTIONS["with-mojoal"] then
defines( "AL_LIBTYPE_STATIC" )
includedirs { "src/thirdparty/mojoAL" }
sysincludedirs { "src/thirdparty/mojoAL" }
end
if _OPTIONS["windows-vc-build"] then
includedirs { "src/thirdparty/" .. remote_sdl2_version .. "/include" }
sysincludedirs { "src/thirdparty/" .. remote_sdl2_version .. "/include" }
end
set_macos_and_ios_config()
@@ -555,7 +555,7 @@ function build_eepp( build_name )
add_static_links()
if is_vs() then
includedirs { "src/thirdparty/libzip/vs" }
sysincludedirs { "src/thirdparty/libzip/vs" }
end
if not is_vs() then
@@ -657,7 +657,7 @@ workspace "eepp"
set_targetdir("libs/" .. os.target() .. "/thirdparty/")
files { "src/thirdparty/SOIL2/src/SOIL2/*.c" }
includedirs { "src/thirdparty/SOIL2" }
sysincludedirs { "src/thirdparty/SOIL2" }
build_base_configuration( "SOIL2" )
if not os.istarget("haiku") and not os.istarget("ios") and not os.istarget("android") and not os.istarget("emscripten") then
@@ -667,7 +667,7 @@ workspace "eepp"
defines { "GLEW_NO_GLU", "GLEW_STATIC" }
set_targetdir("libs/" .. os.target() .. "/thirdparty/")
files { "src/thirdparty/glew/*.c" }
includedirs { "include/thirdparty/glew" }
sysincludedirs { "include/thirdparty/glew" }
build_base_configuration( "glew" )
end
@@ -676,7 +676,7 @@ workspace "eepp"
kind "StaticLib"
language "C"
set_targetdir("libs/" .. os.target() .. "/thirdparty/")
includedirs { "src/thirdparty/mbedtls/include/" }
sysincludedirs { "src/thirdparty/mbedtls/include/" }
files { "src/thirdparty/mbedtls/library/*.c" }
build_base_cpp_configuration( "mbedtls" )
end
@@ -685,7 +685,7 @@ workspace "eepp"
kind "StaticLib"
language "C"
set_targetdir("libs/" .. os.target() .. "/thirdparty/")
includedirs { "src/thirdparty/libvorbis/lib/", "src/thirdparty/libogg/include", "src/thirdparty/libvorbis/include" }
sysincludedirs { "src/thirdparty/libvorbis/lib/", "src/thirdparty/libogg/include", "src/thirdparty/libvorbis/include" }
files { "src/thirdparty/libogg/**.c", "src/thirdparty/libvorbis/**.c" }
build_base_cpp_configuration( "vorbis" )
@@ -708,7 +708,7 @@ workspace "eepp"
language "C"
set_targetdir("libs/" .. os.target() .. "/thirdparty/")
files { "src/thirdparty/libzip/*.c" }
includedirs { "src/thirdparty/zlib" }
sysincludedirs { "src/thirdparty/zlib" }
build_base_configuration( "libzip" )
project "freetype-static"
@@ -717,7 +717,7 @@ workspace "eepp"
set_targetdir("libs/" .. os.target() .. "/thirdparty/")
defines { "FT2_BUILD_LIBRARY" }
files { "src/thirdparty/freetype2/src/**.c" }
includedirs { "src/thirdparty/freetype2/include" }
sysincludedirs { "src/thirdparty/freetype2/include" }
build_base_configuration( "freetype" )
project "chipmunk-static"
@@ -732,7 +732,7 @@ workspace "eepp"
set_targetdir("libs/" .. os.target() .. "/thirdparty/")
files { "src/thirdparty/chipmunk/*.c", "src/thirdparty/chipmunk/constraints/*.c" }
includedirs { "include/eepp/thirdparty/chipmunk" }
sysincludedirs { "include/eepp/thirdparty/chipmunk" }
build_base_configuration( "chipmunk" )
project "jpeg-compressor-static"
@@ -755,9 +755,9 @@ workspace "eepp"
language "C"
set_targetdir("libs/" .. os.target() .. "/thirdparty/")
if _OPTIONS["windows-vc-build"] then
includedirs { "src/thirdparty/" .. remote_sdl2_version .. "/include" }
sysincludedirs { "src/thirdparty/" .. remote_sdl2_version .. "/include" }
end
includedirs { "include/eepp/thirdparty/mojoAL" }
sysincludedirs { "include/eepp/thirdparty/mojoAL" }
defines( "AL_LIBTYPE_STATIC" )
files { "src/thirdparty/mojoAL/*.c" }
build_base_cpp_configuration( "mojoal" )
@@ -767,7 +767,7 @@ workspace "eepp"
kind "StaticLib"
language "C++"
set_targetdir("libs/" .. os.target() .. "/thirdparty/")
includedirs { "src/thirdparty/efsw/include", "src/thirdparty/efsw/src" }
sysincludedirs { "src/thirdparty/efsw/include", "src/thirdparty/efsw/src" }
if os.istarget("windows") then
osfiles = "src/thirdparty/efsw/src/efsw/platform/win/*.cpp"
@@ -865,14 +865,14 @@ workspace "eepp"
kind "ConsoleApp"
language "C++"
files { "src/examples/http_request/*.cpp" }
includedirs { "src/thirdparty" }
sysincludedirs { "src/thirdparty" }
build_link_configuration( "eehttp-request", true )
project "eepp-ui-hello-world"
set_kind()
language "C++"
files { "src/examples/ui_hello_world/*.cpp" }
includedirs { "src/thirdparty" }
sysincludedirs { "src/thirdparty" }
build_link_configuration( "eeui-hello-world", true )
-- Tools
@@ -891,7 +891,7 @@ workspace "eepp"
project "eepp-uieditor"
set_kind()
language "C++"
includedirs { "src/thirdparty/efsw/include", "src/thirdparty" }
sysincludedirs { "src/thirdparty/efsw/include", "src/thirdparty" }
if not os.istarget("windows") and not os.istarget("haiku") then
links { "pthread" }

View File

@@ -1,6 +1,6 @@
#!/bin/sh
cd $(dirname "$0")
/usr/local/bin/premake4 --file=../../premake4.lua --use-frameworks gmake
premake4 --file=../../premake4.lua --use-frameworks gmake
cd ../../make/macosx/
sed -e "s/-Wl,-x//g" -i .make

View File

@@ -915,6 +915,11 @@ void createAppMenu() {
SceneManager::instance()->setCurrentUISceneNode( uiSceneNode );
}
void setUserDefaultTheme() {
useDefaultTheme = true;
uiSceneNode->getUIThemeManager()->setDefaultTheme( theme );
}
EE_MAIN_FUNC int main( int argc, char* argv[] ) {
args::ArgumentParser parser( "eepp UIEditor" );
args::HelpFlag help( parser, "help", "Display this help menu", {'h', "help"} );
@@ -1008,8 +1013,7 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) {
uiSceneNode->getUIThemeManager()->setDefaultFont( font )->setDefaultEffectsEnabled( true );
if ( useAppTheme.Get() ) {
useDefaultTheme = true;
uiSceneNode->getUIThemeManager()->setDefaultTheme( theme );
setUserDefaultTheme();
}
loadConfig();
@@ -1039,6 +1043,7 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) {
}
#if EE_PLATFORM == EE_PLATFORM_EMSCRIPTEN
setUserDefaultTheme();
if ( !xmlFile && !cssFile )
loadStyleSheet( "assets/layouts/test.css" );
loadLayoutFile( "assets/layouts/test.xml" );