re-arrange and align HP/SP

This commit is contained in:
2025-01-20 12:13:48 -06:00
parent 4260d41bf6
commit 4c383d116c
2 changed files with 58 additions and 38 deletions

View File

@@ -3,38 +3,57 @@
<dialog defbtn='cast'>
<pict name='pic' type='dlog' num='12' top='9' left='9'/>
<text size='large' top='6' left='54' width='139' height='18'>Select a Spell:</text>
<button name='caster1' type='regular' def-key='1' top='81' left='10'><key/></button>
<button name='caster2' type='regular' def-key='2' top='105' left='10'><key/></button>
<button name='caster3' type='regular' def-key='3' top='129' left='10'><key/></button>
<button name='caster4' type='regular' def-key='4' top='153' left='10'><key/></button>
<button name='caster5' type='regular' def-key='5' top='177' left='10'><key/></button>
<button name='caster6' type='regular' def-key='6' top='201' left='10'><key/></button>
<button name='target1' type='small' def-key='shift 1' top='82' left='235'><key/></button>
<button name='target2' type='small' def-key='shift 2' top='106' left='235'><key/></button>
<button name='target3' type='small' def-key='shift 3' top='130' left='235'><key/></button>
<button name='target4' type='small' def-key='shift 4' top='154' left='235'><key/></button>
<button name='target5' type='small' def-key='shift 5' top='178' left='235'><key/></button>
<button name='target6' type='small' def-key='shift 6' top='202' left='235'><key/></button>
<button name='cancel' type='regular' def-key='esc' top='394' left='479'>Cancel</button>
<button name='cast' type='regular' top='394' left='549'>Cast</button>
<text name='pc1' top='84' left='88' width='122' height='16'/>
<text name='pc2' top='108' left='88' width='122' height='16'/>
<text name='pc3' top='132' left='88' width='122' height='16'/>
<text name='pc4' top='156' left='88' width='122' height='16'/>
<text name='pc5' top='180' left='88' width='122' height='16'/>
<text name='pc6' top='204' left='88' width='122' height='16'/>
<text name='hp1' top='85' left='265' width='32' height='16' colour='red'/>
<text name='hp2' top='109' left='265' width='32' height='16' colour='red'/>
<text name='hp3' top='133' left='265' width='32' height='16' colour='red'/>
<text name='hp4' top='156' left='265' width='32' height='16' colour='red'/>
<text name='hp5' top='181' left='265' width='32' height='16' colour='red'/>
<text name='hp6' top='205' left='265' width='32' height='16' colour='red'/>
<text name='sp1' top='85' left='304' width='32' height='16' colour='light_blue'/>
<text name='sp2' top='109' left='304' width='32' height='16' colour='light_blue'/>
<text name='sp3' top='133' left='304' width='32' height='16' colour='light_blue'/>
<text name='sp4' top='156' left='304' width='32' height='16' colour='light_blue'/>
<text name='sp5' top='181' left='304' width='32' height='16' colour='light_blue'/>
<text name='sp6' top='205' left='304' width='32' height='16' colour='light_blue'/>
<!-- To the left of PC names, buttons to select caster -->
<text name='caster-head' size='large' top='60' left='22' width='75' height='16'>Caster:</text>
<button name='caster1' type='regular' def-key='1' relative='neg pos-in' rel-anchor='prev' top='19' left='12'><key/></button>
<button name='caster2' type='regular' def-key='2' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0'><key/></button>
<button name='caster3' type='regular' def-key='3' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0'><key/></button>
<button name='caster4' type='regular' def-key='4' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0'><key/></button>
<button name='caster5' type='regular' def-key='5' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0'><key/></button>
<button name='caster6' type='regular' def-key='6' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0'><key/></button>
<!-- PC names -->
<text name='pc-head' size='large' relative='pos-in pos-in' anchor='caster-head' top='0' left='66' width='75' height='16'></text><!-- Just for positioning-->
<text name='pc1' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='122' height='16'/>
<text name='pc2' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='122' height='16'/>
<text name='pc3' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='122' height='16'/>
<text name='pc4' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='122' height='16'/>
<text name='pc5' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='122' height='16'/>
<text name='pc6' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='122' height='16'/>
<!-- To the right of PC name, buttons to select target -->
<text name='target-head' size='large' relative='pos-in pos-in' anchor='pc-head' top='0' left='112' width='223' height='16'>Target:</text>
<button name='target1' type='small' def-key='shift 1' relative='pos-in pos-in' rel-anchor='prev' top='19' left='6'><key/></button>
<button name='target2' type='small' def-key='shift 2' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0'><key/></button>
<button name='target3' type='small' def-key='shift 3' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0'><key/></button>
<button name='target4' type='small' def-key='shift 4' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0'><key/></button>
<button name='target5' type='small' def-key='shift 5' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0'><key/></button>
<button name='target6' type='small' def-key='shift 6' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0'><key/></button>
<!-- To the right of target buttons, green arrows to highlight choice -->
<text name='arrow1' relative='neg pos-in' anchor='hp1' top='0' left='20' width='32' height='16' colour='light_green'>-&gt;</text>
<text name='arrow2' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='light_green'>-&gt;</text>
<text name='arrow3' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='light_green'>-&gt;</text>
<text name='arrow4' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='light_green'>-&gt;</text>
<text name='arrow5' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='light_green'>-&gt;</text>
<text name='arrow6' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='light_green'>-&gt;</text>
<!-- To the right of target buttons, PC HP -->
<text name='hp-head' size='large' relative='pos-in pos-in' anchor='target-head' top='0' left='55' width='223' height='16'>HP:</text>
<text name='hp1' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='red'/>
<text name='hp2' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='red'/>
<text name='hp3' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='red'/>
<text name='hp4' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='red'/>
<text name='hp5' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='red'/>
<text name='hp6' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='red'/>
<!-- To the right of PC HP, PC SP -->
<text name='sp-head' size='large' relative='pos-in pos-in' anchor='hp-head' top='0' left='24' width='223' height='16'>SP:</text>
<text name='sp1' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='light_blue'/>
<text name='sp2' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='light_blue'/>
<text name='sp3' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='light_blue'/>
<text name='sp4' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='light_blue'/>
<text name='sp5' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='light_blue'/>
<text name='sp6' relative='pos-in pos-in' rel-anchor='prev' top='24' left='0' width='32' height='16' colour='light_blue'/>
<!-- To the right of PC SP, Status icons -->
<text name='status-head' size='large' relative='pos-in pos-in' anchor='sp-head' top='0' left='24' width='223' height='16'>Status:</text>
<text name='feedback' framed='true' top='400' left='30' width='186' height='16'>Pick spell to cast.</text>
<led name='spell1' state='off' top='247' left='14'/>
<led name='spell2' state='off' top='261' left='14'/>
@@ -75,8 +94,6 @@
<led name='spell37' state='off' top='331' left='488'/>
<led name='spell38' state='off' top='345' left='488'/>
<button name='other' type='large' def-key='space' top='394' left='371'>Other Spells</button>
<text size='large' top='60' left='9' width='75' height='16'>Caster:</text>
<text size='large' top='60' left='209' width='223' height='16'>Target: HP: SP: Status:</text>
<text top='0' left='202' width='290' height='57'>
Keyboard:
<key ref='caster1'/><key ref='caster2'/><key ref='caster3'/>
@@ -148,4 +165,8 @@
<pict name='pc6-stat11' type='status' num='0' top='209' left='464'/><pict name='pc6-stat12' type='status' num='0' top='209' left='477'/>
<pict name='pc6-stat13' type='status' num='0' top='209' left='490'/><pict name='pc6-stat14' type='status' num='0' top='209' left='503'/>
<pict name='pc6-stat15' type='status' num='0' top='209' left='516'/>
<button name='cancel' type='regular' def-key='esc' top='394' left='479'>Cancel</button>
<button name='cast' type='regular' top='394' left='549'>Cast</button>
</dialog>

View File

@@ -1706,6 +1706,7 @@ static void draw_spell_pc_info(cDialog& me) {
if(univ.party[i].main_status != eMainStatus::ABSENT) {
me["pc" + n].setText(univ.party[i].name);
me["arrow" + n].hide();
if(univ.party[i].main_status == eMainStatus::ALIVE) {
me["hp" + n].setTextToNum(univ.party[i].cur_health);
me["sp" + n].setTextToNum(univ.party[i].cur_sp);
@@ -1731,13 +1732,11 @@ static void put_pc_target_buttons(cDialog& me, short& store_last_target_darkened
if(store_spell_target < 6) {
std::string n = boost::lexical_cast<std::string>(store_spell_target + 1);
me["hp" + n].setColour(SELECTED_COLOUR);
me["sp" + n].setColour(SELECTED_COLOUR);
me["arrow" + n].show();
}
if((store_last_target_darkened < 6) && (store_last_target_darkened != store_spell_target)) {
std::string n = boost::lexical_cast<std::string>(store_last_target_darkened + 1);
me["hp" + n].setColour(me.getDefTextClr());
me["sp" + n].setColour(me.getDefTextClr());
me["arrow" + n].hide();
}
store_last_target_darkened = store_spell_target;
}