ufoaiorg / ufoai

UFO:Alien Invasion
http://ufoai.org
GNU General Public License v2.0
148 stars 51 forks source link

ui lua integration #19

Closed rxadmin closed 9 years ago

rxadmin commented 9 years ago

I tested the integration by translation the _assets.ufo, _assets_base.ufo and main.ufo files. As this is my first pull request, I hope you'll be kind to me :-)

xray

rxadmin commented 9 years ago

Fixed cross-platform bug based on feedback from Internecivus.

mgerhardy commented 9 years ago

It would be cool if we could if we could get a separate pull request for your last fix - as this is not lua related.

mgerhardy commented 9 years ago

In general you should most likely clean up the history a little bit of this pull request. You can rearrange/merge (not a git merge, but a merge of two or more commits into one) commits and remove the merge commits. Before we can accept the pull request, we have to make sure that it also builds on linux.

internecivusraptus commented 9 years ago

It builds on linux, at least on my linux machine. I can provide changed ufo.mk and testall.mk as soon as this pull request will be accepted into upstream.

rxadmin commented 9 years ago

Added another fix. I'm going to try merging the commits into a single commit.

DarkRainX commented 9 years ago

This rebases cleanly onto master, maybe that would be enough instead of merging it all on a single mega-commit? (it removes the merge commits)

Note that this will break builds with '-std=c++11' (which is used by mac builds IIRC) because uiContainerNode::onInitNode() is declared with 'override' but does not override anything.

There are also some problems with nodes not showing (noticed it on hospital and aircraft soldier assignment windows) which I haven't had a chance to investigate.

internecivusraptus commented 9 years ago

@DarkRainX These are problems with nodes that are dynamically created from old ufo script.

rxadmin commented 9 years ago

One of the changes I added recently is that every node now is a dynamic node. This was done based on the discussion in the "lua design thoughts" post. This probably triggered some unwanted side effects.

see: http://ufoai.org/forum/index.php/topic,8664.msg63500.html#msg63500

DarkRainX commented 9 years ago

I see, hopefully that isn't too difficult to solve (Mind that I usually don't touch the UI code unless absolutely necessary, so the help I can offer is limited at best)

rxadmin commented 9 years ago

I'm trying to clean up the commit history, so far without much succes. Can anyone assist here, plz? What commands do I have to run?

DarkRainX commented 9 years ago

Depends on what you are trying to achieve, what I did was, starting with a fresh clone of the "official" repo I added my own fork and rebased it (see the rebased branch), it was something like this:

git remote add [remote_name] [remote_url] git fetch [remote_name] git branch -t [branch_name] [remote_name]/master git rebase --onto master [branch_name]

After that you are on branch [branch_name] with all your commits on the tip of the branch and no merge commits, from there you could use git rebase --interactive to squash (merge) commits together, reorder them, edit commit messages and other fancy things if you like Then you can push your branch, possibly to master as that's what your PR is based on (but note that it might require overwriting the history, which is usually frowned upon as it affects all people that have already fetched your changes)

Edit: Of course your set up is different than mine, you could still pull the "official" repo to a branch and rebase your master onto that I think....

rxadmin commented 9 years ago

Rebased the history, so I'll create a new pull request for this before merge wit main branch.