Comment content strings; whitespace fixes.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2545 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2006-11-25 23:48:21 +00:00
parent 55a56221b2
commit f7e655afd6
+15 -4
View File
@@ -163,8 +163,8 @@ MCD_DrawSlider (WIDGET *_self, int x, int y)
r.extent.width = 3; r.extent.width = 3;
r.extent.height = 8; r.extent.height = 8;
r.corner.y = t.baseline.y - 7; r.corner.y = t.baseline.y - 7;
r.corner.x = t.baseline.x + 3 * tick + (3 * tick * (self->value - self->min) / r.corner.x = t.baseline.x + 3 * tick + (3 * tick *
(self->max - self->min)) - 1; (self->value - self->min) / (self->max - self->min)) - 1;
DrawFilledRectangle (&r); DrawFilledRectangle (&r);
(*self->draw_value)(self, t.baseline.x + 7 * tick, t.baseline.y); (*self->draw_value)(self, t.baseline.x + 7 * tick, t.baseline.y);
@@ -451,8 +451,11 @@ CreateWidgets (void)
buttons[i].width = Widget_WidthFullScreen; buttons[i].width = Widget_WidthFullScreen;
} }
buttons[0].name = GAME_STRING (NETMELEE_STRING_BASE + 19); buttons[0].name = GAME_STRING (NETMELEE_STRING_BASE + 19);
// "Connect to remote host"
buttons[1].name = GAME_STRING (NETMELEE_STRING_BASE + 20); buttons[1].name = GAME_STRING (NETMELEE_STRING_BASE + 20);
// "Wait for incoming connection"
buttons[2].name = GAME_STRING (NETMELEE_STRING_BASE + 21); buttons[2].name = GAME_STRING (NETMELEE_STRING_BASE + 21);
// "Cancel"
buttons[0].handleEvent = do_connect; buttons[0].handleEvent = do_connect;
buttons[1].handleEvent = do_listen; buttons[1].handleEvent = do_listen;
@@ -481,6 +484,7 @@ CreateWidgets (void)
slider.step = 1; slider.step = 1;
slider.value = netplayOptions.inputDelay; slider.value = netplayOptions.inputDelay;
slider.category = GAME_STRING (NETMELEE_STRING_BASE + 24); slider.category = GAME_STRING (NETMELEE_STRING_BASE + 24);
// "Net Delay"
for (i = 0; i < 2; i++) for (i = 0; i < 2; i++)
{ {
@@ -498,16 +502,22 @@ CreateWidgets (void)
} }
texts[0].category = GAME_STRING (NETMELEE_STRING_BASE + 22); texts[0].category = GAME_STRING (NETMELEE_STRING_BASE + 22);
// "Host"
texts[1].category = GAME_STRING (NETMELEE_STRING_BASE + 23); texts[1].category = GAME_STRING (NETMELEE_STRING_BASE + 23);
// "Port"
/* We sometimes assign to these internals; cannot strncpy over self! */ /* We sometimes assign to these internals; cannot strncpy over self! */
if (texts[0].value != netplayOptions.peer[current_state->which_side].host) if (texts[0].value != netplayOptions.peer[current_state->which_side].host)
{ {
strncpy (texts[0].value, netplayOptions.peer[current_state->which_side].host, texts[0].maxlen); strncpy (texts[0].value,
netplayOptions.peer[current_state->which_side].host,
texts[0].maxlen);
} }
if (texts[1].value != netplayOptions.peer[current_state->which_side].port) if (texts[1].value != netplayOptions.peer[current_state->which_side].port)
{ {
strncpy (texts[1].value, netplayOptions.peer[current_state->which_side].port, texts[1].maxlen); strncpy (texts[1].value,
netplayOptions.peer[current_state->which_side].port,
texts[1].maxlen);
} }
texts[0].value[texts[0].maxlen]=0; texts[0].value[texts[0].maxlen]=0;
texts[1].value[texts[1].maxlen]=0; texts[1].value[texts[1].maxlen]=0;
@@ -620,3 +630,4 @@ MeleeConnectDialog (int side)
} }
#endif /* NETPLAY */ #endif /* NETPLAY */