# HG changeset patch # User thib # Date 1237394689 0 # Node ID 6512372607241961d687da1e65e6cbe57e12195d # Parent de29c4d2d043914d370f8301bac727b7bdfb9c13 * Center button-type selects diff --git a/scn2k/scn2k_text.cc b/scn2k/scn2k_text.cc --- a/scn2k/scn2k_text.cc +++ b/scn2k/scn2k_text.cc @@ -693,8 +693,9 @@ void TextImpl::CreateSelect(Cmd& cmd) { External_select: CreateSelBG(); hide(); // なので、テキストウィンドウは消去 - int baseposx, baseposy, repposx, repposy; + int baseposx, baseposy, repposx, repposy, centerx, centery; int mojisize, col1, col2; + config.GetParam("#SELBTN.000.CENTERING", 2, ¢erx, ¢ery); config.GetParam("#SELBTN.000.BASEPOS", 2, &baseposx, &baseposy); config.GetParam("#SELBTN.000.REPPOS", 2, &repposx, &repposy); config.GetParam("#SELBTN.000.MOJISIZE", 1, &mojisize); @@ -713,6 +714,10 @@ External_select: /* ウィンドウ背景の大きさを求める */ if (baseposx == 0 && sel_bg_rect.width() != 0) baseposx = (parent.Width()-sel_bg_rect.width()) / 2; // ボタン位置をセンタリング + if (centerx) + baseposx = (parent.Width()-sel_bg_rect.width()-sel_size*repposx) / 2; + if (centery) + baseposy = (parent.Height()-sel_bg_rect.height()-sel_size*repposy) / 2; sel_widget = parent.create_node( Rect(0, 0, parent.Width(), parent.Height()),0); diff --git a/system/system_config.cc b/system/system_config.cc --- a/system/system_config.cc +++ b/system/system_config.cc @@ -774,6 +774,7 @@ AyuSysConfig::AyuSysConfig(void) { SetOrigParam("#CURSOR.000.CONT", 1, 50); // リターンカーソルの繰り返し数 SetOrigParam("#CURSOR.000.SPEED", 1, 1000); // ブリンクする速さ + SetOrigParam("#SELBTN.000.CENTERING", 2, 0, 0); SetOrigParam("#SELBTN.000.BASEPOS", 2, 0, 0); // 選択肢ウィンドウの位置 SetOrigParam("#SELBTN.000.REPPOS", 2, 0, 50); // 選択肢ウィンドウの次の位置(相対) SetOrigParam("#SELBTN.000.MOJISIZE", 4, 26, 0,0,0); // 文字の大きさ