疑問に思うことがあれば、スレを立てずに、まずはココで質問。
スレッドを立てる前にはローカルルールを読みましょう。
http://echo.2ch.net/gamedev/
※ >>980 を踏んだ人は次スレ立てをお願いします。
【アップローダ・避難所・Wiki】
ゲーム製作技術板公式Wiki
http://wiki.game-develop.com/
ゲーム製作技術板公式アップローダ
http://gmdev.xrea.jp/
gamdev.orgが落ちるたびにあげてみるスレ
http://hibari.2ch.net/test/read.cgi/gamedev/1107022166
※前スレ
【初心者】スレを立てる前にココで質問を【Part27】
http://echo.2ch.net/test/read.cgi/gamedev/1419935788/
探検
【初心者】スレを立てる前にココで質問を【Part28】©2ch.net
■ このスレッドは過去ログ倉庫に格納されています
2016/05/29(日) 10:15:36.62ID:jiO6jmYG
2016/05/29(日) 10:16:04.07ID:jiO6jmYG
リンクがかなり死んでるようだが、代わりがわからんのでそのまま
2016/05/30(月) 01:31:43.57ID:wtPpkfk+
おつかれさんですよ
4名前は開発中のものです。
2016/05/31(火) 21:49:13.27ID:5XqNUbsR 前スレの992ありがとう。
何故か途中で切れてた。
String[] elementList = new String[]{"A", "B", "C", "D", "E", "F", "G", "H"};
int displaySize = 3; // 画面に表示するアイテム数
int currentChoice = 0;// 今選択中の要素番号インデックス
int start = 0; // 表示要素の開始番号
// 表示はこんな感じ
public void paintComponent(Graphics g) {
for (int i = start; i < start + displaySize; i++) {
g.drawString(elementList[i], 10, 10 * (i - start + 1));
}
何故か途中で切れてた。
String[] elementList = new String[]{"A", "B", "C", "D", "E", "F", "G", "H"};
int displaySize = 3; // 画面に表示するアイテム数
int currentChoice = 0;// 今選択中の要素番号インデックス
int start = 0; // 表示要素の開始番号
// 表示はこんな感じ
public void paintComponent(Graphics g) {
for (int i = start; i < start + displaySize; i++) {
g.drawString(elementList[i], 10, 10 * (i - start + 1));
}
5名前は開発中のものです。
2016/05/31(火) 21:49:47.47ID:5XqNUbsR 続き
public void mousePressed(MouseEvent e) {
if (e.getButton() == MouseEvent.BUTTON1) { // 左クリックされた時
currentChoice--;
if (currentChoice < start) { // when choice gets below the starting index
start = currentChoice;
if (currentChoice < 0) { // 一番上に来たら初期化
currentChoice = 0;
start = 0;
}
}
} else if (e.getButton() == MouseEvent.BUTTON3) { // 右クリックされた時
System.out.println("DOWN");
currentChoice++;
if (currentChoice > displaySize - 1) {
System.out.println(start + 1 + displaySize );
if (start + displaySize < elementList.length) {
start++;
}
if (currentChoice > elementList.length - 1) { // 一番下に来た
currentChoice = elementList.length - 1;
}
}
}
}
public void mousePressed(MouseEvent e) {
if (e.getButton() == MouseEvent.BUTTON1) { // 左クリックされた時
currentChoice--;
if (currentChoice < start) { // when choice gets below the starting index
start = currentChoice;
if (currentChoice < 0) { // 一番上に来たら初期化
currentChoice = 0;
start = 0;
}
}
} else if (e.getButton() == MouseEvent.BUTTON3) { // 右クリックされた時
System.out.println("DOWN");
currentChoice++;
if (currentChoice > displaySize - 1) {
System.out.println(start + 1 + displaySize );
if (start + displaySize < elementList.length) {
start++;
}
if (currentChoice > elementList.length - 1) { // 一番下に来た
currentChoice = elementList.length - 1;
}
}
}
}
6992
2016/05/31(火) 22:01:02.02ID:b8P60GFh DrawStringまで行ってるなら、縦書きフォント(@MS ゴシックとか)を指定して、
g.Rotate(90度 = 90 * π/180)すればいけそうな気がする?
g.Rotate(90度 = 90 * π/180)すればいけそうな気がする?
■ このスレッドは過去ログ倉庫に格納されています
ニュース
- 青切符導入を前に取り締まりが厳格化 自転車の違反でクルマの免停が急増中 [七波羅探題★]
- 【サッカー】日本が2046年W杯の開催地に立候補 宮本会長「手を挙げる予定」 他国との共催を視野 8万人収容スタジアム問題も [冬月記者★]
- 電車内で財布盗んだか 中国人の男2人逮捕 短期滞在でこれまでに16回来日 [七波羅探題★]
- 【対日戦略】中国とロシア、対日共闘で一致 「軍国主義復活に反撃」… ★7 [BFU★]
- 高市首相「日中共同声明の通りで一切変更ない」政府の台湾への基本的立場について問われ参院本会議で答弁 ★4 [ぐれ★]
- 農水相肝いりのおこめ券配布、…大阪・交野市長「配らない」宣言、全国自治体も困惑ですでに破綻 [バイト歴50年★]
- 【貧困ジャップ速報】LAWSON、ついにゆでただけのパスタ(具無し)を230円で売るwwwwwwwwwwwwwwwwwwww [802034645]
- 天音かなたそ😇🪽の思い出を語ろう🏡
- 【悲報】NVIDIA幹部「日本はもうロボット大国じゃないよw」来日した幹部に現実を突きつけられた模様 [673057929]
- スマホの保護フィルム、いらない説 [268244553]
- すまん、ウニとかアワビとろうとしたらトラブったんだがこれオレが悪いの?
- 馬鹿無職のみんな~あつまれ~🙋🏡
