This answer assumes using Linux in a VM and OpenXcom-Extended, since that's what I have experience with.
- Get an ubuntu VM ( I prefer xubuntu since its UI is actually sane and lightweight; use the 18.04 release )
- Install Git and get the source code:
sudo apt install git
git clone https://github.com/MeridianOXC/OpenXcom.git
The next steps depend on whether you would like to test/run OXCE in the VM or on the host machine.
For building windows executables:
1. install MXE and dependencies (this will take considerable time)
apt install build-essential
sudo mkdir /opt
cd /opt
sudo git clone https://github.com/mxe/mxe.git
cd mxe
sudo make gcc sdl sdl_gfx sdl_image sdl_mixer yaml-cpp
2. build the .exe
cd ~/OpenXcom/src
make -f Makefile.mxe
This will build a 32bit windows executable under ~/OpenXcom/bin
If running OXCE under VM / in linux:
1. install dependencies:
sudo apt install git build-essential libsdl*1.2*dev libyaml-cpp-dev cmake-curses-gui kdevelop
2. set up the KDevelop project: launch KDevelop, do Project->Open/Import Project, pick the OpenXcom directory; set the Project Manager to CMakeLists. Press OK in the next window.
3. Build it - just press the Build button (leftmost in the toolbar)
4. You'll have to copy the vanilla datafiles and mods into some dir in the VM, then copy the built executable alongside them, etc, to get it to start up. That's a different topic, feel free to ask.
Once either one works, read the source. Typical code that does UI element placing looks like this:
_window = new Window(this, 320, 160, 0, 20, POPUP_BOTH);
_txtTitle = new Text(320, 17, 0, 30);
_btnOk = new TextButton(136, 16, 168, 155);
_btnStop = new TextButton(136, 16, 16, 155);
_btnSell = new ToggleTextButton(60, 16, 244, 61);
_txtAvailableEngineer = new Text(160, 9, 16, 50);
_txtAvailableSpace = new Text(160, 9, 16, 60);
_txtMonthlyProfit = new Text(160, 9, 168, 50);
_txtAllocatedEngineer = new Text(112, 32, 16, 80);
_txtUnitToProduce = new Text(112, 48, 168, 64);
_txtEngineerUp = new Text(90, 9, 40, 118);
_txtEngineerDown = new Text(90, 9, 40, 138);
_txtUnitUp = new Text(90, 9, 192, 118);
_txtUnitDown = new Text(90, 9, 192, 138);
_btnEngineerUp = new ArrowButton(ARROW_BIG_UP, 13, 14, 132, 114);
_btnEngineerDown = new ArrowButton(ARROW_BIG_DOWN, 13, 14, 132, 136);
_btnUnitUp = new ArrowButton(ARROW_BIG_UP, 13, 14, 284, 114);
_btnUnitDown = new ArrowButton(ARROW_BIG_DOWN, 13, 14, 284, 136);
_txtAllocated = new Text(40, 16, 128, 88);
_txtTodo = new Text(40, 16, 280, 88);
in files named something like src/???scape/????State.cpp
The four numbers are typically width, height, x, y
Change them, rebuild the exe, launch it to take a look.
So I've gotten the source files and have gotten Microsoft Visual Studio working and compiling. Your info on the Linux process wasn't useless, it came in useful at some stages when I was lost at a few points.
Anyone interested in using the Windows process instead of Linux should head over to the UFOpaedia:https://www.ufopaedia.org/index.php/Compiling_with_Microsoft_Visual_C%2B%2B_(OpenXcom)#Setting_up (https://www.ufopaedia.org/index.php/Compiling_with_Microsoft_Visual_C%2B%2B_(OpenXcom)#Setting_up) and read that.
I'm having a problem where the soldier name box is larger but the soldiers entire name doesn't make use of the new space. I'm guessing there is some sort of character limit somewhere that I can't seem to find so any input on that would also be appreciated.
Like I say I'm only playing around with the UI so excuse the poor quality.
(https://i.imgur.com/9ReWlDq.png)
So as a quick wrap up to this thread I just want to say thanks to everyone for your input and assistance, I've made great progress with editing the UI inside the source files so again thanks to everyone for the assistance. ;D
Quick look at my progress using the help here, and using the documentation
(https://i.imgur.com/olvPC9w.png)
(https://i.imgur.com/9ReWlDq.png)
(https://i.imgur.com/SPa3eiO.png)
(https://i.imgur.com/gQXHrBd.png)