Fixed long questions and answers
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
function Button(default_color, hover_color, select_color, width, height, x, y, text, status, button_is_answer, click) {
|
||||
function Button(default_color, hover_color, select_color, width, height, x, y, text, status, click) {
|
||||
this.graphics = new PIXI.Graphics();
|
||||
this.default_color = default_color;
|
||||
this.hover_color = hover_color;
|
||||
@@ -8,7 +8,6 @@ function Button(default_color, hover_color, select_color, width, height, x, y, t
|
||||
this.y = y;
|
||||
this.text = text;
|
||||
this.status = status;
|
||||
this.button_is_answer = button_is_answer;
|
||||
this.pointerdown = click;
|
||||
this.selected = false;
|
||||
let _this = this;
|
||||
@@ -35,9 +34,11 @@ function Button(default_color, hover_color, select_color, width, height, x, y, t
|
||||
this.getButton = function () {
|
||||
const style = new PIXI.TextStyle({
|
||||
fontFamily: 'Arial',
|
||||
fontSize: 60,
|
||||
fontSize: 40,
|
||||
wordWrap: true,
|
||||
wordWrapWidth: game_board_size * 0.5 - 20,
|
||||
wordWrapWidth: this.width,
|
||||
breakWords: true,
|
||||
lineJoin: 'miter'
|
||||
});
|
||||
|
||||
this.graphics.clear();
|
||||
|
||||
Reference in New Issue
Block a user