v0.8.9 (Bugfixes + translations) released to Google Play!

Useful links
Source code of the game - Contribution guide - ATCS Editor - Translate the game on Weblate - Example walkthrough - Andor's Trail Directory - Join the Discord
Get the game (v0.8.9) from Google, F-Droid, our server, or itch.io

Tweaking the GUI...

Discussions of the development process of the game.
Taledus
Posts: 239
Joined: Tue Aug 07, 2012 2:57 pm
android_version: 4.0

Tweaking the GUI...

Post by Taledus »

Does anyone know where I can locate the screen that has the main status bar (hero icon, quickslot chest, HP bar) in the source? In res->layout->combatview.xml is the stuff for the combat bar, but I can not locate anything similar for the main status bar.

I am trying to modify a copy of the source for myself, that has the tweaked GUI that I posted about so that I can test how well it works. Things look fairly straight foreward for moving things around, though tips here would be appreciated.

I did not know where to post this cause I am doing this just for myself. If this works I will foreward anything over to be reviewed for an optional tablet layout.
phydeaux
VIP
Posts: 339
Joined: Fri Dec 09, 2011 7:40 am
android_version: 5.1 - Lolipop
Location: Gargoyle cavern, blindly hacking mobs to pieces till I find a rols!
Contact:

Re: Tweaking the GUI...

Post by phydeaux »

Res> layout> main.xml
I believe
Taledus
Posts: 239
Joined: Tue Aug 07, 2012 2:57 pm
android_version: 4.0

Re: Tweaking the GUI...

Post by Taledus »

Happen to know of a way to move the combat bar stuff? I am unable to move it and I cannot find anything that says it's locked :/
phydeaux
VIP
Posts: 339
Joined: Fri Dec 09, 2011 7:40 am
android_version: 5.1 - Lolipop
Location: Gargoyle cavern, blindly hacking mobs to pieces till I find a rols!
Contact:

Re: Tweaking the GUI...

Post by phydeaux »

Not really, should be able to do it in eclipse, but idk, haven't had a chance to actually work on the code
Taledus
Posts: 239
Joined: Tue Aug 07, 2012 2:57 pm
android_version: 4.0

Re: Tweaking the GUI...

Post by Taledus »

I have successfully moved the status bar...now just for figuring out how to get the blasted combat bar to move, and shorten the screen's display height - currently I can walk under the status bar. However I am using eclipse for editing the GUI files. It is just locked because I am unable to move anything on the combat bar to another section of the window. I have checked everything and I guess since I am new to Java & Eclipse I have no clue what I am looking for.

It probably just doesn't like my WIN-OCD ideas either...LOL

If anyone happens to come across this and can fix it, please let me know.
phydeaux
VIP
Posts: 339
Joined: Fri Dec 09, 2011 7:40 am
android_version: 5.1 - Lolipop
Location: Gargoyle cavern, blindly hacking mobs to pieces till I find a rols!
Contact:

Re: Tweaking the GUI...

Post by phydeaux »

Lol, I'll see if I get a chance to pull out the lappy tonight :)
Taledus
Posts: 239
Joined: Tue Aug 07, 2012 2:57 pm
android_version: 4.0

Re: Tweaking the GUI...

Post by Taledus »

I finally got it to move. I had to set the gravity to 'bottom' on something that was behind everything that was holding all the buttons.

However, when the code turns the visibility on of the combat bar it automatically goes back up to the top. I am going to keep looking around and post anything I can find. If you happen to have a minute to look, I appreciate it phydeaux.

On a side note I am not able to render the emulator in WXGA (tablet), only WVGA(phone) so I wont be able to see the intended effect until I build the .apk file, which I have no clue on how to do...yet ^.^
User avatar
nyktos
VIP
Posts: 3463
Joined: Wed Sep 14, 2011 5:38 pm
android_version: 7.1 - Nougat
Location: Nor City, Dhayavar

Re: Tweaking the GUI...

Post by nyktos »

sounds like when i was trying to unpack the source for the first time... (for map making)

:lol:

best of luck!

:D


"Embrace the Shadow"

Image

[Lv: 60] [HP: 175] [AC: 361] [AD: 25-39] [BC: 75]
[Dual Wielding Swords] [Unarmored Fighting]
phydeaux
VIP
Posts: 339
Joined: Fri Dec 09, 2011 7:40 am
android_version: 5.1 - Lolipop
Location: Gargoyle cavern, blindly hacking mobs to pieces till I find a rols!
Contact:

Re: Tweaking the GUI...

Post by phydeaux »

Oh, I just realized, I think the combat screen is a different xml file... Combat.xml or battle.xml I think... Not looking at the source right now. And to build your own apk files from your modified source, should just be compile to apk or something like that... I'll double check that in a while, if I get the time tonight :)

Edit:
Scott just told me, if you run your build through the emulator, your apk files are in the bin directory
Taledus
Posts: 239
Joined: Tue Aug 07, 2012 2:57 pm
android_version: 4.0

Re: Tweaking the GUI...

Post by Taledus »

The combat bar stuff is on the combatview.xml file. I had no problems finding it, but getting the stuff to move. The controls do not appear as they do on the games combat bar as things look unorganized, readjusted somewhere in the code I believe when they are needed.

After I finally figured out the gravity I am able to move things to the bottom of the window, yet when the visibility is turned on during combat they show back up at the top, with all controls organized again.

src->com.gpl.rpg.AndorsTrail.view->CombatView.Java contains nothing either that looks of use for modifying the location of the controls on the combat bar, which I believe it is referring to it as "monsterBar", but it does contain the sub procedures that control the visibility, and the listeners for the flee/end turn/attack buttons. The force is telling me I am soooo close to figuring this out :D

--------------------------------------------------------------------------------------------------------------------------------
Alright, I figured something out. On the main.xml file there is a control called statusview_statustext (TextView) which appears to be a text box. No matter what I mess with, everytime I try to run this in the emulator it says it has stopped unexpectedly.

So I loaded this up in Bluestacks. It loads the main title page, but then when I click on a new game says loading resource, then goes back to the title page. I am not making very much progress, because everytime I have a build fail I undo all changes and make sure it will still startup from the default layout, which it does.

So I am working on it, I just don't know what I might be doing wrong.

--------------------------------------------------------------------------------------------------------------------------------
Here is what I have so far:

I can shorten the length of the HP/LVL bars under the statusview.xml

On main.xml I can move the main_statusview control on top of the com.gpl...MainView

I am unable to shorten the height of the com.gpl...MainView control to be on top of the repositioned main_statusview control, as it causes a loop back to the title screen.

I can set the main_combatview below the main_statusview but it will not appear in combat, because it is now hidden.

I am unable to make the com.gpl.MainView any other size, as it causes a loop back to the title screen when loading.

This does not seem to be working for me...I guess I am just used to programming with Visual Studio because I am unable to make properly working changes to the controls that reflect something similar to what I am trying to achieve.
Post Reply