HTML Character text box Query [SOLVED]

Studio31

New Member
Oct 30, 2018
12
19
Hey guys,

So i'm working away at my first game with little to no experience and i feel like there must be an easier way to do what i'm trying to do.

I am using Twine SugarCube 2.34.1

So i have my speech boxes displaying like this:
Capture1.PNG

but in order to do this for every character I have this in the passagebox:

Code:
<<nobr>>
<div class="you">
    <span class="pro">
        <img src="img/profilepics/avatar.jpg">
        </span>

$name
<hr>
What, who said that!?!
</div>
<</nobr>>
and this in the CSS:

Code:
div.you {
    color: white;
    background-color: #333333;
    border: 2px solid white;
    border-radius: 5px;
    padding: 8px 8px 8px 8px;
    box-shadow: 5px 5px 3px black;
}
My question is, is there a different way for me to set up characters characters so that i don't have to write all of this each time that character speaks?

Any help would be much appreciated,

thanks!
 

Alcahest

Engaged Member
Donor
Game Developer
Jul 28, 2017
3,149
4,044
Things like this is what what you use widgets for.
 
  • Like
Reactions: Studio31

guest1492

Member
Apr 28, 2018
312
262
You should probably upgrade your SugarCube to version 2.36.1 so you can use the container keyword for widgets.

Also, your speechbox looks incredibly similar to HiEv's so perhaps you should .
 
  • Like
Reactions: Studio31

Studio31

New Member
Oct 30, 2018
12
19
Hey guys, thanks so much for the above, didn't know exactly what widgets could be used for and the HiEv's resource is perfect!
 
  • Like
Reactions: Alcahest